Blog

A Dishwasher by any other name…

14 Feb 2023 - Estimated reading time: 3 min

Why do we call the appliance that washes our dishes a dishwasher but call the appliance that washes our clothes a washing machine rather than a clothes washer? This is the sort of question I ponder in an attempt to fill the void that colleagues fill with healthy human relationships and cycling.

But as the washing machine examples suggests, it’s not only software that suffers from inconsistent and confusing naming conventions. It seems obvious that a washing machine was called such because there was no need to be more specific in a world where the only machine that was washing anything was one washing your clothes. The world had a choice when dishwashers became available: rename everything to maintain consistency (so a washing machine becomes a clothes washer), or just not bother trying to change existing conventions and simply name the latest innovation as aptly as possible. The world opted for the latter, as do many developers when faced with a similar problem in a code base.

The old joke in computing is that there are only really two hard problems in computer science: naming things, cache invalidation, and off-by-one errors.

David Boyle - Hymans Robertson

Naming in the world of development is especially hard, though, given that it’s like the washing machine vs dishwasher example on steroids! New abstractions are created at a furious rate in most software projects. Imagine new white goods were being invented and going mainstream once a week. How would we keep the nomenclature comprehensible?

One solution is offered by domain-driven design (DDD). In DDD we are encouraged to define a, so called, ubiquitous language. This is the language spoken by the users of your applications. This language would include a curated list of defined terms. Any duplication or drift in meaning would be identified and corrective action taken in code. In other words, DDD proponents would advocate for a clothes washer.

Some names start off perfectly adequate but drift as the named thing evolves. I’d wager that, as a proportion of the time spent using the device, very few people spend much time using their phone to make phone calls. Visual language suffers from the same effect.  Who now would pick an icon representing a 3.5-inch floppy disk to represent the operation of saving your work in an application? 

Do you have any naming anomalies to add to the list?

In my next blog post, I’ll explore further some of the core ideas of DDD.

If you have any thoughts on anything covered in this blog, get in touch.

Subscribe to our news and insights

0 comments on this post