Home | Twitter | Facebook | YouTube |
Tutor Sign Up  |  Login

Naming Standards in Computer Programming

Tutor Pages » Computer programming Article by Dave Amour (WS12)

Dave Amour Computer programming Tutor (Walsall)
By: Dave Amour (WS12)
Subject: Computer programming
Last updated: 28/03/2009
Tags: computer programming, worksheets


Within all arenas of computer programming there are many different naming conventions. These all relate to different languages and there are different standards which some people and companies may use.

Ideally it would be nice if we could all stick to the same conventions for specific languages. This is ultimately a matter of personal choice or company standards. There are some unwritten standards that do exist. For example for coding with C# it makes sense to follow Microsoft's guidelines since it is their language and technology.

Naming conventions are of course given names such as Pascal case. The following are some of the more common ones.

Pascal

The first letter in the identifier and the first letter of each subsequent concatenated word are capitalized. You can use Pascal case for identifiers of three or more characters.

 
Hungarian

In Hungarian notation, a variable name starts with one or more lower-case letters which are mnemonics for the type or purpose of that variable, followed by whatever the name the programmer has chosen.

 
CamelCase

CamelCase is a common name for the practice of writing compound words or phrases where the words are joined without spaces, and each word is capitalized within the compound. This practice is known by a large variety of names, including BiCapitalization, InterCaps, MixedCase, etc, and many of its users do not ascribe a name to it at all. Editors of the Oxford English Dictionary describe words using this format as having medial capitals.

CamelCase is a standard identifier naming convention for several programming languages, and has become fashionable in marketing for names of products and companies. Outside of these contexts, however, CamelCase is rarely used in formal written English, and most style guides recommend against it.

OK, so what's the difference between this and Pascal case. Well CamelCase comes in two flavours depending on whether the first letter is capitalised or not. I normally think of CamelCase as camelCase - ie the first letter is lower case and in this way it differs from Pascal.

From my perspective and since most of my work is now asp.net with C# I am mainly interested in the Microsoft guidelines for C#.



Related Articles



Rate and Comment this article

Please Login or Register to rate/comment on this article


Tutor Pages » Computer programming Article by Dave Amour (WS12)

About the Author

Dave Amour Computer programming Tutor (Walsall) Be all you can be


Latest Twitter Updates from The Tutor Pages

  • #Tutor jobs: #Administration tutor job Inverness Higher http://t.co/lUKLf3A1 #tuition #ukjobs #uk
    Posted 1 day ago
  • #Tutor jobs: #Harp teacher job Bath Beginner-advanced http://t.co/lUKLf3A1 #lessons #ukjobs #uk
    Posted 1 day ago
  • #Tutor jobs: #A Level Maths Tutor job Bournemouth A Levels http://t.co/lUKLf3A1 #lessons #ukjobs #uk
    Posted 2 days ago
  • #Tutor jobs: #skills for life tutor job birmingham subject specialist in literacy or maths http://t.co/lUKLf3A1 #lessons #ukjobs #uk
    Posted 2 days ago
  • #Tutor jobs: #tutoring for disabilities job Malaysia, Kuala Lumpur Beginner/advanced http://t.co/lUKLf3A1 #lessons #ukjobs #uk
    Posted 2 days ago
Follow on twitter