3 ms·
So 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 de
by seregine 17y ago
So 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."