Commenting source code: is it worth it for small programming tasks?
Commenting source code: is it worth it for small programming tasks?
复制标题
DOI:
10.1007/s10664-018-9664-z
复制
发表时间:
2018-11
影响因子:
4.1
通讯作者:
Sebastian Nielebock;Dariusz Krolikowski;J. Krüger;Thomas Leich;F. Ortmeier
中科院分区:
文献类型:
--
作者:
Sebastian Nielebock;Dariusz Krolikowski;J. Krüger;Thomas Leich;F. Ortmeier
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 arecommentsin 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, wei) partly replicate previous studies,ii) investigate performances of differently experienced participants when confronted with varying types of comments, andiii)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.