TY - GEN
T1 - Do Comments Matter? Investigating Students’ Source Code Comment Behaviour and Its Relation to Academic Success in a CS1 Course
AU - Kerschbaumer, David
AU - Schatz, Christoph
AU - Ruprechter, Thorsten
AU - Gütl, Christian
AU - Steinmaurer, Alexander
N1 - Publisher Copyright:
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2025.
PY - 2025/3/21
Y1 - 2025/3/21
N2 - Comments in source code have been perceived to enhance understandability, readability, and knowledge retention by professional programmers and educators alike. Programming novices in introductory programming courses are therefore taught to use comments to highlight specific code sections, clarify complex algorithms, and organize source code structure. Despite the perceived importance of comments, little research exists regarding the relation between commenting behavior and student performance in such courses, which is inherently linked to code correctness. To expand on this gap, this study analyzes over 40000 comments across 2800 submissions from 1085 students over two semesters enrolled in a first-semester computer science 1 (CS1) course at a Western European university. Our analysis reveals a notable thematic difference in the use of comments between high-performing and failing students: high-performing students utilize comments primarily for task-related explanations, whereas failing students tend to more frequently use them to describe the program’s syntax. However, there is no significant correlation between the actual number of comments and students’ course performance. Finally, all students exhibit a considerable shift in commenting behavior over time, transitioning from full sentences to conveying essential information through keywords instead. Altogether, this large-scale study, which draws upon data from a realistic educational context, sheds light on the role of code comments in student performance, offering insights beneficial to both educators and researchers.
AB - Comments in source code have been perceived to enhance understandability, readability, and knowledge retention by professional programmers and educators alike. Programming novices in introductory programming courses are therefore taught to use comments to highlight specific code sections, clarify complex algorithms, and organize source code structure. Despite the perceived importance of comments, little research exists regarding the relation between commenting behavior and student performance in such courses, which is inherently linked to code correctness. To expand on this gap, this study analyzes over 40000 comments across 2800 submissions from 1085 students over two semesters enrolled in a first-semester computer science 1 (CS1) course at a Western European university. Our analysis reveals a notable thematic difference in the use of comments between high-performing and failing students: high-performing students utilize comments primarily for task-related explanations, whereas failing students tend to more frequently use them to describe the program’s syntax. However, there is no significant correlation between the actual number of comments and students’ course performance. Finally, all students exhibit a considerable shift in commenting behavior over time, transitioning from full sentences to conveying essential information through keywords instead. Altogether, this large-scale study, which draws upon data from a realistic educational context, sheds light on the role of code comments in student performance, offering insights beneficial to both educators and researchers.
KW - computer science education
KW - educational data mining
KW - source code comments
UR - https://www.scopus.com/pages/publications/105001265636
U2 - 10.1007/978-3-031-85649-5_51
DO - 10.1007/978-3-031-85649-5_51
M3 - Conference paper
AN - SCOPUS:105001265636
SN - 9783031856488
T3 - Lecture Notes in Networks and Systems
SP - 519
EP - 530
BT - Futureproofing Engineering Education for Global Responsibility
A2 - Auer, Michael E.
A2 - Rüütmann, Tiia
PB - Springer Science and Business Media Deutschland GmbH
T2 - 27th International Conference on Interactive Collaborative Learning, ICL 2024
Y2 - 24 September 2024 through 27 September 2024
ER -