{"id":1237395,"date":"2025-03-06T05:52:35","date_gmt":"2025-03-06T10:52:35","guid":{"rendered":"https:\/\/www.prime-wow.com\/?p=1237395"},"modified":"2025-03-06T05:52:35","modified_gmt":"2025-03-06T10:52:35","slug":"integrating-generative-ai-into-introductory-programming-classes","status":"publish","type":"post","link":"https:\/\/www.prime-wow.com\/?p=1237395","title":{"rendered":"Integrating generative AI into introductory programming classes"},"content":{"rendered":"<div>\n<p>Generative AI (GenAI) tools like GitHub Copilot and ChatGPT are rapidly changing how programming is taught and learnt. These tools can solve assignments with remarkable accuracy. GPT-4, for example, scored an impressive <a href=\"https:\/\/cacm.acm.org\/research\/computing-education-in-the-era-of-generative-ai\/\" target=\"_blank\" rel=\"noreferrer noopener\">99.5% on an undergraduate computer science exam, compared to Codex\u2019s 78% just two years earlier<\/a>. With such capabilities, researchers are shifting from asking, \u201cShould we teach with AI?\u201d to \u201cHow do we teach with AI?\u201d<\/p>\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-1 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img fetchpriority=\"high\" decoding=\"async\" width=\"500\" height=\"500\" src=\"https:\/\/www.prime-wow.com\/wp-content\/uploads\/2025\/03\/Leo-P-500x500-1.png\" alt=\"Photo of Leo Porter (UC San Diego)\" class=\"wp-image-89589\" style=\"aspect-ratio:1;width:416px;height:auto\" srcset=\"https:\/\/www.prime-wow.com\/wp-content\/uploads\/2025\/03\/Leo-P-500x500-1.png 500w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Leo-P-250x250.png 250w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Leo-P-150x150.png 150w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Leo-P-768x768.png 768w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Leo-P-800x800.png 800w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Leo-P-100x100.png 100w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Leo-P-300x300.png 300w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Leo-P-450x450.png 450w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Leo-P-900x900.png 900w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Leo-P.png 1080w\" sizes=\"(max-width: 500px) 100vw, 500px\"><figcaption class=\"wp-element-caption\">Leo Porter from UC San Diego<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"500\" src=\"https:\/\/www.prime-wow.com\/wp-content\/uploads\/2025\/03\/Daniel-500x500-1.png\" alt=\"Photo of Daniel Zingaro (University of Toronto)\" class=\"wp-image-89590\" srcset=\"https:\/\/www.prime-wow.com\/wp-content\/uploads\/2025\/03\/Daniel-500x500-1.png 500w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Daniel-250x250.png 250w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Daniel-150x150.png 150w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Daniel-768x768.png 768w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Daniel-100x100.png 100w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Daniel-300x300.png 300w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Daniel-450x450.png 450w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/Daniel.png 794w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\"><figcaption class=\"wp-element-caption\">Daniel Zingaro from the University of Toronto<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<\/div>\n<p>Leo Porter and Daniel Zingaro have spearheaded this transformation through their groundbreaking undergraduate programming course. Their innovative curriculum integrates GenAI tools to help students tackle complex programming tasks while developing critical thinking and problem-solving skills.<\/p>\n<p>Leo and Daniel presented their work at the Raspberry Pi Foundation research seminar in December 2024. During the seminar, it became clear that much could be learnt from their work, with their insights having particular relevance for teachers in secondary education thinking about using GenAI in their programming classes<\/p>\n<h2 class=\"wp-block-heading\">Practical applications in the classroom<\/h2>\n<p>In 2023, Leo and Daniel <a href=\"http:\/\/bit.ly\/CS1-LLMs\" target=\"_blank\" rel=\"noreferrer noopener\">introduced GitHub Copilot in their introductory programming\u00a0 CS1-LLM course<\/a> at UC San Diego with 550 students. The course included creative, open-ended projects that allowed students to explore their interests while applying the skills they\u2019d learnt. The projects covered the following areas:<\/p>\n<ul class=\"wp-block-list\">\n<li><strong>Data science<\/strong>: Students used Kaggle datasets to explore questions related to their fields of study \u2014 for example, neuroscience majors analysed stroke data. The projects encouraged interdisciplinary thinking and practical applications of programming.<\/li>\n<li><strong>Image manipulation<\/strong>: Students worked with the Python Imaging Library (PIL) to create collages and apply filters to images, showcasing their creativity and technical skills.<\/li>\n<li><strong>Game development<\/strong>: A project focused on designing text-based games encouraged students to break down problems into manageable components while using AI tools to generate and debug code.<\/li>\n<\/ul>\n<p>Students consistently reported that these projects were not only enjoyable but also responsible for deepening their understanding of programming concepts. A majority (74%) found the projects helpful or extremely helpful for their learning. One student noted that.<\/p>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u201c<em>Programming projects were fun and the amount of <strong>freedom<\/strong> that was given added to that. The projects also helped me understand how to put <strong>everything that we have learned<\/strong> so far into a project that I could be proud of.<\/em>\u201c<\/p>\n<\/blockquote>\n<h2 class=\"wp-block-heading\"><strong>Core skills for programming with Generative AI<\/strong><\/h2>\n<p>Leo and Daniel emphasised that teaching programming with GenAI involves fostering a mix of traditional and AI-specific skills.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"294\" src=\"https:\/\/www.prime-wow.com\/wp-content\/uploads\/2025\/03\/image3-500x294-1.png\" alt=\"Infographic highlighting a workflow when writing software with Copilot.\" class=\"wp-image-89597\" style=\"width:646px;height:auto\" srcset=\"https:\/\/www.prime-wow.com\/wp-content\/uploads\/2025\/03\/image3-500x294-1.png 500w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/image3-300x176.png 300w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/image3-768x451.png 768w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/image3-450x264.png 450w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/image3.png 781w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\"><figcaption class=\"wp-element-caption\">Writing software with GenAI applications, such as Copilot, needs to be approached differently to traditional programming tasks<\/figcaption><\/figure>\n<\/div>\n<p>Their approach centres on six core competencies:<\/p>\n<ul class=\"wp-block-list\">\n<li><strong>Prompting and function design<\/strong>: Students learn to articulate precise prompts for AI tools, honing their ability to describe a function\u2019s purpose, inputs, and outputs, for instance. This clarity improves the output from the AI tool and reinforces students\u2019 understanding of task requirements.<\/li>\n<li><strong>Code reading and selection<\/strong>: AI 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.<\/li>\n<li><strong>Code testing and debugging<\/strong>: Students practise open- and closed-box testing, learning to identify edge cases and debug code using tools like doctest and the VS Code debugger.<\/li>\n<li><strong>Problem decomposition<\/strong>: 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.<\/li>\n<li><strong>Leveraging modules<\/strong>: Students explore new programming domains and identify useful libraries through interactions with Copilot. This prepares them to solve problems efficiently and creatively.<\/li>\n<\/ul>\n<p><strong>Ethical and metacognitive skills<\/strong>: Students engage in discussions about responsible AI use and reflect on the decisions they make when collaborating with AI tools.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"247\" src=\"https:\/\/www.prime-wow.com\/wp-content\/uploads\/2025\/03\/image6-500x247-1.png\" alt=\"Graphic depicting students' confidence levels regarding their programming skills and their use of Generative AI tools.\" class=\"wp-image-89598\" style=\"width:617px;height:auto\" srcset=\"https:\/\/www.prime-wow.com\/wp-content\/uploads\/2025\/03\/image6-500x247-1.png 500w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/image6-300x148.png 300w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/image6-450x222.png 450w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/image6.png 729w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\"><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\"><strong>Adapting assessments for the AI era<\/strong><\/h2>\n<p>The rise of GenAI has prompted educators to rethink how they assess programming skills. In the CS1-LLM course, traditional take-home assignments were de-emphasised in favour of assessments that focused on process and understanding.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"273\" src=\"https:\/\/www.prime-wow.com\/wp-content\/uploads\/2025\/03\/image2-500x273-1.png\" alt=\"Table highlighting the different types of assessments involved in Leo and Daniel's course.\" class=\"wp-image-89599\" style=\"width:583px;height:auto\" srcset=\"https:\/\/www.prime-wow.com\/wp-content\/uploads\/2025\/03\/image2-500x273-1.png 500w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/image2-300x164.png 300w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/image2-450x246.png 450w, https:\/\/www.raspberrypi.org\/app\/uploads\/2025\/03\/image2.png 745w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\"><figcaption class=\"wp-element-caption\">Leo and Daniel chose several types of assessments \u2014 some involved having to complete programming tasks with the help of GenAI tools, while others had to be completed without.<\/figcaption><\/figure>\n<\/div>\n<ul class=\"wp-block-list\">\n<li><strong>Quizzes and exams<\/strong>: Students were evaluated on their ability to read, test, and debug code \u2014 skills critical for working effectively with AI tools. Final exams included both tasks that required independent coding and tasks that required use of Copilot.<\/li>\n<li><strong>Creative projects<\/strong>: Students submitted projects alongside a video explanation of their process, emphasising problem decomposition and testing. This approach highlighted the importance of critical thinking over rote memorisation.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\"><strong>Challenges and lessons learnt<\/strong><\/h2>\n<p>While Leo and Daniel reported that the integration of AI tools into their course has been largely successful, it has also introduced challenges. Surveys revealed that some students felt overly dependent on AI tools, expressing concerns about their ability to code independently. Addressing this will require striking a balance between leveraging AI tools and reinforcing foundational skills.<\/p>\n<p>Additionally, ethical concerns around AI use, such as plagiarism and intellectual property, must be addressed. Leo and Daniel incorporated discussions about these issues into their curriculum to ensure students understand the broader implications of working with AI technologies.<\/p>\n<h2 class=\"wp-block-heading\"><strong>A future-oriented approach<\/strong><\/h2>\n<p>Leo and Daniel\u2019s work demonstrates that GenAI can transform programming education, making it more inclusive, engaging, and relevant. Their course attracted a diverse cohort of students, as well as students traditionally underrepresented in computer science \u2014 52% of the students were female and 66% were not majoring in computer science \u2014 highlighting the potential of AI-powered learning to broaden participation in computer science.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"333\" src=\"https:\/\/www.prime-wow.com\/wp-content\/uploads\/2025\/03\/ICS_Discovery-day-Queen-Mary_6.7.22-09-500x333-1.jpg\" alt=\"A girl in a university computing classroom.\" class=\"wp-image-81586\" srcset=\"https:\/\/www.prime-wow.com\/wp-content\/uploads\/2025\/03\/ICS_Discovery-day-Queen-Mary_6.7.22-09-500x333-1.jpg 500w, https:\/\/www.raspberrypi.org\/app\/uploads\/2022\/10\/ICS_Discovery-day-Queen-Mary_6.7.22-09-300x200.jpg 300w, https:\/\/www.raspberrypi.org\/app\/uploads\/2022\/10\/ICS_Discovery-day-Queen-Mary_6.7.22-09-768x512.jpg 768w, https:\/\/www.raspberrypi.org\/app\/uploads\/2022\/10\/ICS_Discovery-day-Queen-Mary_6.7.22-09-1536x1024.jpg 1536w, https:\/\/www.raspberrypi.org\/app\/uploads\/2022\/10\/ICS_Discovery-day-Queen-Mary_6.7.22-09-800x533.jpg 800w, https:\/\/www.raspberrypi.org\/app\/uploads\/2022\/10\/ICS_Discovery-day-Queen-Mary_6.7.22-09-450x300.jpg 450w, https:\/\/www.raspberrypi.org\/app\/uploads\/2022\/10\/ICS_Discovery-day-Queen-Mary_6.7.22-09-900x600.jpg 900w, https:\/\/www.raspberrypi.org\/app\/uploads\/2022\/10\/ICS_Discovery-day-Queen-Mary_6.7.22-09.jpg 1920w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\"><\/figure>\n<\/div>\n<p>By embracing this shift, educators can prepare students not just to write code but to also think critically, solve real-world problems, and effectively harness the AI innovations shaping the future of technology.<\/p>\n<p>If you\u2019re an educator interested in using GenAI in your teaching, we recommend checking out Leo and Daniel\u2019s book, <a href=\"http:\/\/bit.ly\/CS1-LLM-Book\" target=\"_blank\" rel=\"noreferrer noopener\"><em>Learn AI-Assisted Python Programming<\/em><\/a>, as well as their <a href=\"https:\/\/github.com\/copilotbook\/CS1-LLM\" target=\"_blank\" rel=\"noreferrer noopener\">course resources on GitHub<\/a>. You may also be interested in our own <a href=\"https:\/\/experience-ai.org\/en\" target=\"_blank\" rel=\"noreferrer noopener\">Experience AI resources<\/a>, which are designed to help educators navigate the fast-moving world of AI and machine learning technologies.<\/p>\n<h2 class=\"wp-block-heading\"><strong>Join us at our next online seminar on 11 March<\/strong><\/h2>\n<p>Our 2025 seminar series is exploring how we can teach young people about AI technologies and data science. At our next seminar on Tuesday, 11 March at 17:00\u201318:00 GMT, we\u2019ll hear from Lukas H\u00f6per and Carsten Schulte from Paderborn University. They\u2019ll be discussing how to teach school students about data-driven technologies and how to increase students\u2019 awareness of how data is used in their daily lives.<\/p>\n<p>To sign up and take part in the seminar, click the button below \u2014 we\u2019ll then send you information about joining. We hope to see you there.<\/p>\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-1 wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/form.raspberrypi.org\/f\/research-seminar-sign-up\">I want to join the next seminar<\/a><\/div>\n<\/div>\n<p>The <a href=\"https:\/\/www.raspberrypi.org\/research\/seminars\">schedule of our upcoming seminars<\/a> is online. You can catch up on past seminars on our <a href=\"https:\/\/www.raspberrypi.org\/research\/seminars\/previous\">previous seminars and recordings page<\/a>.<\/p>\n<p>The post <a href=\"https:\/\/www.raspberrypi.org\/blog\/integrating-generative-ai-into-introductory-programming-classes\/\">Integrating generative AI into introductory programming classes<\/a> appeared first on <a href=\"https:\/\/www.raspberrypi.org\/\">Raspberry Pi Foundation<\/a>.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Generative AI (GenAI) tools like GitHub Copilot and ChatGPT are rapidly changing how programming is taught and learnt. These tools can solve assignments with remarkable accuracy. GPT-4, for example, scored an impressive 99.5% on an undergraduate computer science exam, compared &hellip; <a href=\"https:\/\/www.prime-wow.com\/?p=1237395\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[72,77,110],"tags":[],"class_list":["post-1237395","post","type-post","status-publish","format-standard","hentry","category-linux","category-rpi","category-unfiltered-rss"],"_links":{"self":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/posts\/1237395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1237395"}],"version-history":[{"count":0,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/posts\/1237395\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1237395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1237395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1237395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}