Commenting Source Code: Is It Worth It For Small Programming Tasks?

Sebastian Nielebock (Corresponding author), Dariusz Krolikowski, Jacob Krüger, Thomas Leich, Frank Ortmeier

Research output: Contribution to journalArticleAcademicpeer-review

25 Citations (Scopus)

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.
Original languageEnglish
Pages (from-to)1418-1457
Number of pages40
JournalEmpirical Software Engineering
Volume24
Issue number3
DOIs
Publication statusPublished - 2019
Externally publishedYes

Bibliographical note

DBLP License: DBLP's bibliographic metadata records provided through http://dblp.org/ are distributed under a Creative Commons CC0 1.0 Universal Public Domain Dedication. Although the bibliographic metadata records are provided consistent with CC0 1.0 Dedication, the content described by the metadata records is not. Content may be subject to copyright, rights of privacy, rights of publicity and other restrictions.

Keywords

  • Comments
  • Program Comprehension
  • Empirical Study
  • Documentation
  • Maintenance

Fingerprint

Dive into the research topics of 'Commenting Source Code: Is It Worth It For Small Programming Tasks?'. Together they form a unique fingerprint.

Cite this