Software Quality Journal

, Volume 14, Issue 3, pp 261–282 | Cite as

Concise and consistent naming

Abstract

Approximately 70% of the source code of a software system consists of identifiers. Hence, the names chosen as identifiers are of paramount importance for the readability of computer programs and therewith their comprehensibility. However, virtually every programming language allows programmers to use almost arbitrary sequences of characters as identifiers which far too often results in more or less meaningless or even misleading naming. Coding style guides somehow address this problem but are usually limited to general and hard to enforce rules like “identifiers should be self-describing”. This paper renders adequate identifier naming far more precisely. A formal model, based on bijective mappings between concepts and names, provides a solid foundation for the definition of precise rules for concise and consistent naming. The enforcement of these rules is supported by a tool that incrementally builds and maintains a complete identifier dictionary while the system is being developed. The identifier dictionary explains the language used in the software system, aids in consistent naming, and supports programmers by proposing suitable names depending on the current context.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Pigoski, T.M. 1996 Practical Software Maintenance. Wiley Computer Publishing.Google Scholar
  2. Lehman, M. 2003 Software evolution threat and challenge. Professorial and Jubilee Lecture (2003) 9th international Stevens Award, hosted by ICSM.Google Scholar
  3. Low, D. 1998 Protecting Java code via code obfuscation. Crossroads 4(3) 21–23.Google Scholar
  4. Sun Microsystems Code conventions for the Java programming language. Technical report, Santa Clara, CA (1999).Google Scholar
  5. Henricson, M., Nyquist, E. 1992 Programming in C++: Rules and recommendations. Technical report, Ellemtel Telecommunication Systems Laboratories.Google Scholar
  6. Fagan, M.E. 1976 Design and code inspections to reduce errors in program development. IBM Systems Journal 15(3) 182–211.CrossRefGoogle Scholar
  7. Oman, P.W., Cook, C.R. Typographic style is more than cosmetic. ACM Communications 33(5) (1990).Google Scholar
  8. Arab, M. 1992 Enhancing program comprehension: formatting and documenting. SIGPLAN Not. 27(2) 37–46.CrossRefGoogle Scholar
  9. Sneed, H.M. 1996 Object-oriented cobol recycling. In: WCRE ’96, IEEE Computer Society 169.Google Scholar
  10. Biggerstaff, T.J., Mitbander, B.G., Webster, D. 1993 The concept assignment problem in program understanding. In: ICSE ’93, IEEE CS Press.Google Scholar
  11. Anquetil, N., Lethbridge, T. 1998 Assessing the relevance of identifier names in a legacy software system. In: CASCON ’98, IBM Press 4.Google Scholar
  12. Rajlich, V., Wilde, N. 2002 The role of concepts in program comprehension. In: IWPC ’02, IEEE CS 271.Google Scholar
  13. Wilde, N., Scully, M.C. 1995 Software reconnaissance: mapping program features to code. Journal of Software Maintenance 7(1) 49–62.Google Scholar
  14. Chen, K., Rajlich, V. 2000 Case study of feature location using dependence graph. In: IWPC ’00, IEEE CS 241.Google Scholar
  15. Shneiderman, B. Software psychology. Winthrop Publishers, Inc. (1980).Google Scholar
  16. Anderson, J.R. 1995 Cognitive Psychology and its implications. W. H. Freeman and Co., New Jersey.Google Scholar
  17. Wilson, J.Q., Kelling, G.L. 1982 Broken windows. The Atlantic Monthly 249(3).Google Scholar
  18. Hunt, A., Thomas, D. 1999 The pragmatic programmer: From journeyman to master.Google Scholar
  19. Weinberg, G.M. 1971 The psychology of computer programming. Van Nostrand Reinhold Co.Google Scholar
  20. Robertson, J., Robertson, S. 2004 Volere template v10.1. Requirements specification template, Atlantic Systems Guild.Google Scholar
  21. Allen, F.W., Loomis, M.E.S., Mannino, M.V. 1982 The integrated dictionary/directory system. ACM Comput. Surv. 14(2) 245–286.CrossRefGoogle Scholar
  22. O’Grady, W., de Guzman, V.P. 1996 Morphology: The analysis of word structure. In O’Grady, W., Dobrovolsky, M., Katamba, F., eds.: Contemporary Linguistics: An introduction. 3rd. edn. Longman, London and New York 132–180.Google Scholar
  23. Costello, F. 2002 Investigating creative language: People’s choice of words in the production of novel noun-noun compounds. In: Proceedings of the 24th Annual Conference of the Cognitive Science Society. 232–237.Google Scholar
  24. van Rysselberghe, F., Demeyer, S. 2003 Evaluating clone detection techniques. In: ELISA 03. 25–36.Google Scholar
  25. Baxter, I., Yahin, A., Moura, L., Sant’Anna, M., Bier, L. 1998 Clone detection using abstract syntax trees.Google Scholar
  26. Eick, S.G., Graves, T.L., Karr, A.F., Marron, J.S., Mockus, A. 2001 Does code decay? Assessing the evidence from change management data. IEEE Transactions on Software Engineering 27(1) 1–12.CrossRefGoogle Scholar
  27. Tschirner, E. 2004 Breadth of vocabulary and advanced english study: An empirical investigation. Electronic Journal of Foreign Language Teaching 1(1) 27–39.Google Scholar
  28. Miller, G.A. 1995 Wordnet: a lexical database for english. Commun. ACM 38(11) 39–41.CrossRefGoogle Scholar

Copyright information

© Springer Science + Business Media, LLC 2006

Authors and Affiliations

  1. 1.Institut für Informatik, Technische Universität MünchenGarching b. MünchenGermany

Personalised recommendations