Category Archives: dev

development, programming, coding

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.

The Art of Computer Programming, not online at Amazon

Oddly enough, the ultimate CS classic – Donald Knuth’s The Art of Computer Programming, Volume 1 (or any of the other volumes) aren’t available via Amazon’s “Look inside this Book” feature.

I thought it would be a quick way to look up just one thing when I don’t have the book at hand, but amazon.com has missed scanning and OCR-ing this one. Even more strangeness – a google search reveals a product search result (i.e. an ad) for the book at Wal-mart.com.

Am I the only person who cares about this book any longer?