🤖 AI Summary
In the era of generative artificial intelligence (GenAI), novice programmers often rely on direct code outputs, which can undermine their reasoning abilities. This work proposes an example-based scaffolding approach that leverages GenAI to generate differentiated examples—aligned with the target task in underlying reasoning structure but distinct in context—to foster analogical transfer and discourage verbatim copying. We introduce a two-dimensional taxonomy for example design along with generation guidelines, and implement a prototype system, CodeExemplar, integrating automated scoring and formative feedback. Preliminary classroom trials and teacher interviews indicate that this method effectively supports students’ conceptual understanding and reduces direct code replication, offering a viable pathway for harnessing GenAI to enhance programming education.
📝 Abstract
Generative AI (GenAI) can generate working code with minimal effort, creating a tension in introductory programming: students need timely help, yet direct solutions invite copying and can short-circuit reasoning. To address this, we propose example-based scaffolding, where GenAI provides scaffold examples that match a target task's underlying reasoning pattern but differ in contexts to support analogical transfer while reducing copying. We contribute a two-dimensional taxonomy, design guidelines, and CodeExemplar, a prototype integrated with auto-graded tasks, with initial formative feedback from a classroom pilot and instructor interviews.