From "Wheel-Spinning" to "Productive Failure": Research on LLM-based Hierarchical Scaffolding Mechanism in Programming Education

Authors

  • Xinyun Wang East China Normal University
  • Bo Jiang East China Normal University

Keywords:

Generative AI, Programming Education, Productive Failure, Intelligent Tutoring System, Hierarchical Scaffolding

Abstract

Generative AI (GenAI) significantly lowers the entry
barrier for programming but poses the risk of cognitive
offloading, where novices outsource essential reasoning
processes to algorithms. To reconcile the conflict between
AI assistance and the necessity of productive struggle,
this study proposes an LLM-based hierarchical tutoring
mechanism integrated into an Online Judge (OJ) system. The
system features a five-level scaffolding strategyranging
from metacognitive prompts to direct coachingand an
active/passive dual-mode intervention designed to prevent
"wheel-spinning". A quasi-experimental study with 25
undergraduate students demonstrated that the experimental
group achieved significantly higher scores compared to the
control group. Process analysis showed that the
experimental group exhibited faster iteration cycles and a
higher rate of ineffective attempts, which functioned as a
"submission-as-interaction" strategy to trigger specific AI
feedback. These findings indicate that constraining LLM
output through hierarchical scaffolding effectively
facilitates the transformation from unproductive failure to
productive learning.

Downloads

Published

2026-06-03