Domain-driven design includes the idea of a “ubiquitous language” where the engineers and the domain experts and the product owners come together and agree on terminology for all the domain concepts, and the project then uses that terminology everywhere.

But on the projects I’ve been involved with, much more common is a situation where the requirements docs mostly use one term but sometimes use a different name for the same thing because the docs were worked on by two people who disagreed on the terms, the designers decide they don’t like how the words look so the UI calls the concept something else, the database developer reverses the term’s word order to fit their personally-preferred schema naming conventions, the API designer invents a compound name that includes both the UI and the database names, and so on. (I only barely exaggerate.) Which names map to which other names becomes tribal knowledge that’s usually not written down anywhere.

This kind of thing bugs me a lot, but I seem to be in the minority. I recognize that it makes very little functional difference, but it just feels sloppy to me and I don’t like having to remember multiple names for things. I will usually advocate for renaming things in the code for consistency, and other people on the team will almost always agree that it’s a good idea and will happily accept my PRs, but I’m usually the only one taking the initiative.

So, my question to you fine folks: am I wrong to care much about this? Do you think using consistent names for domain concepts across the board actually makes a meaningful difference in terms of code maintainability and discoverability? Or is the effort required to keep the names consistent over time actually greater than the mental overhead of working with the inconsistent names?

  • mo_ztt ✅
    link
    fedilink
    English
    181 year ago

    It’s a symptom of a general lack of respect and lack of desire to collaborate with one another. Compared to real problems you’ll face in trying to communicate and collaborate towards a goal, it’s a miniscule level of effort required to get on the same page with what things are called and then roughly stick to it going forward.

    Is the difference in naming going to make a difference? Maybe. The little extra bit of cognitive load and confusion that can result may or may not hurt, although it definitely won’t help. How about the lack of shared desire to put in the effort that it takes to operate as a cohesive unit; is that going to make a difference? Yes, yes, a thousand times yes.

    It may or may not be something worth stressing over or trying to fix on your end (sometimes it just be that way), but it’s definitely not unimportant.