Enhancing programming learning in elementary school students through pair programming scripts based on productive failure theory
摘要
Current programming education in elementary schools faces a critical challenge: students frequently encounter algorithmic failures but lack the problem-solving abilities and efficient collaboration skills to extract meaningful insights from these impasses. To address this, this study theoretically integrates Productive Failure (PF) theory, a seminal framework on learning from failures, with collaboration scripts theory. We developed and refined platform-embedded pair programming scripts to foster a “socio-emotional supportive environment” for elementary students facing cognitive impasses. We conducted a small-scale, exploratory Design-Based Research (DBR) encompassing three iterative cycles. Participants comprised 14 fourth-grade students (7 pairs) selected via purposive and stratified sampling based on prior computational interest and basic programming experience. Utilizing a convergent mixed-methods design, the study triangulated quantitative artifact scores, qualitative Lag Sequential Analysis (LSA) of collaborative dialogues, and self-reported emotional trajectories. The results demonstrated a statistically significant improvement in programming artifact quality from Cycle 1 to Cycle 3 (p = .041, Cohen’s d = 0.606). Furthermore, LSA revealed that the optimized epistemic scripts successfully shifted peer interactions from superficial agreements to deep dual cyclic argumentation, safely activating the four core mechanisms of PF without inducing catastrophic cognitive overload. Concurrently, students exhibited a V-shaped recovery in failure attitude, ultimately fostering genuine failure resilience. While role-switching friction persisted under rigid temporal constraints, we propose a subtask-boundary-based switching rule—triggering role transitions at natural cognitive breakpoints rather than fixed temporal intervals—to preserve learners’ cognitive flow in future implementations.