More complicated than it needs to be

Daniel Cooper
Shouting about code
3 min readJul 25, 2014

--

I’ve got into a bit of a habit of listening to podcasts on my phone as I drift off to sleep. I’m not sure how much I’m learning, but it’s better than listening to the sound of Brighton seagulls — who this time of year are fat and drunk with stolen kebabs.

Last night I started The History of the World in 100 Objects and Ep 1 was very interesting. One section particularly caught my attention, referring to a stone tool made just shy of 2 million years ago.

Is it more complex than was needed to actually serve the function which he used it for? Do you know, I think you could almost say it is. Did he really need to do one, two, three, four, five chips on one side and four on the other? Could he have got away with two? I think he might have done so. I think the man or woman who held this, made it just for that particular job and perhaps got some satisfaction from knowing that it was going to do it very effectively, very economically and very neatly. In time, you’d say he’d done it beautifully but, maybe not yet … the start of a journey.

The program then goes on to suggest that this is an intrinsically human characteristic — to do more than the bare minimum.

So, this got me thinking. Is the same drive found in this prehistoric guy in Africa also found in the modern web developer?

Test Driven development tells us to write our test and then write the simplest passing code to progress. KISS says that things work best when they’re simple and that that should be a design goal. Single Responsibility Principle is about nothing if not about keeping complexity down.

But these are all things we have to cajole ourselves into. I’ve lost count of the times I’ve made, to my great joy, a system more complex (and I would have said at the time, powerful) than the spec required.

In software, at least, any large system is really a collection of smaller systems strung together to give the impression of a whole. Each of those smaller systems, designed by different people at different times and in different moods, should be as simple as possible. But for that to be the case we’re relying on everyone, all the time, to be able to fight what seems to be a fundamental urge to complicate things.

As soon as a single developer succumbs to their inner complexity demons we’ve lost. The system is now below peak simpleness and will continue on this downward spiral until we need to refactor away all of these tiny battles — some won, some lost — between what we know is right and what we’re driven to make.

Is there a solution to this? Fucked if I know.

--

--