人工智能代码生成在计算机学科编程教学中的利弊探讨
Discussion on the Advantages and Disadvantages of AI Code Generation in Computer Programming Teaching
摘要: 以大语言模型为基础的人工智能(Artificial Intelligence, AI)代码生成工具正在飞速进入C语言程序设计、Java语言程序设计、数据结构与算法等计算机学科核心编程课程的教学过程中。学生可以通过自然语言描述快速获得代码、错误解释与修改建议,教师也可以利用相关工具生成示例、练习和反馈。人工智能代码生成由此极大降低了编程学习和实践的操作门槛,但同时也模糊了完成代码与掌握编程之间的区别,给计算机学科编程教学带来了明显的冲击和变化。本文结合计算机学科编程教学特点及作者近几年课程教学过程和成绩资料,对人工智能代码生成的教学收益和潜在风险等利弊进行讨论。作者讲授的北京邮电大学2022~2026年计算机相关编程学科成绩显示,在平时作业可接触人工智能、期末考试禁用人工智能的教学情境中,平时成绩与期末成绩存在明显落差。这一现象不能直接证明人工智能造成了学生能力下降,却提示以最终代码为主的平时评价中人工智能并没有完全助力大部分学生良好地掌握独立编程能力。本文认为,人工智能代码生成的主要价值在于提供及时示例、解释和反馈,节省一些不必要的简单重复过程以提高效率,主要风险则在于学生把问题分析、算法设计、代码阅读和调试等认知活动一并交给工具,实际动手能力练习培养某种程度上有所下降,利弊共存。因此,计算机学科编程教学中不宜简单禁止或放任人工智能,而应把它限定为可质疑、可验证的辅助工具,但同时保留必要的独立思考和脱离人工智能完成任务的机会。
Abstract: Artificial Intelligence (AI) code generation tools based on Large Language Model are rapidly entering the teaching process of core programming courses in computer science, such as C programming, Java programming, data structures and algorithms. Students can quickly obtain code, error explanations, and modification suggestions through natural language descriptions, while teachers can also use related tools to generate examples, exercises, and feedback. AI code generation has thus greatly lowered the operational threshold for programming learning and practice. However, it has also blurred the distinction between completing code and mastering programming, bringing significant impacts and changes to computer science programming teaching. This paper discusses the advantages and disadvantages of AI code generation, including its teaching benefits and potential risks, based on the characteristics of computer science programming teaching and the author’s teaching process and examination data in recent years. The author’s teaching examination data for related computer programming courses at Beijing University of Posts and Telecommunications from 2022 to 2026 shows a significant gap between regular performance and final examination scores in a teaching scenario where AI is accessible during regular assignments but prohibited during final exams. This phenomenon does not directly prove that AI has caused a decline in student abilities, but it suggests that AI does not fully assist most students in mastering independent programming skills in regular evaluations based primarily on final code. This paper argues that the main value of AI code generation lies in providing timely examples, explanations, and feedback, saving some unnecessary simple repetitive processes to improve efficiency. The main risk lies in students handing over cognitive activities such as problem analysis, algorithm design, code reading, and debugging to tools, which to some extent reduces the cultivation of practical skills. Therefore, in computer science programming teaching, it is not appropriate to simply prohibit or allow AI unchecked. Instead, it should be limited to a questionable and verifiable auxiliary tool, while retaining the opportunity for necessary independent thinking and completing tasks without AI.
参考文献
|
[1]
|
朱永新, 杨帆. ChatGPT/生成式人工智能与教育创新: 机遇、挑战以及未来[J]. 华东师范大学学报(教育科学版), 2023, 41(7): 1-14.
|
|
[2]
|
杨宗凯, 王俊, 吴砥, 陈旭. ChatGPT/生成式人工智能对教育的影响探析及应对策略[J]. 华东师范大学学报(教育科学版), 2023, 41(7): 26-35.
|
|
[3]
|
卢宇, 余京蕾, 陈鹏鹤, 李沐云. 生成式人工智能的教育应用与展望——以ChatGPT系统为例[J]. 中国远程教育, 2023, 43(4): 24-31, 51.
|
|
[4]
|
沈书生, 祝智庭. ChatGPT类产品: 内在机制及其对学习评价的影响[J]. 中国远程教育, 2023, 43(4): 8-15.
|
|
[5]
|
王佑镁, 王旦, 梁炜怡, 柳晨晨. “阿拉丁神灯”还是“潘多拉魔盒”: ChatGPT教育应用的潜能与风险[J]. 现代远程教育研究, 2023, 35(2): 48-56.
|
|
[6]
|
周洪宇, 李宇阳. ChatGPT对教育生态的冲击及应对策略[J]. 新疆师范大学学报(哲学社会科学版), 2023, 44(4): 134-144.
|
|
[7]
|
张红卓, 周小宝, 许玉焕, 杨婧. 生成式人工智能赋能计算机程序设计类课程教学创新[J]. 计算机教育, 2024(7): 44-48.
|
|
[8]
|
高洪皓, 陈章进. 人工智能赋能程序设计课程教学改革[J]. 计算机教育, 2024(7): 41-43, 48.
|
|
[9]
|
赵璐, 蔡惠, 王烟濛, 周剑. 生成式人工智能赋能程序设计课程教学研究[J]. 大学教育, 2025(8): 33-39.
|
|
[10]
|
翟雪松, 张丽洁, 夏亮亮, 徐鑫, 朱强. 基于GAI的逆向工程教学思维在人机协作中的应用研究——以编程教育为例[J]. 电化教育研究, 2024, 45(9): 61-68.
|
|
[11]
|
苏小红, 苗启广, 陈文宇. 基于AI赋能和产教融合提升程序设计能力的个性教学模式[J]. 中国大学教学, 2023(6): 4-9.
|
|
[12]
|
周玲, 王烽. 生成式人工智能的教育启示: 让每个人成为他自己[J]. 中国电化教育, 2023(5): 9-14.
|