"There are only two hard things in Computer Science 0. Off-by-one errors
- cache invalidation
- naming things" - Phil Karlton
Things to remember
Let the meaning choose the word.
Describe the thing you have been visualising you probably hunt about until you find the exact words that seem to fit it.
Never use metaphor, toolongaword, jargon
Abbreviations are ambiguous for instance char stands for character or characteristics. But try to make it more meaningful.
Allow one exception: id for 'identity'
One letter is too short for instance, var a, var b
Vague words are vague for instance "manager" could mean supervisor, planning manager etc.
Don't get confused with synonyms :
- order IS NOT EQUAL TO shipment
- carrier IS NOT EQUAL TO broker INSTEAD
- shipment IS EQUALS TO consignment
- carrier IS EQUALS TO transporter
Multiple words can be replaced by more specific words e.g company_person means employee or owner!! Don't be too generic!
- What is the worst ever variable name?
- What is the second-worst name?
Any guesses for the third one??