I use the Java naming convention:
class names : MyClass
method/function names : myMethod()
constants : MY_CONSTANT
member variables : _myMemberVariable (underscore helps the autocomplete tool and clarifies sometimes)
variable names : myVariable
Reversed from what davepermen uses
I don't use global variables. Hungarian notation is just useless burden. Variable's type should be apparent from what it is, or knowing its type should be unnecessary for the programmer.
And rather off-topic, if I need to add a comment (ok this is a bad example since it's so simple):
//doblah for all elementsfor (int i=0;i<_numberOfElements;i++) { doblah(element[i]);}
I'll rather do a new function, which doesn't need any comments
Commenting = bad solution in general
Refactoring and long variable/method names = good
(damn buggy source tags by the way)
[edited by - civguy on August 1, 2002 9:54:52 AM]