Hi,
Today I learned to always name business entities with two-word phrases.
Every codebase I worked with had a problem that the name of some entity (business domain object, code module, etc.) had changed at some point of time, but variable names that referenced it didn’t get updated, creating little chaos and unwelcoming environment for new developers in the team. Sometimes these renames could even be prevented up-front if the name was chosen more carefully.
There is an ever-going war for claiming the shortest names - in certain programming circles some words will always be associated with certain things -JIRA claimed the “issue” word, operations (cloud, concurrency) claimed the “job” and redux popularized usage of a word “action” in terms of events that can occur throughout the system. Unfortunately, these three words are also names for business entities in my current client’s system. Changing them to two-word phrases would resolve the conflict and even make them more expressive.
issue -> building issue
action -> issue action
job -> maintenance job
These new, extended names are so nice that you can already deduct from them in what industry my client is operating :)
Sincerely yours,
~Marek