Less Talk, More Code: Practice-Based Instruction Improves Programming Skill Acquisition
Discuss this preprint
Start a discussion What are Sciety discussions?Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
Introductory computer science education often emphasizes watching experts write and explain code. We investigate whether practice-based instruction improves programming skills relative to traditional lectures and which features of practice make it effective. In this preregistered experiment (N = 250), we compared three approaches for an introductory programming lesson: watching a video, code tracing visualizations, and writing code with immediate, AI-generated feedback. Participants who engaged in practice-based instruction performed significantly better than those who watched the video on a novel code-generation test, with the highest performance among learners who practiced writing code. Practice-based instruction also resulted in reduced distraction and increased interest. Whereas video and code tracing conditions led to overconfidence about programming abilities, code writing led to underconfident self-assessments. These findings suggest that active practice, particularly generative practice with feedback, supports learning with advantages in cognitive processing, metacognition, and interest in programming.