Descriptive compound identifier names improve source code comprehension (original) (raw)
2018, Proceedings of the 26th Conference on Program Comprehension
Reading and understanding source code is a major task in software development. Code comprehension depends on the quality of code, which is impacted by code structure and identifier naming. In this paper we empirically investigated whether longer but more descriptive identifier names improve code comprehension compared to short names, as they represent useful information in more detail. In a web-based study 88 Java developers were asked to locate a semantic defect in source code snippets. With descriptive identifier names, developers spent more time in the lines of code before the actual defect occurred and changed their reading direction less often, finding the semantic defect about 14% faster than with shorter but less descriptive identifier names. These effects disappeared when developers searched for a syntax error, i.e., when no in-depth understanding of the code was required. Interestingly, the style of identifier names had a clear impact on program comprehension for more experienced developers but not for less experienced developers. CCS CONCEPTS • Human-centered computing → Empirical studies in HCI; • Software and its engineering → Software usability; Error handling and recovery; Maintaining software;
Loading Preview
Sorry, preview is currently unavailable. You can download the paper by clicking the button above.