Skip to main navigation Skip to search Skip to main content

Do Comments Matter? Investigating Students’ Source Code Comment Behaviour and Its Relation to Academic Success in a CS1 Course

Research output: Chapter in Book/Report/Conference proceedingConference paperpeer-review

Abstract

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.

Original languageEnglish
Title of host publicationFutureproofing Engineering Education for Global Responsibility
Subtitle of host publicationProceedings of the 27th International Conference on Interactive Collaborative Learning, ICL 2024
EditorsMichael E. Auer, Tiia Rüütmann
PublisherSpringer Science and Business Media Deutschland GmbH
Pages519-530
Number of pages12
ISBN (Print)9783031856488
DOIs
Publication statusPublished - 21 Mar 2025
Event27th International Conference on Interactive Collaborative Learning, ICL 2024 - Tallinn, Estonia
Duration: 24 Sept 202427 Sept 2024

Publication series

NameLecture Notes in Networks and Systems
Volume1261 LNNS
ISSN (Print)2367-3370
ISSN (Electronic)2367-3389

Conference

Conference27th International Conference on Interactive Collaborative Learning, ICL 2024
Abbreviated titleICL2024
Country/TerritoryEstonia
CityTallinn
Period24/09/2427/09/24

Keywords

  • computer science education
  • educational data mining
  • source code comments

ASJC Scopus subject areas

  • Control and Systems Engineering
  • Signal Processing
  • Computer Networks and Communications

Fingerprint

Dive into the research topics of 'Do Comments Matter? Investigating Students’ Source Code Comment Behaviour and Its Relation to Academic Success in a CS1 Course'. Together they form a unique fingerprint.

Cite this