You Name It
Nine out of ten developers regret the names they’ve given to functions and variables within a timeframe that ranges from minutes to months. The problem isn’t lack of experience, preparation, or motivation—it turns out to be much simpler: the moment you name something is also the moment you know the least about it.
The solution isn’t to spend more time planning and designing. You’ll always know less than you will once you’ve implemented the function or started assigning and working with the variable.
It’s not just about understanding the thing you’re naming—you also need to understand its context. Who will it interact with? Where will it live? What’s its expected lifespan? All of those details will tell you whether the function can be named like one of Elon Musk’s kids (x
), or like the heir of a noble house (FelipeJuanPabloAlfonsoDeTodosLosSantosDeBorbónyGrecia
).
The only way to get good names in your code is to get used to changing them: pick the best name that comes to mind, move forward with the implementation, review what you’ve written, and refactor with a better option. Iterating in short, frequent cycles is the most efficient way to spend your time and energy. If you spend ten minutes obsessing over a class name, asking ChatGPT, your teammates, and even your mom, you’re going to be way more reluctant to change it than if you only spent five seconds—you haven’t had time to grow attached.
Good names aren’t found—they’re grown. Give them room to evolve.
exit(0);