CogSci 2026

•

•

Rio de Janeiro, Brazil

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.

Next from CogSci 2026

Comparing the Likelihood of Producing Distant Analogs Through Retrieval versus Invention

Comparing the Likelihood of Producing Distant Analogs Through Retrieval versus Invention

CogSci 2026

Luciana Ceccacci Sawicki and 2 other authors

Similar lecture