Integrating generative Al into fundamental programming
Generative Al (GenAI) tools like GitHub Copilot, Codeium, Codex, Claude and GPT are rapidly changing how programming is taught and learnt. These tools can solve software assignments with remarkable accuracy. GPT-4 achieved top-tier performance on several standardized exams, far surpassing earlier models such as Codex on many coding and reasoning benchmarks.
With such capabilities, researchers are shifting from asking, "Should we teach with Al?" to "How do we teach with Al?"
These results spearhead transformation in teaching fundamental programming courses. Integrating GenAI tools, help students tackle complex programming tasks while developing critical thinking and problem-solving skills.
Core skills for programming with Generative Al
Teaching programming with GenAI involves fostering a mix of traditional and Al-specific skills.
Writing software with GenAI applications. such as Copilot. needs to be approached differently to traditional programming tasks
- Prompting and function design: Students learn to articulate precise prompts for Al tools, honing their ability to describe a function's purpose, inputs, and outputs, for instance. This clarity improves the output from the Al tool and reinforces students' understanding of task requirements.
- Code reading and selection: Al tools can produce any number of solutions, and each will be different, requiring students to evaluate the options critically. Students are taught to identify which solution is most likely to solve their problem effectively.
- Code testing and debugging: Students practise open- and closed-box testing, learning to identify edge cases and debug code using tools like doctest and the VS Code debugger.
- Problem decomposition: Breaking down large projects into smaller functions is essential. For instance, when designing a text-based game, students might separate tasks into input handling, game state updates, and rendering functions.
- Leveraging modules: Students explore new programming domains and identify useful libraries through interactions with Copilot. This prepares them to solve problems efficiently and creatively.
Practical applications in the classroom
All programming classes use GitHub Copilot. The course includes with complex problem-solving tasks, creative coding assignments and open-ended problems allowing students to explore their interests while applying the skills they have learnt. The creative coding assignments covers the following areas:
- Mini data handling: Students use Kaggle datasets to explore questions related to their fields of study; for example, on neuroscience dataset - analyse stroke data. The projects encouraged interdisciplinary thinking and practical applications of programming.
- Image manipulation: Students work with the Python Imaging Library (PIL) to create to create photo montages and apply filters to images, showcasing their creativity and technical skills.
- Story-based programming: Students create interactive storytelling programs where users choose different actions, helping them practice conditional logic and program flow.
- Puzzle and logic challenges: Sudoku helpers, simple maze navigation, or mathematical puzzles encourage algorithmic thinking and debugging skills.
- Game development: A project focus on designing text-based games encouraged students to break down problems into manageable components while using Al tools to generate and debug code.
These beginner-level creative coding assignments make programming enjoyable, interactive, and application-oriented while helping students build confidence in fundamental coding concepts through hands-on learning and experimentation.