With the rapid development of modern technology and information technology, programming has become a cultural literacy, and its importance is increasingly prominent. However, current computer programming courses often face issues such as fixed and monotonous teaching content, disconnection between theory and practice, and lack of practical innovation. The emergence of Generative Artificial Intelligence (GAI) technology has brought new opportunities and transformative potential for the innovation of programming courses. Many scholars in China have begun to explore how to integrate generative AI technology into programming courses. Literature [1] proposes a blended teaching model based on the Baidu AI platform called “dual-line three-level”. Literature [2] discusses the reform of programming course teaching based on learning communities. To adapt to the rapidly changing technology and students’ learning needs, improve teaching effectiveness, and cultivate students’ innovative abilities, it is necessary to study how generative AI technology can empower the innovation of computer programming courses.
1 Generative Artificial Intelligence and Its Educational Application Potential
Generative Artificial Intelligence is an AI technology that autonomously learns from a large amount of existing data through algorithms and models to quickly generate various types of original content, including text, images, sounds, videos, and code. Common large model products include ChatGPT, Google Bard, iFlytek Spark, Wenxin Yiyan, Claude, etc., which mainly possess capabilities such as text generation, language understanding, knowledge Q&A, logical reasoning, mathematical problem-solving, coding ability, and multimodal interaction. Literature [3] believes that generative AI has the potential to empower teaching innovation, enhancing the completion and creativity of teaching outcomes, and supporting generative and personalized feedback and evaluation in teaching. Literature [4] suggests that generative AI will promote transformations in the relationships among educational subjects, smart upgrades of educational environments, innovations in educational resource supply, reshaping of intelligent teaching methods, reforms in evaluation concepts and methods, and governance of intelligent education ethics, aiding the reconstruction of human education and learning forms. Literature [5] states that generative AI empowers vocational education with new roles such as intelligent assistant, teaching aide, personalized butler, quality evaluator, and school-enterprise connector. Generative AI brings innovation and transformation to education with its powerful data processing, analysis, and generation capabilities.
Generative AI supports personalized learning, analyzing large amounts of learning data to accurately identify students’ learning characteristics, needs, knowledge blind spots, weaknesses, learning progress, and interests, providing each student with customized learning paths and resources. Generative AI offers real-time intelligent Q&A, quickly understanding user questions and generating concise and accurate answers, with strong real-time response and interactive Q&A capabilities that continuously optimize its answer accuracy. Generative AI generates learning content resources by learning a large number of learning resources and their structures, content, and styles, thus autonomously creating new, high-quality, personalized, and diverse learning resources (materials, courses, question banks, recommendations). Generative AI can intelligently evaluate and predict, predicting the types of content users may like based on historical data, generating or recommending content that better aligns with user preferences. With its significant advantages of intelligence and convenience, generative AI changes the traditional arduous and heavy labor landscape, playing an increasingly important role in the field of education.
2 Current Status and Challenges of Computer Programming Courses
Programming is a specialized course in computer science, aimed at cultivating students’ computational thinking, programming skills, and problem-solving abilities. It involves a process of providing solutions to specific problems, mainly consisting of analysis, design, coding, testing, and debugging stages. Programming uses specific programming languages as tools, such as C, C++, Java, Python, JavaScript, PHP, ASP, JSP, etc. Currently, programming courses face several new challenges, such as rapid updates of teaching content, meeting individual student needs, and fostering programming thinking and practical skills, which affect learning interest, teaching effectiveness, and capability development.
2.1 Classified and Layered Teaching
In programming, students have significant differences in their foundational knowledge; some already have programming basics, while others start from scratch. In light of these differences in foundation and ability, teachers need to implement effective classified and layered teaching to leverage each student’s strengths and better cultivate innovative capabilities.
2.2 Insufficient Practical Skills
Programming courses require a unity of theory and practice. Issues such as disconnection between theory and practice, overly abstract theory, insufficient practical experience, and lack of specific guidance in practice hinder the cultivation of students’ hands-on abilities and actual problem-solving skills.
2.3 Rapid Knowledge Updates
The development of computer technology is very rapid, with new languages, tools, ideas, and architectures constantly emerging. The content of programming courses is often not updated in a timely manner, severely lagging behind technological advancements, leading to students learning outdated knowledge that is somewhat disconnected from industry frontiers.
2.4 Lack of Thinking Cultivation
Programming thinking emphasizes logical thinking, problem-solving, and innovation capabilities. Due to various reasons such as a focus on theoretical knowledge transmission, grammar rule learning, singular teaching methods, insufficient practical opportunities, and lack of programming challenges, the cultivation of programming thinking is inadequate.
3 Strategies for Empowering Programming Course Teaching with Generative AI
The integration of artificial intelligence in teaching has formed a triadic structure of teacher-student-machine, and the harmonious coexistence of humans and machines is a widely recognized consensus in the industry. This symbiotic partnership can unleash greater potential than relying solely on humans or machines. By combining the educational potential of generative AI with the challenges of programming teaching, four major strategies have been proposed to form a human-machine symbiotic model, as shown in Figure 1. The educational potential of GAI can help teachers and students better address the challenges of programming teaching, while these challenges can stimulate the potential of GAI. The potential of GAI better supports innovative teaching strategies in programming, which fully explores the potential of GAI. Innovative teaching strategies in programming can effectively overcome and resolve teaching challenges, while teaching challenges test and improve innovative teaching strategies in programming.

The programming capabilities of generative artificial intelligence provide limitless possibilities for the innovation of programming course teaching. It offers personalized, efficient, and intelligent learning experiences for programming courses, meeting the diverse needs of students and their career development goals. It also builds effective assessment and feedback systems to help students identify problems and improve their programming skills in a timely manner, enhancing students’ interest in programming, self-learning abilities, and innovative thinking capabilities.
The programming capabilities of generative artificial intelligence provide strong support for the innovation of programming course teaching. By applying strategies such as intelligent assisted teaching, automated code generation, intelligent code assessment, interactive programming teaching, project-based learning, and real-time collaboration and discussion, the quality of programming course teaching can be improved, better cultivating students’ programming abilities and problem-solving skills, and better meeting students’ learning needs and industry development requirements, thus contributing more significantly to the development of the field of computer science.
3.1 Build Intelligent Teaching Platforms for Personalized Learning
To better address students’ foundational differences, it is necessary to fully utilize generative AI to construct intelligent teaching platforms, optimize the allocation of teaching resources, and provide personalized teaching services to implement classified and layered teaching, enabling personalized and autonomous learning. Additionally, technologies such as virtual reality, augmented reality, and natural language processing can be integrated to provide more enriching methods and immersive experiences for programming teaching, promoting course reform and innovation.
(1) Personalized Learning Experience: Generative AI can create customized and personalized learning paths and teaching resources for students based on their learning data and behaviors (learning styles, interests, and abilities), meeting the diverse learning needs of students, enabling flexible adaptive and personalized learning, and helping to stimulate learning interest and enhance motivation for enjoyable learning. It can also intelligently recommend programming exercises of corresponding difficulty based on learning progress and ability, providing personalized tutoring and real-time feedback to help students learn programming knowledge more efficiently.
(2) Intelligent Tutoring and Feedback: Generative AI can automatically analyze students’ code, providing real-time syntax checks, error prompts, and optimization suggestions. This helps students identify and correct problems while coding, thus improving programming efficiency and quality.
(3) Autonomous Learning and Exploration: Generative AI can provide students with a wealth of programming examples, exercises, and case studies, helping them consolidate and expand their knowledge through practice. Students can autonomously complete programming tasks under AI guidance, explore different solutions, and share and discuss experiences with other students.
(4) Intelligent Assessment and Performance Prediction: Generative AI can automatically evaluate students’ programming works and performances, providing objective and accurate feedback on grades, while also analyzing students’ programming abilities and potentials, offering personalized learning suggestions and development pathways.
3.2 Introduce Project-Based Learning, Strengthening Practical Operations and Feedback
Strengthening the integration of theory and practice through project-based learning, case analysis, and other methods to apply theoretical knowledge in practice, improving students’ learning effectiveness and capabilities.
(1) Design Meaningful Tasks: In conjunction with generative AI technology, design project tasks with real significance, applying learned programming knowledge in actual contexts, learning and mastering related knowledge during project completion. These project tasks can simulate real-world problems, stimulating students’ learning interest and motivation.
(2) Strengthen Practical Operation Skills: By providing more practical opportunities through AI-simulated practice environments, students can master knowledge and skills through actual operations, enhancing their practical operation capabilities. Increase the weight of practical operations in teaching, allowing students to experience and apply programming thinking in actual coding.
(3) Interactive Learning Environment: Integrate generative AI with interactive programming platforms and sandbox environments, helping students test and code in real-time. This allows students to freely try and experiment with programming code without worrying about errors causing program and environment crashes.
3.3 Generate Multi-Source Learning Materials, Continuously Update Teaching Content
Generating multi-source learning materials and continuously updating teaching content is an important strategy to ensure educational quality and keep pace with technological developments, especially in the rapidly evolving IT field. By integrating various resources, utilizing AI learning resources, and dynamically generating and updating course content through real-time interactions and discussions, we can focus on the dynamic developments in technology, providing students with the latest and most convenient programming education.
(1) Integrate Various Resources: Obtain high-quality courses from online course platforms (Coursera, edX, Udemy, Xueyin Online, College MOOC, Smart Vocational Education) as reference materials; acquire the latest programming knowledge and trends from professional websites and blogs in the programming field (technical articles); understand the latest findings from academia and research institutions through academic papers and technical reports; directly engage with the latest technologies and applications from open-source community projects (e.g., GitHub), learning practical programming skills and teamwork experiences; invite industry experts to give lectures sharing the latest industry cases and technological trends, bringing cutting-edge industrial knowledge into the classroom; and use content curation tools (e.g., Feedly, Inoreader) to aggregate and organize learning materials from multiple sources to keep knowledge fresh.
(2) Generate Learning Resources: Utilize AI to track technological trends, updating teaching content in a timely manner to ensure the advanced and practical nature of course content. Based on learning progress and interests, intelligently recommend suitable learning materials, utilizing artificial intelligence to monitor the latest developments in programming and automatically update teaching content, customizing personalized learning paths and resources based on students’ abilities and needs, providing access to the latest programming knowledge to broaden perspectives, and generating programming cases and exercises to consolidate programming skills, helping teachers quickly generate teaching resources (courseware, exam papers, etc.), reducing teachers’ workload.
(3) Real-Time Interaction and Discussion: Utilize online forums, virtual teaching research rooms, and communities for real-time interaction and discussion between teachers and students, providing ongoing professional development opportunities to master the latest programming knowledge and skills. The real-time Q&A and tutoring functions of generative AI can help students resolve various problems encountered during programming at any time. Additionally, regularly review teaching content and update it based on student feedback and technological trends.
3.4 Overcoming Syntax Challenges, Focusing on Cultivating Programming Thinking
In programming learning, syntax is often an important foundation, but excessive focus on syntax can hinder the cultivation of students’ programming thinking. Generative artificial intelligence can automatically analyze students’ code, providing real-time syntax checks, error prompts, and optimization suggestions, helping students free themselves from cumbersome syntax learning and focus on training and cultivating programming thinking, making students pay more attention to the essence and logic of programming.
(1) Code Generation and Suggestions: Utilizing AI code completion tools can provide syntax suggestions and auto-completion features while students write code, reducing syntax errors and allowing students to focus more on the logic of problem-solving. Generative AI can automatically generate corresponding code snippets based on students’ programming needs and specifications, enabling students to modify the snippets to improve programming efficiency and ability. Students can also compare the generated code with their own to enhance programming techniques and styles. By mapping complex programming syntax to more easily understandable abstract concepts, students can grasp programming logic without directly dealing with specific syntax. Providing higher-level programming environments or tools allows students to program at a higher level of abstraction, reducing focus on low-level syntax details.
(2) Interactive Programming Teaching: Create an interactive programming teaching environment, allowing students to practice in a convenient programming environment, deeply understanding programming concepts and logical thinking through practice, enhancing programming abilities and skills. Support real-time collaboration and discussion among students. Collaborative coding, sharing experiences, and discussing problems help cultivate students’ teamwork and communication skills. Generative AI can analyze students’ code, provide feedback and suggestions, and adjust teaching content and difficulty based on students’ learning progress and performance, making teaching more efficient and targeted.
(3) Diverse Teaching Methods: Employ diverse teaching methods such as heuristic, discussion-based, and inquiry-based methods to stimulate students’ learning interest and initiative, helping them understand and master programming thinking. When encountering problems during experiments, generative AI can provide targeted error prompts and guidance. Encourage students to design their own algorithms and evaluate and optimize their algorithms using analysis tools provided by generative AI.
(4) Challenging Programming Tasks: Create problem-oriented challenging learning tasks that allow students to exercise programming thinking and problem-solving abilities through addressing real or simulated problems. This stimulates students’ interest and motivation, prompting them to think deeply and explore. Provide a series of programming cases for students to analyze and understand the code logic within those cases, helping to establish programming thinking.
4 Empirical Research and Conclusion
In the field of education, generative AI can serve as a teaching assistant tool, answering professional academic questions, building autonomous learning platforms, saving human resource costs, and restructuring educational frameworks, providing new opportunities for educational innovation. The teaching innovation strategies and methods based on generative AI have been practically validated in the Python programming course. In our school, an experiment was conducted over 4 months with two large groups of students (32 each) from the 2022 cohort. Prior to the experiment, students’ computer skills were uniformly tested and divided into two groups based on their scores. The experimental group adopted a generative AI-assisted teaching model, while the control group used a normal operation teaching model. The pre-test revealed no significant differences between the experimental and control groups, indicating equal starting knowledge, making the experiment feasible.
The experiment found significant differences in post-test scores, work quality, and capabilities between the experimental and control groups. Research shows that generative AI provides strong technical support for teaching innovation in computer programming courses, with significant effects on assisted teaching. Strategies and methods such as personalized learning, project-based learning, generating multi-source learning materials, and focusing on cultivating programming thinking can significantly improve students’ learning outcomes, meet personalized needs, and cultivate practical skills, programming thinking, and innovative abilities. The research also found that attention should be paid to information security and privacy, dependency issues, and tool limitations. If students overly rely on intelligent tools, it may lead to a decline in their independent thinking and problem-solving abilities. Therefore, students need to maintain independent thinking when using these tools, treating intelligent tools as aids rather than replacements, and adopting corresponding strategies to ensure the healthy development and effective utilization of technology.
[1] Wang Fang, Li Xuanya, Li Chunke, et al. Exploration of Blended Teaching in Programming Courses Based on Baidu AI Platform[J]. Computer Education, 2022(10): 36-40.
[2] Wei Ying. Reform of Programming Course Teaching Based on Learning Communities[J]. Computer Education, 2024(2): 37-41.
[3] Wang Youmei, Wang Dan, Liang Wei Yi, et al. “Aladdin’s Lamp” or “Pandora’s Box”: The Potential and Risks of ChatGPT in Education[J]. Modern Distance Education Research, 2023, 35(2): 48-56.
[4] Liu Bangqi, Nie Xiaolin. Generative Artificial Intelligence and the Reshaping of Future Educational Forms: Technical Framework, Capability Characteristics, and Application Trends[J]. Research on Educational Technology, 2024, 45(1): 13-20.[5] Wang Youmei, Wang Haijie, Wang Dan, et al. The Multiple Roles and Practical Paths of ChatGPT in Empowering the Digital Transformation of Vocational Education[J]. Research on Educational Technology, 2024, 45(1): 76-83.
[6] Zhu Yongxin, Yang Fan. ChatGPT/Generative Artificial Intelligence and Educational Innovation: Opportunities, Challenges, and the Future[J]. Journal of East China Normal University (Education Science Edition), 2023, 41(7):1-14
Funding Projects:2024 Gansu Provincial Higher Education Innovation Fund Project “Research on the Reform of Programming Courses Empowered by Generative AI” (2024B-351); 2023 Gansu Provincial Higher Education Innovation Fund Project “Research on Intelligent Assessment of Multimodal Learning Input Empowered by Artificial Intelligence” (2023B-359); Gansu Provincial Education Science “14th Five-Year Plan” 2023 Annual Topic “High-Quality Development and Governance of Smart Campus Under the Background of Educational Digital Transformation”
Author Information: Zhang Hongzhuo, Male, Lecturer at Gansu Electromechanical Vocational Technical College, research interests include information technology in vocational education, applications of artificial intelligence in education, cybersecurity and data security, [email protected]; Zhou Xiaobao (corresponding author), Male, Associate Professor at Gansu Electromechanical Vocational Technical College, research interests include computer programming, [email protected].