The Art of Naming Things in Software Development

Naming things seems simple—until you actually have to do it.

Whether it's a variable, a function, a database column, or an entire microservice, finding the right name can feel like trying to name a child you haven’t met yet. It’s hard, and it matters a lot.

In this post, we’re going to explore why naming is so tough, and how you can improve at it.


Why Is Naming So Hard?

Because names carry meaning—and developers have to predict the future:

  • Will this function always do this one thing?
  • Will this class evolve over time?
  • Is this field name clear to someone joining the project six months from now?

Naming forces you to think about scope, responsibility, and context. That’s not easy stuff. You’re not writing code for your compiler. You’re writing it for:

  • Your future self
  • Your teammates
  • New hires
  • Open source contributors

A good name is a tiny act of kindness to the people who will read your code later. Here it is some pratical tips for better naming:

  1. Be descriptive, not clever
    calculateInvoiceTotal() > doMathStuff()
  2. Avoid abbreviations (unless they’re obvious)
    user_id > usrid
  3. Keep it consistent
    Use the same terms across your codebase (e.g., don’t mix user, customer, and client if they’re the same thing).
  4. Favor intention-revealing names
    isExpired() says more than checkStatus().
  5. Don’t be afraid to rename
    Great codebases evolve. Naming should evolve with them.

You won’t get every name right the first time. And that’s okay.

But if you start treating naming as a skill—not an afterthought—you’ll become a better communicator, architect, and teammate.

Happy coding ✨