One of the first developer jobs I had was programming in VB6 for a small business down the road. Up to that point I had been casually coding at school but this was my first exposure to “professional” development. To get the job I had to do a weeks worth of work and then get it reviewed by the boss. I thought I did a pretty good job until I got his review back and he criticized everything – in particular he ripped apart my naming conventions (or lack of them).
In memory of this event I thought I would post briefly on naming conventions / terminology. We have come a long way since the vb6 days.
Pascal Case – if you ever hear this it means that when forming a name of something, if we do it in Pascal Case we capitalize the first character of each “word”. Keeping in mind that a method name could be formed by many word. The following are examples…
MethodName FunctionThatReturnsAValue MyNameIsMark Camel Case – think of this as looking like a camel… it starts off small and then has bumps in it. The convention is to capitalize the first character of each word except the first word. The following are examples
methodName functionThatReturnsAValue myNameIsMark Screaming CAPS – a favourite of mine in the vb6 days of constants. Everything goes in Upper Case usually with underscores to identify different words. An example of this would be
METHOD_NAME FUNCTION_THAT_RETURNS_A_VALUE MY_NAME_IS_MARK