International Journal of STEM Education (May 2025)

Tracing distinct learning trajectories in introductory programming course: a sequence analysis of score, engagement, and code metrics for novice computer science vs. math cohorts

  • Zhizezhang Gao,
  • Haochen Yan,
  • Jiaqi Liu,
  • Xiao Zhang,
  • Yuxiang Lin,
  • Yingzhi Zhang,
  • Xia Sun,
  • Jun Feng

DOI
https://doi.org/10.1186/s40594-025-00546-2
Journal volume & issue
Vol. 12, no. 1
pp. 1 – 26

Abstract

Read online

Abstract Background With the increasing interdisciplinarity between computer science (CS) and other fields, a growing number of non-CS students are embracing programming. However, there is a gap in research concerning differences in programming learning between CS and non-CS students. Previous studies predominantly relied on outcome-based assessments, focusing on summative evaluations and surveys while providing little insight into the real learning process and differences therein. This study aims to provide a process-oriented comparison of programming learning between two novice student groups, CS and Math, under uniform instructional conditions, focusing on their semester-long scores, engagement, and code metrics. Results Our research involves 75 novice students enrolled in a compulsory introductory programming course designed for a mixed class, comprising 35 Math and 40 CS. Through Latent Class Analysis and Self-Organizing Maps, we identify distinct learning states throughout the semester and employ sequence mining to explore the differences in learning trajectories and state transitions between the two cohorts. Our results reveal that the association between engagement and scores diverges across different majors as the course progresses, deviating from the widely discussed positive correlation. In the semester-long code metrics analysis of students exhibiting over-engineering state, the two cohorts display opposing trends. Moreover, CS students demonstrate significant alignment between formative and summative scores, whereas Math peers exhibit phenomena of cold-start and learning avoidance. Conclusions This study underscores the importance of understanding distinct learning trajectories to improve instructional design for diverse learner groups. Our findings indicate that CS students follow increasingly efficient learning patterns with decreasing code complexity over time, while Math students need strategies to overcome phenomena of cold-start and learning avoidance. Code metrics can provide valuable insights into students’ programming performance and patterns. The research also highlights the importance of active engagement and fostering computational thinking in the early stages. Based on these insights, we propose recommendations for instructional design to better support students in introductory programming courses. This study also makes a methodological contribution to the process-oriented research in programming education.

Keywords