To camelcase or under_score

Naming conventions are generally adopted in an effort to improve program comprehension. Two of the most popular conventions are alternatives for composing multi-word identifiers: the use of underscores and the use of camel casing. While most programmers have a personal opinion as to which style is better, empirical study forms a more appropriate basis for choosing between them. The central hypothesis considered herein is that identifier style affects the speed and accuracy of manipulating programs. An empirical study of 135 programmers and non-programmers was conducted to better understand the impact of identifier style on code readability. The experiment builds on past work of others who study how readers of natural language perform such tasks. Results indicate that camel casing leads to higher accuracy among all subjects regardless of training, and those trained in camel casing are able to recognize identifiers in the camel case style faster than identifiers in the underscore style.

[1]  Jim Webber,et al.  Gotos Considered Harmful and Other Programmers' Taboos , 2000, PPIG.

[2]  Edsger W. Dijkstra,et al.  Go To Statement Considered Harmful , 2022, Software Pioneers.

[3]  Marvin V. Zelkowitz,et al.  Experimental Validation of New Software Technology , 2003, Lecture Notes on Empirical Software Engineering.

[4]  Christopher H. Morrell,et al.  Linear Transformations of Linear Mixed-Effects Models , 1997 .

[5]  Leon Moonen,et al.  Assessing the value of coding standards: An empirical study , 2008, 2008 IEEE International Conference on Software Maintenance.

[6]  James R. Booth,et al.  Fillers and spaces in text: The importance of word recognition during reading , 1997, Vision Research.

[7]  G. Molenberghs,et al.  Linear Mixed Models for Longitudinal Data , 2001 .

[8]  William E. Riddle,et al.  Software technology maturation , 1985, ICSE '85.

[9]  G. Molenberghs,et al.  Models for Discrete Longitudinal Data , 2005 .

[10]  Amela Karahasanovic,et al.  A survey of controlled experiments in software engineering , 2005, IEEE Transactions on Software Engineering.

[11]  Les Hatton,et al.  Safer language subsets: an overview and a case history, MISRA C , 2004, Inf. Softw. Technol..

[12]  Markus Pizka,et al.  Concise and Consistent Naming , 2005, IWPC.

[13]  M. Brysbaert,et al.  Reexamining the word length effect in visual word recognition: New evidence from the English Lexicon Project , 2006, Psychonomic bulletin & review.

[14]  Einar W. Høst,et al.  The Programmer's Lexicon, Volume I: The Verbs , 2007 .

[15]  Peter H. Welch GOTO (Considered Harmful) n, n is Odd} , 1988 .

[16]  Lyle Ramshaw,et al.  Eliminating go to's while preserving program structure , 1988, JACM.

[17]  Andrew Begel,et al.  Cognitive Perspectives on the Role of Naming in Computer Programs , 2006, PPIG.

[18]  Paolo Tonella,et al.  Restructuring program identifier names , 2000, Proceedings 2000 International Conference on Software Maintenance.