AI code generators like OpenAI Codex have the potential to assist novice programmers by generating code from natural language descriptions, however, over-reliance might negatively impact learning and retention. To explore the implications that AI code generators have on introductory programming, we conducted a controlled experiment with 69 novices (ages 10-17). Learners worked on 45 Python code-authoring tasks, for which half of the learners had access to Codex, each followed by a code-modification task. Our results show that using Codex significantly increased code-authoring performance (1.15x increased completion rate and 1.8x higher scores) while not decreasing performance on manual code-modification tasks. Additionally, learners with access to Codex during the training phase performed slightly better on the evaluation post-tests conducted one week later, although this difference did not reach statistical significance. Of interest, learners with higher Scratch pre-test scores performed significantly better on retention post-tests, if they had prior access to Codex.
翻译:OpenAI Codex等AI 代码生成器有可能通过生成自然语言描述的代码来帮助新编程序员,但是,过度依赖可能会对学习和保留产生负面影响。为了探讨AI 代码生成器对介绍性方案编制的影响,我们与69个新手(10-17岁)进行了受控实验;学员们开展了45项Python代码编写任务,半数学员可以使用代码编码,每个学习者可以使用代码编码,然后是代码编纂任务。我们的结果显示,使用代码编码会大大提高代码起草的性能(1.15x更高的完成率和1.8x更高的分数),同时不会降低人工代码编纂任务的性能。此外,在培训阶段使用代码编码的学习者,在一周后进行的评估测试后,虽然这一差异没有达到统计意义,但使用代码编码的学习者在保留后测试后取得高级Scratch预测试分数的学生,如果事先有机会使用代码编码的话,其成绩要好得多。