What's in a Name? A Study of Identifiers

D Lawrie, C Morrell, H Feild… - 14th IEEE international …, 2006 - ieeexplore.ieee.org
14th IEEE international conference on program comprehension (ICPC'06), 2006ieeexplore.ieee.org
Readers of programs have two main sources of domain information: identifier names and
comments. When functions are uncommented, as many are, comprehension is almost
exclusively dependent on the identifier names. Assuming that writers of programs want to
create quality identifiers (eg, include relevant domain knowledge) how should they go about
it? For example, do the initials of a concept name provide enough information to represent
the concept? If not, and a longer identifier is needed, is an abbreviation satisfactory or does …
Readers of programs have two main sources of domain information: identifier names and comments. When functions are uncommented, as many are, comprehension is almost exclusively dependent on the identifier names. Assuming that writers of programs want to create quality identifiers (e.g., include relevant domain knowledge) how should they go about it? For example, do the initials of a concept name provide enough information to represent the concept? If not, and a longer identifier is needed, is an abbreviation satisfactory or does the concept need to be captured in an identifier that includes full words? Results from a study designed to investigate these questions are reported. The study involved over 100 programmers who were asked to describe twelve different functions. The functions used three different "levels" of identifiers: single letters, abbreviations, and full words. Responses allow the level of comprehension associated with the different levels to be studied. The functions include standard algorithms studied in computer science courses as well as functions extracted from production code. The results show that full word identifiers lead to the best comprehension; however, in many cases, there is no statistical difference between full words and abbreviations
ieeexplore.ieee.org