In Search Of The Lost Program January 11th, 2018
Programmers just can't seem to stop making new things. You only have to look at how many different unit-test frameworks and build systems there are out there to see that. We're drawn to keep reinventing software that already exists, adding little improvements and new approaches. It's like a disease sometimes, it infects us, attaches to our brains while we sleep and whispers "Code me..."
It results in this explosion of software, all of which does exactly the same thing that all the other software does, except This One's Written In Rust, or This One's Got Python Support. They're not descendants of each other, which might build on previous code, but separate creations that begin anew. And while each may add one new idea, they tend to have forgotten at least one feature that the previous ones already did.
But why? Why can't we just make, say, the perfect build system, and then everyone could just use that? Why do we make so many programming languages and libraries all doing the same thing over and over again?
The Lost Chord
I heard there was a secret chord, that David played and it pleased the Lord.
There's this lovely myth in music of the Lost Chord. A chord better than any other, considered the Holy Grail of music. And having perhaps heard it clearly in a dream, a musician might spend his whole life circling around it trying to discover the notes that make it up, hoping to recreate the perfection he once briefly tasted.
The thing about a chord, for the non-musicians out there, is it's just a thing composed of at least 3 notes played together. So any old keyboard or guitar could play it, if only you could discover all the right notes to use. It's merely a matter of composition, so surely it would be easy to just hit all the right notes and let the chord ring out? So why haven't we found the secret chord yet?
The answer, somewhat obviously, is because it doesn't exist. At least, it doesn't exist in our world, it can't. The Moody Blues once released an entire album inspired by it, 1968's "In Search Of The Lost Chord". This snippet from there perhaps gives some insight:
The Word (The Moody Blues, 1968)
Two notes of the chord, that's our poor scope
But to reach the chord is our life's hope
And to name the chord is important to some
So they give it a word, and the word is...
The daydreaming musicians recognize something here. We get two notes, not the three needed. It's not just the we haven't found it, it's that it's unfindable by us. It's a mirage that hangs just on the horizon, but vanishes as you approach it. It's a Rubik's cube where you can get one side done, but then getting the second side done messes up the first one.
Perhaps computers are the same. Are we trying to solve impossible problems? Like a cartographer trying to produce a flat 2D map of the 3D earth, some tasks just aren't possible without at least one compromise. If you try and unpeel the Earth and flatten it out, something's going to end up looking the wrong shape. The Mercator projection, perhaps the most commonly-used world map view, makes Greenland look bigger than Australia, when in fact Australia is over 3 times bigger.
Or you could try the Peirce Quincunxial Projection, which has a lower overall distortion, but on the other hand splits Antarctica into four and makes Africa go funny.
The point is, there's no correct way to solve this particular problem, it's simply not possible. The only thing you can really do is to move into a higher dimension, where you can show a full 3D globe.
Maybe the inner truth of programming is something that can't be represented by our simpler world of variables and values, of bytes and registers. Are we just endlessly trying to find new ways to fit 9 bits into an 8-bit byte? Like the story of the blind men trying to describe an elephant, we're all just groping different parts of the perfect program we dreamt of, none of us able to get the full picture at once. Are we just circling around perfection, and never able to achieve it?
It seems to me sometimes that there will never be a One True build system, unit-test framework, or programming language. Every new programming language is destined to play just two notes of the chord, never the third. Perhaps programming is an impossible problem too, one we'll only ever truly overcome once we find a way to escape our current computing flatland and finally learn to move sideways.
Written by Richard Mitton,
software engineer and travelling wizard.
Follow me on twitter: http://twitter.com/grumpygiant