Improve one name today. Any name.
It can be a class name, a method name, a variable name, a constant name, a file name, anything.
If you just thought of a name you know needs improving, do that one.
If you can’t find a name that could be improved, consider these questions:
- Do you ever refer to the same concept slightly differently in different spots?
- Have you noticed anywhere where a previous rename missed a few references?
- Pop open your schema. Are your database columns named consistently? (This is just a special case of the first one.)
- Is the name you’d use to describe a concept to a coworker the same as what’s in the code?
- Is the name your customers would use the same as what’s in the code?
First thought was: “one name? Isn’t that pretty low goal?”. It isn’t. Took me a good amount of time to update all references to a package I renamed. And packages are much easier than tables/column names because if you start with them you also have to update the application(s) using it.
A common one i often see in eCommerce, CMS in particular…
Is developers naming em Orders & Orderables(Polymorphic), where the customers more often than not refer to Orders as the “Cart” and the Orderables as “Products”
Love the challenge today! Theoretically can be a nice & simple Monday morning task. (Or, like @Pesse mentioned, taking on a package name that needs to update things all over the place makes it a little tricker… luckily I’ve found regex search in VSCode to be a little more friendly than using vimgrep back in the day.)
I’m in the middle of a project to make a design pass over our reporting system, and digging in revealed that the names of several reports have changed multiple times through the course of the 7 years the project has existed.
I went through and made the names consistent, at least in the reports section of the app.
Aah I just found a series of 6 google map api requests, which are assigned to
Changing these to
map_streetview etc. Much better.