Work

One Line at a Time: Scaffolding Reflective Code Evaluation through Structured AI Assistance

Year: 2026
Type: conference-paper
Abstract: Generative AI tools such as GitHub Copilot are very effective at producing functional code for many introductory programming tasks, which in turn is impacting how students learn to program. While such tools provide some clear benefits, including offering on-demand explanations, feedback, and debugging support, they also risk reducing students’ engagement in critical evaluation and problem-solving, particularly when AI solutions can be accepted uncritically. Appropriate scaffolding may be effective in slowing down this process and promoting deliberate reasoning. Drawing inspiration from structured activities such as Parsons Problems, and building on recent ideas for quizzing students in real-time as code solutions are being built, we introduce AI Assist Problems, a tool that supports reflective code evaluation by requiring students to generate, review, and accept AI-suggested code one line at a time. While the tool constrains how code is built, it does not constrain what code can be written, allowing students to explore multiple valid pathways and produce diverse final solutions. We deployed this tool in a large first-year programming course (n = 996) and examined student interactions and perceptions, and the diversity of resulting code solutions. We found that greater exploration of AI suggestions predicts higher decision accuracy, and students’ belief in the need to carefully review AI-generated code increased after use. We discuss how structured AI assistance can encourage reflection and critical evaluation as code-generation tools become an integral part of programming education.
Language: English
Open Access status: hybrid
OpenAlex ID: W7137308352
FWCI: 15.86
Cites: 34
Cited by: 4
Related to: 10