Sebastian Nielebock, Dariusz Krolikowski, Jacob Krüger, Thomas Leich, Frank Ortmeier: Commenting Source Code: Is It Worth It For Small Programming Tasks?. In: Springer Empirical Software Engineering (EMSE), 24 (3), S. 1418–1457, 2018, ISSN: 1382-3256.

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.

BibTeX (Download)

@article{NielebockComments2018,
title = {Commenting Source Code: Is It Worth It For Small Programming Tasks?},
author = {Sebastian Nielebock and Dariusz Krolikowski and Jacob Kr\"{u}ger and Thomas Leich and Frank Ortmeier},
editor = {Springer Science+Business Media, LLC, part of Springer Nature},
url = {https://cse.cs.ovgu.de/cse-wordpress/wp-content/uploads/2018/10/paper-influence-comments_preliminary.pdf},
doi = {10.1007/s10664-018-9664-z},
issn = {1382-3256},
year  = {2018},
date = {2018-11-16},
journal = {Springer Empirical Software Engineering (EMSE)},
volume = {24},
number = {3},
pages = {1418--1457},
publisher = {Springer US},
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.},
keywords = {Comments, Documentation and Maintenance, Empirical Study, Program Comprehension},
pubstate = {published},
tppubtype = {article}
}