Abstract
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., identifiers that include relevant domain knowledge), one must ask 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? What is the effect of longer identifiers on limited short term memory capacity? Results from a study designed to investigate these questions are reported. The study involved over 100 programmers who were asked to describe 12 different functions and then recall identifiers that appeared in each function. The functions used three different levels of identifiers: single letters, abbreviations, and full words. Responses allow the extent of comprehension associated with the different levels to be studied along with their impact on memory. The functions used in the study include standard computer science textbook algorithms and 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 using full words and abbreviations. When considered in the light of limited human short-term memory, well-chosen abbreviations may be preferable in some situations since identifiers with fewer syllables are easier to remember.
This is a preview of subscription content,log in via an institution to check access.
Access this article
Subscribe and save
- Get 10 units per month
- Download Article/Chapter or eBook
- 1 Unit = 1 Article or 1 Chapter
- Cancel anytime
Buy Now
Price includes VAT (Japan)
Instant access to the full article PDF.
Similar content being viewed by others
Explore related subjects
Discover the latest articles and news from researchers in related subjects, suggested using machine learning.References
Anquetil N, Lethbridge T (1998) Assessing the relevance of identifier names in a legacy software system. In: Proceedings of the 1998 conference of the Centre for Advanced Studies on Collaborative Research, Toronto
Butler G, Grogono P, Shinghal R, Tjandra I (1995) Retrieving information from data flow diagrams. In: Working conference on reverse engineering, November
Caprile B, Tonella P (1999) Nomen est omen: analyzing the language of function identifiers. In: Working Conference on Reverse Engineering, Altanta, Georgia, USA, October
Caprile B, Tonella P (2000) Restructuring program identifier names. In: ICSM
Cowan N (2001) The magical number 4 in short-term memory: a reconsideration of mental storage capacity. Behav Brain Sci 24(1)
Deißenböck F., Pizka M (2005) Concise and consistent naming. In: Proceedings of the 13th international workshop on program comprehension (IWPC 2005). IEEE Computer Society, St. Louis, May 2005
Jones D (2004) Memory for a short sequence of assignment statements. C Vu 16(6)
Knuth D (2003) Selected papers on computer languages. Center for the Study of Language and Information (CSLI Lecture Notes, vol 139). Stanford, California
Landis, JR, Koch, GG (1977) The measurement of observer agreement for categorical data. Biometrics 33(1)
Lawrie D, Feild H, Binkley D (2007) An empirical study of rules for well-formed identifiers. J Softw Maint Evol Res Pract 19(4)
Mitchell T (1997). Machine learning. WCB McGraw-Hill, New York
Morrell, C, Pearson, J, Brant, L, (1997) Linear transformation of linear mixed effects models. Am Stat 51(4)
De Palma P (2001) Why women avoid computer science. Commun ACM 44(6)
Rilling J, Klemola T (2003) Identifying comprehension bottlenecks using program slicing and cognitive complexity metrics. In: Proceedings of the 11th IEEE international workshop on program comprehension, Portland, May
Saiedan H and Mc Clanahan LM (1996). Frameworks for quality software process: SEI capability maturity model.Softw Qual J 5(1): 1
Silberman S (2001) The geek syndrome. Wired 9(12)
Sjøberg D, Hannay J, Hansen O, Kampenes V, Karahasanovic A, Liborg N, Rekdal A (1993) A survey of controlled experiments in software engineering. IEEE Trans Softw Eng 19(4)
Sneed H (1996) Object-oriented cobol recycling. In: 3rd Working Conference on Reverse Engineering. IEEE Computer Society, St. Louis
Takang A, Grubb P, Macredie R (1996) The effects of comments and identifier names on program comprehensibility: an experiential study. J Program Lang 4(3)
Verbeke G and Molenberghs G (2001). Linear mixed models for longitudinal data. Springer, New York
Author information
Authors and Affiliations
Computer Science Department, Loyola College, 4501 N. Charles St., Baltimore, MD, 21210-2699, USA
Dawn Lawrie, Henry Feild & David Binkley
Mathematical Sciences Department, Loyola College, 4501 N. Charles St., Baltimore, MD, 21210-2699, USA
Christopher Morrell
- Dawn Lawrie
You can also search for this author inPubMed Google Scholar
- Christopher Morrell
You can also search for this author inPubMed Google Scholar
- Henry Feild
You can also search for this author inPubMed Google Scholar
- David Binkley
You can also search for this author inPubMed Google Scholar
Corresponding author
Correspondence toDawn Lawrie.
Rights and permissions
About this article
Cite this article
Lawrie, D., Morrell, C., Feild, H.et al. Effective identifier names for comprehension and memory.Innovations Syst Softw Eng3, 303–318 (2007). https://doi.org/10.1007/s11334-007-0031-2
Received:
Accepted:
Published:
Issue Date:
Share this article
Anyone you share the following link with will be able to read this content:
Sorry, a shareable link is not currently available for this article.
Provided by the Springer Nature SharedIt content-sharing initiative