How block-based programming supports novice learners’ coding comprehension: Evidence from eye-tracking lag-sequential analysis

  • Meng Jung Tsai*
  • , Francis Pingfan Chien
  • , Wan Ting Sun
  • , Nitesh Kumar Jha
  • *Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

1 Citation (Scopus)

Abstract

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.

Original languageEnglish
Article number105430
JournalComputers and Education
Volume239
DOIs
Publication statusPublished - 2025 Dec

Keywords

  • Applications in subject areas
  • Eye-tracking lag-sequential analysis
  • Human-computer interface
  • Programming comprehension
  • Teaching/learning strategies

ASJC Scopus subject areas

  • General Computer Science
  • Education

Fingerprint

Dive into the research topics of 'How block-based programming supports novice learners’ coding comprehension: Evidence from eye-tracking lag-sequential analysis'. Together they form a unique fingerprint.

Cite this