Menu Close

UPPERCASE, lowercase, camelCase?1 min read

Listen to this article

camelcaseOK, this is just a bit of trivium for you writing geeks. But lately around the office, the term ‘Camel Case’ has been used for how we are going to write the name of a variable in our programming. Camel what?!?

OK, so I finally figured it out. Here’s my overview of cases. Did I miss any?

  • UPPERCASE
  • lowercase
  • TitleCase
  • Sentencecase (initial cap)
  • camelCase (see how it’s big in the middle, low on the ends?)

UPDATE 11.14.14

One of my programmer buddies informed me about the history of this, and that programmers have done it for some time. Again, it has to do with variable names.

It used to be that variables with single words were all lower case, but multiple words used underscores to separate them:

  • variable1 (single word)
  • variable_with_multiple_words

In order to shorten the multi-word variables, the underscores were deleted, but they still needed a way to tell the words apart. And in this schema, no need for an initial cap because it was obvious where that word started. So the second variable above is now

  • variableWithMultipleWords

There you go.