<p>As <a href="https://whathecode.wordpress.com/2011/02/10/camelcase-vs-underscores-scientific-showdown/" rel="nofollow">the author of the blog post you refer to</a>, I can state that at the time of writing (early 2011) there were not too many studies reporting on this specific topic, which is why I reported on the single study I found at the time (Binkley et al. 2009). However, I advise you to read a follow-up study by a different group of researchers (Sharif and Maletic 2010). They address some of the shortcomings in the earlier study.</p>

<p>The common finding for both studies is that camelCasing is slower to read, which <a href="https://whathecode.wordpress.com/2013/02/16/camelcase-vs-underscores-revisited/" rel="nofollow">I summarized in a follow-up post</a>:</p>

<blockquote>
  <p><strong>No difference in accuracy</strong> was reported (as opposed to Binkley et al.),
  but on average, <strong>camel-cased identifiers took 932ms (20%) longer</strong> than
  underscored identifiers, in line with the 13,5% longer as reported by
  Binkley et al. The eye tracking results also give some insight into
  visual effort. <strong>Camel-cased identifiers require a higher average
  duration of fixations.</strong></p>
</blockquote>

<p>Based on more general studies in cognitive science (Epelboim et al. 2009) (as <a href="https://whathecode.wordpress.com/2011/02/10/camelcase-vs-underscores-scientific-showdown/" rel="nofollow">I mentioned in the summary of the first study</a>) this was to be expected:</p>

<blockquote>
  <p>Natural language research in psychology found that replacing spaces
  with Latin letters, Greek letters or digits had a negative impact on
  reading. However, shaded boxes (similar to underscores) have
  <strong>essentially no effect on reading times</strong> or on recognition of individual
  words. Removing spaces altogether slows down reading 10-20%.</p>
</blockquote>

<p>However, I haven't done any follow-up research on this, thus it would definitely be worthwhile to dig into more recent citations. The ones listed below should provide a suitable starting point to this end.</p>

<p><sub>
Binkley, D., Davis, M., Lawrie, D., &amp; Morrell, C. (2009, May). <a href="http://dx.doi.org/10.1109/ICPC.2009.5090039" rel="nofollow">To camelcase or under_score.</a> In Program Comprehension, 2009. ICPC'09. IEEE 17th International Conference on (pp. 158-167). IEEE. [<a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.158.9499&amp;rep=rep1&amp;type=pdf" rel="nofollow">PDF</a>]<br>
Sharif, B., &amp; Maletic, J. I. (2010, June). <a href="http://dx.doi.org/10.1109/ICPC.2010.41" rel="nofollow">An eye tracking study on camelcase and under_score identifier styles</a>. In Program Comprehension (ICPC), 2010 IEEE 18th International Conference on (pp. 196-205). IEEE. [<a href="https://www.researchgate.net/profile/Bonita_Sharif/publication/224159770_An_Eye_Tracking_Study_on_camelCase_and_under_score_Identifier_Styles/links/00b49534cc03bab22b000000.pdf" rel="nofollow">PDF</a>]<br>
Epelboim, J., Booth, J. R., Ashkenazy, R., Taleghani, A., &amp; Steinman, R. M. (1997). Fillers and spaces in text: The importance of word recognition during reading. Vision Research, 37(20), 2899-2914.
</sub></p>

CC BY-SA 3.0
2016-04-28T19:05:15.797Z
2016-04-28T19:05:15.797Z
Steven Jeuris
<p>In computer programming, spaces are often forbidden in the declaration of variable names, so programmers have created alternate methods of identifying word boundaries in variable names: camel case and underscores being two of the most popular.</p>

<p>variablesInCamelCaseLookLikeThis</p>

<p>variables_in_underscore_case_look_like_this</p>

<p>There's no shortage of debate about the superiority of one or the other on the internet, including <a href="https://softwareengineering.stackexchange.com/questions/27264/naming-conventions-camelcase-versus-underscore-case-what-are-your-thoughts-ab">within Stack Exchange</a>, and on <a href="https://whathecode.wordpress.com/2011/02/10/camelcase-vs-underscores-scientific-showdown/" rel="nofollow noreferrer">blogs approaching the question from a variety of perspectives</a>, but like many questions in psychology there's probably no clear winner here. Instead, there are likely to be advantages and disadvantages of each approach.</p>

<p>What does the cognitive science literature say about the relative advantages and disadvantages of camel case and underscore case programming conventions?</p>

CC BY-SA 3.0
2015-05-15T23:41:52.547Z
I checked before I posted. There is a surprising amount of research on the topic!
Josh
<cognitive-psychology><human-factors>
What are the psychological differences in camelCase and underscore_case programming conventions?
Josh
# What are the psychological differences in camelCase and underscore_case programming conventions?

(Asked by: username_0 on 2015-05-15)

In computer programming, spaces are often forbidden in the declaration of variable names, so programmers have created alternate methods of identifying word boundaries in variable names: camel case and underscores being two of the most popular.

variablesInCamelCaseLookLikeThis

variables\_in\_underscore\_case\_look\_like\_this

There's no shortage of debate about the superiority of one or the other on the internet, including [within Stack Exchange](https://softwareengineering.stackexchange.com/questions/27264/naming-conventions-camelcase-versus-underscore-case-what-are-your-thoughts-ab), and on [blogs approaching the question from a variety of perspectives](https://whathecode.wordpress.com/2011/02/10/camelcase-vs-underscores-scientific-showdown/), but like many questions in psychology there's probably no clear winner here. Instead, there are likely to be advantages and disadvantages of each approach.

What does the cognitive science literature say about the relative advantages and disadvantages of camel case and underscore case programming conventions?

**Tags:** cognitive-psychology, human-factors

> **Comments:**
> **username_0**: I checked before I posted. There is a surprising amount of research on the topic!  

---

## 1 answers

### Answer by username_1 on 2016-04-28. Score: 3

As [the author of the blog post you refer to](https://whathecode.wordpress.com/2011/02/10/camelcase-vs-underscores-scientific-showdown/), I can state that at the time of writing (early 2011) there were not too many studies reporting on this specific topic, which is why I reported on the single study I found at the time (Binkley et al. 2009). However, I advise you to read a follow-up study by a different group of researchers (Sharif and Maletic 2010). They address some of the shortcomings in the earlier study.

The common finding for both studies is that camelCasing is slower to read, which [I summarized in a follow-up post](https://whathecode.wordpress.com/2013/02/16/camelcase-vs-underscores-revisited/):

> **No difference in accuracy** was reported (as opposed to Binkley et al.),
> but on average, **camel-cased identifiers took 932ms (20%) longer** than
> underscored identifiers, in line with the 13,5% longer as reported by
> Binkley et al. The eye tracking results also give some insight into
> visual effort. **Camel-cased identifiers require a higher average
> duration of fixations.**

Based on more general studies in cognitive science (Epelboim et al. 2009) (as [I mentioned in the summary of the first study](https://whathecode.wordpress.com/2011/02/10/camelcase-vs-underscores-scientific-showdown/)) this was to be expected:

> Natural language research in psychology found that replacing spaces
> with Latin letters, Greek letters or digits had a negative impact on
> reading. However, shaded boxes (similar to underscores) have
> **essentially no effect on reading times** or on recognition of individual
> words. Removing spaces altogether slows down reading 10-20%.

However, I haven't done any follow-up research on this, thus it would definitely be worthwhile to dig into more recent citations. The ones listed below should provide a suitable starting point to this end.

Binkley, D., Davis, M., Lawrie, D., & Morrell, C. (2009, May). [To camelcase or under\_score.](http://dx.doi.org/10.1109/ICPC.2009.5090039) In Program Comprehension, 2009. ICPC'09. IEEE 17th International Conference on (pp. 158-167). IEEE. [[PDF](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.158.9499&rep=rep1&type=pdf)]  
Sharif, B., & Maletic, J. I. (2010, June). [An eye tracking study on camelcase and under\_score identifier styles](http://dx.doi.org/10.1109/ICPC.2010.41). In Program Comprehension (ICPC), 2010 IEEE 18th International Conference on (pp. 196-205). IEEE. [[PDF](https://www.researchgate.net/profile/Bonita_Sharif/publication/224159770_An_Eye_Tracking_Study_on_camelCase_and_under_score_Identifier_Styles/links/00b49534cc03bab22b000000.pdf)]  
Epelboim, J., Booth, J. R., Ashkenazy, R., Taleghani, A., & Steinman, R. M. (1997). Fillers and spaces in text: The importance of word recognition during reading. Vision Research, 37(20), 2899-2914.


---

