Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Many people use the term Snake Case to describe variables or other symbols with_the_form_of_underscores.

When did this term enter into use?

share|improve this question

2 Answers 2

up vote 20 down vote accepted

A person named Jack Dahlgren claims on Quora he invented the term in 2002 when he worked at Intel.

Here's what he posted at above link:

I believe that I am the one who coined this term back in 2002 when I was at Intel and we were evaluating Sharepoint Team Services. Based on the unfortunate tendency of Sharepoint to escape spaces in names with [underscore] characters (among other things) I recommended a policy of using underscores to replace all spaces so that URLs would be slightly shorter and much more readable.

Given the existing "camelCase" name with humps in the middle, I called it "snake_case" or if there were two flat spots, I jokingly called it "road_kill_case". Considering the size of Intel and my interactions with Microsoft product team, it is possible that this is the origin, but it is such a simple phase that I think it could have been invented independently elsewhere too.

share|improve this answer

The earliest use I found in Usenet is in a post by Gavin Kistner to comp.lang.ruby on 23rd February 2004:

While writing my ValidForm library (http://phrogz.net/RubyLibs/) I
realized that I was mixing camelCase [which I love] with
whatever_you_call_this_case [which I don't, but I see that Ruby uses a
lot of]. (BTW...what do you call that naming style? snake_case? That's
what I'll call it until someone corrects me.)

Ruby still uses this term today, for example in The Ruby Style Guide:

  • Use snake_case for symbols, methods and variables.

  • Use SCREAMING_SNAKE_CASE for other constants.

share|improve this answer
3  
I always search google groups to find the origin of phrases. That's exactly that I did. And after that I started searching bing/google with "snake case" 2003, "snake case" 2002, etc. –  dcaswell Aug 28 '13 at 7:46
5  
SCREAMING_SNAKE_CASE, I love it! –  Ant Aug 28 '13 at 22:21
1  
spinal-case ! –  Ben Lee Sep 7 '13 at 5:43
    
I'm not an English native speaker and I fail to understand why the "snake". I suppose it's because snake_case looks like a snake someone stepped on or ran over with a bicycle or something. Is that the reason? Also why spinal-case? –  Piovezan Apr 10 at 14:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.