Naming Things

Who am I?

cat

Who cares?

Developers Developers Developers

Reasons

  • Readability
  • Maintainability
  • Understandability

Problems

  • Can't name
  • Can't find a name for something
  • Too lazy to name

Can't name?

  • You don't understand the problem, think about it.
  • Talk to someone about it (Rubber duck debugging).

or...

The (function|variable|class|etc..) is doing too much.

So you should...Refactor!

Can't find a name for something?

Use a Thesaurus and look for synonyms of whatever it is that you're doing.

Or a dictionary...

Names to avoid

  • No meaning (e.g. do_stuff)
  • Same meaning, different places (e.g. display/show/present)
  • Relative (e.g. new, old)
  • Names that are too big.

Abbreviations?

I already have a crappy name, what should I do?

Thank you!

@lurst