Back to Search Start Over

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

Authors :
Nielebock, Sebastian
Krolikowski, Dariusz
Krüger, Jacob
Leich, Thomas
Ortmeier, Frank
Source :
Empirical Software Engineering; Jun2019, Vol. 24 Issue 3, p1418-1457, 40p
Publication Year :
2019

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. [ABSTRACT FROM AUTHOR]

Details

Language :
English
ISSN :
13823256
Volume :
24
Issue :
3
Database :
Complementary Index
Journal :
Empirical Software Engineering
Publication Type :
Academic Journal
Accession number :
137078089
Full Text :
https://doi.org/10.1007/s10664-018-9664-z