Concise and Consistent Naming

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 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 improves productivity of programmers by proposing suitable names depending on the current context.

[1]  Václav Rajlich,et al.  Case study of feature location using dependence graph , 2000, Proceedings IWPC 2000. 8th International Workshop on Program Comprehension.

[2]  Mats Henricson,et al.  Programming in C++. Rules and recommendations , 1992 .

[3]  Gerald M. Weinberg,et al.  Psychology of computer programming , 1971 .

[4]  John R. Anderson Cognitive Psychology and Its Implications , 1980 .

[5]  Harry M. Sneed Object-oriented COBOL recycling , 1996, Proceedings of WCRE '96: 4rd Working Conference on Reverse Engineering.

[6]  Carolyn Seaman,et al.  Practical Software Maintenance , 2000, J. Softw. Maintenance Res. Pract..

[7]  Norman Wilde,et al.  The role of concepts in program comprehension , 2002, Proceedings 10th International Workshop on Program Comprehension.

[8]  Mary E. S. Loomis,et al.  The Integrated Dictionary/Directory System , 1982, CSUR.

[9]  Michael Fagan Design and Code Inspections to Reduce Errors in Program Development , 1976, IBM Syst. J..

[10]  Audris Mockus,et al.  Does Code Decay? Assessing the Evidence from Change Management Data , 2001, IEEE Trans. Software Eng..

[11]  Serge Demeyer,et al.  Evaluating clone detection techniques , 2003 .

[12]  Nicolas Anquetil,et al.  Assessing the relevance of identifier names in a legacy software system , 1998, CASCON.

[13]  Douglas Low,et al.  Protecting Java code via code obfuscation , 1998, CROS.

[14]  Norman Wilde,et al.  Software reconnaissance: Mapping program features to code , 1995, J. Softw. Maintenance Res. Pract..

[15]  Curtis R. Cook,et al.  Typographic style is more than cosmetic , 1990, CACM.

[16]  Mouloud Arab Enhancing program comprehension: formatting and documenting , 1992, SIGP.