Naming convention. Top 10 worst names for your development projects

We all know that naming things takes more time than coding. Here are the ten worst common names to give to your files, variables, classes…

Let’s start:

  1. “new”. If you are doing a refactoring, today you are making a “new” template. But this will sound pretty ridiculous in five years.
  2. “old”. 100% of the time, when you call something “old” it means you should just trash it.
  3. “data”. Ok, it’s clear that we’re talking about “data” and not broccoli, you’re not telling me anything new about the content of that variable.
  4. “clean”. This drives me crazy. All you can tell me about your file is that it’s “clean”?? You should talk to a psychologist about it.
  5. “something1” or “something2”. I bet you will need a “something1-A” soon. Same goes for “first” and “second”
  6. “manageResponse()". I always used this in the beginning (and when I’m desperate I still do it). What exactly will we do with this response?
  7. “custom”. This means nothing. Custom compared to what??
  8. “somethingOK”. I’m glad you are happy about your work, but there’s bound to be a “somethingKO” somewhere
  9. “x”. Or any other single letter. We all are lazy, but this is too much.
  10. “last” You bloody optimistic. You will regret it bitterly

Jokes aside, it’s important to choose names that have a clear, simple and unambiguous meaning. If that’s not possible, maybe something is wrong. But not in the name, right in the code!

Irene Iaccio

Freelance web developer

Subscribe to the monthly digest!

I'll use your email only to send you the latest posts once a month.