Syntactic Identifier Conciseness and Consistency
- 1 September 2006
- conference paper
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 139-148
- https://doi.org/10.1109/scam.2006.31
Abstract
Readers of programs have two main sources of domain information: identifier names and comments. It is therefore important for the identifier names (as well as comments) to communicate clearly the concepts that they are meant to represent. Deissenbock and Pizka recently introduced rules for concise and consistent variable naming. One requirement of their approach is an expert provided mapping from identifiers to concepts. An approach for the concise and consistent naming of variables that does not require any additional information (e.g., a mapping) is presented. Using a pool of 48 million lines of code, experiments with the resulting syntactic rules for concise and consistent naming illustrate that violations of the syntactic pattern exist. Two case studies show that three quarters of the violations uncovered are "real". That is they would be identified using a concept mapping. Techniques for reducing the number of false positives are also presented. Finally, two related studies show that evolution does not introduce rule violations and that programmers tend to use a rather limited vocabulary.Keywords
This publication has 6 references indexed in Scilit:
- Identifying comprehension bottlenecks using program slicing and cognitive complexity metricsPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2004
- Nomen est omen: analyzing the language of function identifiersPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2003
- Recovering traceability links between code and documentationIEEE Transactions on Software Engineering, 2002
- 10.1162/153244302760185234Applied Physics Letters, 2000
- Restructuring program identifier namesPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2000
- Linear Transformations of Linear Mixed-Effects ModelsThe American Statistician, 1997