Monthly Archives: March 2014

An Eye Tracking Study on camelCase and under_score Identifier Styles

Programmers sit around and discuss many things about the methods and practices of writing code. One ageless discussion is how to name things. There are a few studies that review naming conventions and most of them just focus on doing it consistently across a language, group or organization.

This study, now a few years old doesn’t really come to any overwhelming conclusion that would persuade me to abandon underscores (or dashes) for CamelCase but is worth noting.

From the Abstract:

An empirical study to determine if identifier-naming conventions (i.e., camelCase and under_score) affect code comprehension is presented. An eye tracker is used to capture quantitative data from human subjects during an experiment. The intent of this study is to replicate a previous study published at ICPC 2009 (Binkley et al.) that used a timed response test method to acquire data. The use of eye-tracking equipment gives additional insight and overcomes some limitations of traditional data gathering techniques. Similarities and differences between the two studies are discussed. One main difference is that subjects were trained mainly in the underscore style and were all programmers. While results indicate no difference in accuracy between the two styles, subjects recognize identifiers in the underscore style more quickly.

via IEEE Xplore Abstract – An Eye Tracking Study on camelCase and under_score Identifier Styles.

Also available via the author’s web site.