Commenting source code: is it worth it for small programming tasks?

16Citations
Citations of this article
25Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Maintaining a program is a time-consuming and expensive task in software engineering. Consequently, several approaches have been proposed to improve the comprehensibility of source code. One of such approaches are comments in the code that enable developers to explain the program with their own words or predefined tags. Some empirical studies indicate benefits of comments in certain situations, while others find no benefits at all. Thus, the real effect of comments on software development remains uncertain. In this article, we describe an experiment in which 277 participants, mainly professional software developers, performed small programming tasks on differently commented code. Based on quantitative and qualitative feedback, we i) partly replicate previous studies, ii) investigate performances of differently experienced participants when confronted with varying types of comments, and iii) discuss the opinions of developers on comments. Our results indicate that comments seem to be considered more important in previous studies and by our participants than they are for small programming tasks. While other mechanisms, such as proper identifiers, are considered more helpful by our participants, they also emphasize the necessity of comments in certain situations.

Cite

CITATION STYLE

APA

Nielebock, S., Krolikowski, D., Krüger, J., Leich, T., & Ortmeier, F. (2019). Commenting source code: is it worth it for small programming tasks? Empirical Software Engineering, 24(3), 1418–1457. https://doi.org/10.1007/s10664-018-9664-z

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free