You may have heard the saying
“There are only two hard things in computer science: Cache invalidation and naming things.”
The web and Martin Fowler attribute this saying to one Phil Karlton; I actually thought it was Leslie Lamport, but maybe I’m confusing it with this saying
“A distributed system is one in which the failure of a computer you didn’t even know existed can render your own computer unusable.
In any case, why is the Karlton saying both funny and deeply insightful?
It is funny, because it compares something most expert will agree is difficult (cache invalidation) with something seemingly trivial (naming things), until you realize it isn’t trivial at all.
“Naming things” here stands in for understanding your domain of concern, which at its core involves giving domain concepts a proper name. Understanding your domain is where most of the hard work happens in software engineering. You can program all you want, if you don’t understand your concepts and their relationships, you won’t be able to name them properly, and if you can’t name them properly, you won’t be able to express problem solutions that meet your requirements. In other words, your code will be a garbled mess.
There is an important follow-up, equally surprising to many who don’t understand software development. The process that leads to naming things well is iterative, and it is in the trial and error of naming things badly at first that we learn and understand the domain of concern and thereby the problem and its possible solutions.
For this, we have Peter Naur. No famous quote that comes to my mind, but the wonderful anthology
Computing: A human activity.
The first article (from 1965) explains how programming is a tool for humans to learn. It is an iterative, incremental, intertwined process in which we search for solutions rather than following a simple linear path.
There is yet another dimension to Naur’s work. It is about how the tools we use influence how we solve problems, but I’ll leave this to another post. Or, and I recommend this, you simply turn to the original directly.
Leave a Reply