Thorsten Ball

How can you not be romantic about programming?

08 Sep 2020

There’s a scene in Moneyball in which Brad Pitt’s character, the manager of the Oakland A’s, is watching a recording of one of his players trying so hard to run fast that he stumbles and falls. Lying on the ground he’s angry at himself, because he doesn’t realize that right before he started his run he hit a home run and scored the game-winning points. Watching the scene, Pitt leans back, smiles a Brad Pitt smile and says: “how can you not be romantic about baseball?”

There are moments in which I ask myself the same thing about programming.

We’re programming computers. We spend large parts of our days writing down instructions for machines. Other parts of the day are spent making sure that we chose the right instructions. Then we talk about those instructions: why and how we picked the ones we picked, which ones we will consider in the future, what those should do and why and how long it will probably take to write those down.

It can sound very serious and dry; a bureaucracy of computer instructions. And yet.

And yet we, the ostensible bureaucrats, talk about magic as something that exists — the good and the bad kind. There are wizards. Instructions are “like a sorcerer’s spells”.

We don’t call them instructions, though, not when talking about what we produce each day anyway. It’s code we write. Emotions are involved. Code, we say, can be: neat, nice, clean, crafted, baroque, minimal, solid, defensive, hacky, a hack, art, a piece of shit, the stupidest thing I’ve ever read, beautiful, like a poem.

Some lines of code are a riddle to anyone but their author and the name code serves as a warning. Other times, strangely, it’s a badge of honor.

Fantastic amounts of code have been written, from beginning to end, by a single person, typing away night after night after night, for years, until one day the code is fed to a machine and, abracadabra, a brightly coloured amusement park appears on screen. Other code has been written, re-written, torn apart and stitched back together across time zones, country borders and decades, not by a single person, but by hundreds or even thousands of different people.

This world of programming is held together by code. Millions and millions of lines of code. Nobody knows how much there is. Some of it is more than 30 years old, some less than a week, and chances are you used parts of both yesterday. There are lines of code floating around on our computers that haven’t been executed by a machine in years and probably won’t be for another lifetime. Others are the golden threads of this world, holding it together at the seams without no more than a dozen people knowing about it. Remove one of these and it all comes crashing down.

If you haven’t been here long enough and try to guess how much there is and how many generations are layered on top of each other — you won’t even come close. But stay around. After a while, more and more, you’ll find yourself in moments of awe, stunned by the size and fragility of it all; the mountains of work and talent and creativity and foresight and intelligence and luck that went into it. And you’ll reach for the word “magic” because you won’t know how else to describe it and then you lean back and smile, wondering how someone could not.

Follow me on twitter: @thorstenball. Or send me an email to me@thorstenball.com. Or check out my books at interpreterbook.com and compilerbook.com.

I also maintain a mailing list, on which I sent out occasional updates about my books or this blog. I won't spam you and you can unsubscribe at any time.

Click here to subscribe: Yes, I want to receive your very rare but also charming and sometimes funny emails!