TY - JOUR
T1 - How block-based programming supports novice learners’ coding comprehension
T2 - Evidence from eye-tracking lag-sequential analysis
AU - Tsai, Meng Jung
AU - Chien, Francis Pingfan
AU - Sun, Wan Ting
AU - Jha, Nitesh Kumar
N1 - Publisher Copyright:
© 2025 Elsevier Ltd
PY - 2025/12
Y1 - 2025/12
N2 - Understanding how novice programmers interact with block-based and text-based programming languages can help optimize instructional approaches and facilitate the transition between the two. This study investigated the coding comprehension and visual behavior patterns of 70 novice college students as they engaged in Scratch (block-based) and Python (text-based) programming tasks. Tobii 4C eye-trackers, the Real Gaze software, and the WEDA platform were utilized to record eye movements, compute eye-tracking metrics, generate heat maps, and conduct lag sequential analyses (LSA). The results revealed that students in the Scratch group demonstrated better comprehension performance, with shorter response times, shorter average fixation duration, and longer average saccade lengths. The findings suggest that block-based environments reduce cognitive load and enhance code readability. In contrast, students in the Python group paid more attention to irrelevant information and reprocessed procedural code more frequently, indicating a higher mental load and greater cognitive demands associated with text-based programming. Furthermore, the LSA results indicated that students in the Scratch group exhibited meaningful shifts in visual attention, moving from irrelevant information to relevant variable recalls during the coding comprehension tasks. The findings confirm the effectiveness of block-based programming in terms of enhancing novice learners' coding comprehension, and underline the importance of providing visual scaffolding in text-based programming to facilitate the transition from block-based environments. Through the application of advanced eye-tracking methodology, this study makes a substantial contribution to programming education by uncovering critical insights into learners’ cognitive processes and offering evidence to guide future research and pedagogical innovation.
AB - Understanding how novice programmers interact with block-based and text-based programming languages can help optimize instructional approaches and facilitate the transition between the two. This study investigated the coding comprehension and visual behavior patterns of 70 novice college students as they engaged in Scratch (block-based) and Python (text-based) programming tasks. Tobii 4C eye-trackers, the Real Gaze software, and the WEDA platform were utilized to record eye movements, compute eye-tracking metrics, generate heat maps, and conduct lag sequential analyses (LSA). The results revealed that students in the Scratch group demonstrated better comprehension performance, with shorter response times, shorter average fixation duration, and longer average saccade lengths. The findings suggest that block-based environments reduce cognitive load and enhance code readability. In contrast, students in the Python group paid more attention to irrelevant information and reprocessed procedural code more frequently, indicating a higher mental load and greater cognitive demands associated with text-based programming. Furthermore, the LSA results indicated that students in the Scratch group exhibited meaningful shifts in visual attention, moving from irrelevant information to relevant variable recalls during the coding comprehension tasks. The findings confirm the effectiveness of block-based programming in terms of enhancing novice learners' coding comprehension, and underline the importance of providing visual scaffolding in text-based programming to facilitate the transition from block-based environments. Through the application of advanced eye-tracking methodology, this study makes a substantial contribution to programming education by uncovering critical insights into learners’ cognitive processes and offering evidence to guide future research and pedagogical innovation.
KW - Applications in subject areas
KW - Eye-tracking lag-sequential analysis
KW - Human-computer interface
KW - Programming comprehension
KW - Teaching/learning strategies
UR - https://www.scopus.com/pages/publications/105012715591
UR - https://www.scopus.com/pages/publications/105012715591#tab=citedBy
U2 - 10.1016/j.compedu.2025.105430
DO - 10.1016/j.compedu.2025.105430
M3 - Article
AN - SCOPUS:105012715591
SN - 0360-1315
VL - 239
JO - Computers and Education
JF - Computers and Education
M1 - 105430
ER -