News for hackers. Stuff that matters.
Re:Every programmer has a variable naming philosophy by ryanelkins on Thursday February 04, 2010 @02:29PM (#1101350)
I like to be somewhat verbose with my naming. I don't like to abbreviate unless its a very common and well understood abbreviation. If nothing else because I can have a terrible memory and find myself struggling to remember exactly what a variable is storing otherwise. I can't imagine what it would be like for a different programmer entirely.

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.

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.