Re:Every programmer has a variable naming philosophy
by rsclarke on Thursday February 04, 2010 @03:31PM
(#1101520)
I do not like long variable names and believe it is a combination of good commenting and inference through the code, that one should understand the role of the variable.
I was taught camel case for everything, which I don't agree with. Camel case for class names, everything else lower case, short and separated with underscores if needed. Collections are plural, e.g addresses, so that one can be generic in iteration and talk of an 'address'.
Re:Every programmer has a variable naming philosophy
by abstractbill on Thursday February 04, 2010 @02:40PM
(#1101377)
I do this too, and I use Emacs's autocomplete to write almost everything.
Another good reason is that I use search to navigate through files, and verbose names are easier to search for.
Perhaps I've just had to work with too much code that has poorly (in my opinion) named variables.
Then again I also have intellisense and autocomplete so I don't really fear a slightly longish variable name if it makes sense.