Learning programming from erroneous worked-examples. Which type of error is beneficial for learning? - Beege, Maik; Schneider, Sascha; Nebel, Steve; Zimm, Justus; Windisch, Sarah; Rey, Günter Daniel (Learning and instruction, 2021)
Learning from erroneous worked examples could enhance learning in contrast to problem-solving tasks. The type of error was hypothesized to be a moderator and accuracy of error detection and correction a mediator of this effect. This study examines the influence of simple syntactic (the structure of the code) and complex semantic (the logic or content of the code) errors in a programming scenario. Overall, 128 students were assigned to a two (syntactic errors: yes vs. no) × two (semantic errors: yes vs. no) factorial between-subjects design. Students’ accuracy in error detection and correction, learning performance, mental load, and mental effort were measured. Results showed that learners receiving syntactic errors detected and corrected errors with higher accuracy which leads to higher learning performance. Semantic errors did not influence learning-related variables since semantic errors were too difficult for novice learners to detect and fix. The postulated moderation and mediation could be supported. •Different types of errors in worked-examples have different effects on learning processes of novices.•Syntactic errors are corrected with a comparably high accuracy by novice learners.•When correctly adjusted, syntactic errors lowered mental load and improved learning.•Semantic errors are rarely detected and had no influence on mental load and learning.