Naming Things



Naming Things

0 0


naming-things-5min

My 5min talk on Naming Things

On Github LuRsT / naming-things-5min

Naming Things

Who am I?

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