3 ms·
Do what I say, not what I do. (Guilty as charged, bad example.)
by edw519 17y ago
Do what I say, not what I do. (Guilty as charged, bad example.)
- seregine 17y agoSo when naming a variable, I have to remember all other identifiers in the project? Seems impractical, especially for large projects. My guideline is to use descriptive English words, not abbreviated. I take a minute to find the right word, check the dictionary or Google when necessary. If the same identifiers are used across the codebase, then they're used to describe similar feature. A little extra typing saves lots of debugging time. Not that my code has any bugs, mind you :) The other guideline is to spend more time choosing names for interfaces than for implementation variables, but that's just part of the general "interfaces are more important to get right."