Clean code - naming - jaredgorski.org

Back to notes

Clean code - naming

Keywords: clean code, best practices, naming, programming
Date:
  • naming should reveal intent
    • code should be explicit
    • good names will tell a story
  • beware of confusing names
    • watch out for "collisions" in names, such as using the word "object" when something isn't an object
    • make names differentiable
  • make meaningful distinctions
    • if names must be different, they should mean different things
    • bad (non-descript): section 1, section 2, section 3, etc.
  • names should be:
    • pronounceable
    • searchable