Diverge - Investigating the Consequences of Bad Comments
Abstract: In large software development projects the majority of code comments are written at the beginning of the project and tend to not be updated when the code is rewritten. This commonly results in code with incorrect comments or no comments at all. This study intends to answer whether incorrect comments can mislead programmers and if well written comments assist programmers ininterpreting new code. Furthermore, the attitudes towards code comments are investigated. The research questions were answered with data from forms andc ode tests run on 35 engineering students. For the code tests eye trackers were used to provide a clear picture of how much the participants read the code and the associated comments. A majority of the test subjects agreed that comments are important whilst 8% considered comments to be unnecessary. 50% of the test subjects expressed positive feelings towards writing comments. The data from the eyetracker showed that the test subjects read comments and code equally. Thes tudy found that incorrect comments in many cases lead to misconceptions. Correct comments were shown to assist the programmer if the code contained library functions that the programmer was not familiar with. Regarding correct comments versus no comments at all there was no difference in readability if the code did not contain any library functions.
AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)