Skip to content

Instantly share code, notes, and snippets.

@yannbertrand
Created January 7, 2016 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yannbertrand/54d32865519cbd399f45 to your computer and use it in GitHub Desktop.
Save yannbertrand/54d32865519cbd399f45 to your computer and use it in GitHub Desktop.
Some advices to apply good names for your programming entities
See http://fr.slideshare.net/pirhilton/how-to-name-things-the-hardest-problem-in-programming by @hilton
Summary of naming things badly :
- meaningless: foo
- too general: data
- too short: a
- too long: text_correction_by_editor
- abbreviated: acc (id is the only acceptable abbreviation)
- vague: InvoiceManager
- wrong: order
- just not funny: startCamel
Replace vague words with more specific synonyms:
- Manager/do
- Object/execute
- Data/perform
- Thing/operate
- Info/manage
- Amount/handle
- Details/get
Never stop learning new vocabulary !
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment