Research indexRCT
Teaching Algorithms and Data Structures with a Test-Driven Development Framework
任骆一
International Conference on Machine Intelligence and Digital Applications (MIDA)24 Apr 2026Open access
NobleIDark:/48914/w1/20261105/836C9A23DOI10.1145/3801438.3802324
Teaching Algorithms and Data Structures with a Test-Driven Development Framework
任骆一 · International Conference on Machine Intelligence and Digital Applications (MIDA) · 2026
NobleIDark:/48914/w1/20261105/836C9A23DOI10.1145/3801438.3802324
Free to read at the publisher
You can read the abstract here, or the full text at the publisher.
Abstract
Data Structures education faces a fundamental challenge in bridging theoretical knowledge with practical implementation, where students' cognitive overload in testing environments often hinders successful coding outcomes. This study introduces an AI-enhanced, scaffolded Test-Driven Development (AI-TDD) framework that integrates: (1) 12 industry-grade test patterns for cognitive decoupling, (2) a Red-Green-Refactor learning cycle with real-time feedback, and (3) LLM (Large Language Model)-powered dynamic test generation and debugging assistance (DeepDebug integration). In a Stanford RCT (N=100), the framework reduced defect density by 52.9% (p<0.01) and increased test coverage by 15.6%, while longitudinal deployment in Chengdu (N=235 across 3 cohorts) achieved an 89.4% pass rate (22.2% improvement) with 62.5% faster debugging. NASA-TLX measurements confirmed 43% cognitive load reduction. AI augmentation further enhanced performance: LLM-generated tests demonstrated a 3.7× improvement in creation efficiency, and DeepDebug achieved 92.4% error diagnosis accuracy, cutting average debugging time to 5.2 minutes. The framework not only addresses the industry-academia gap through structured testing scaffolds but also demonstrates the transformative potential of AI in programming education: its adaptive test generation (boundary case coverage +37%) and personalized debugging hints establish a new intelligent pedagogy standard. Implemented via GitHub Classroom with YAML configuration, this solution offers educators a scalable approach to cultivate both algorithmic thinking and professional verification skills, with open-source adoption already impacting 1,200+ students globally. Future work will explore RL-based difficulty adaptation for MOOC-scale deployment.