Castles in the Air - A Brief Explanation of the Joy of Programming

November 11, 2020

castle-under-construction

He builds his castles in the air, from air, creating by exertion of the imagination. (…) The magic of myth and legend has come true in our time. One types the correct incantation on a keyboard, and a display screen comes to life, showing things that never were nor could be. -Frederick Brooks Jr., “The Mythical Man-Month: Essays in Software Engineering”

When I was ten years old, I was obsessed with Legos. While watching Saturday morning cartoons I would build castles, caves and secret lairs and conjure up elaborate stories about pirates, bounty hunters, space adventures and buried treasure. I don’t think it’s a coincidence that years later I work in programming. What is a program if not a bigger Lego set?

I always use the Lego analogy whenever a friend wonders why I find programming so interesting. To many, it seems the same as reading the terms of service of a product or watching a congressional hearing on C-SPAN.

But to me, it’s never been a question of why. Simply put, the joy of programming is the thrill of engaging in pure creation - to shape something out of nothing. In a world defined by mass media consumption, Lean Cuisine dinners and Keurig cups, how often do we get to create things anymore? Just as a carpenter delights in slowly piecing together a bookshelf, a programmer derives immense satisfaction in seeing a piece of software take form - especially one that is carefully crafted, written with an attention to clean code and built on time-tested design principles.

Unlike any other medium, programming provides instant, consequence-free feedback. When painting or cooking, an errant brush stroke or overzealous application of baking soda can have dire consequences. In code, one need only press the delete key to undo the damage. Like a painter in front of a blank canvas - a programmer in front of an empty screen is faced with endless possibilities and limited only by the bounds of their imagination. Nothing is out of reach including robots, self-driving cars, apps that cater to our every need and virtual worlds we can get lost in.

A working, complex software application - even one held together with duct tape (as most programs are), is like a musical composition with each line of code blending together in harmony.

We practice witchcraft. We speak the right words. Then we create life itself… out of chaos. -Dr. Robert Ford, HBO’s “Westworld”

It is also a medium in ascendence. There has never been a better time to work in the industry. Just as film was the art form of the 20th century, so is code for the 21st. As famed VC head Marc Andreessen puts it, “Software is eating the world”. We use software to shop, do our taxes and stay connected to family. We use it to order food, listen to music and even find love. Software has toppled governments, sparked revolutions and swayed elections. To be a software engineer at this moment in time is to be on the cusp of a wave that has only begun to crest.

The information revolution has been such a huge paradigm shift that even the most optimistic and forward looking science fiction of the 20th century couldn’t grasp its potential. We have the processing power of a yesterday’s supercomputers, the entirety of the world’s knowledge and the ability to communicate with anybody in the world in a device that fits in the palm of our hands. And it’s all thanks to code - code that exists in our phones, our cars and even our toasters.

To be part of all that is exhilarating but also comes with tremendous responsibility- code now touches every facet of our life. Oppenheimer, quoting the Bhagavad Gita, famously said, “I am become death, destroyer of worlds,” in reflecting on the creation of the Atom Bomb. Programmers have a similar responsibility to pause and reflect on what they are building. One only needs to look back at the last few years to know that software can cause incredible harm. Our algorithms have the power to create as well as destroy and that is not something to be taken lightly. Creation requires taking ownership.

Of course, nothing is without its downsides - the bureaucracy can be draining, debugging is seldom fun and building the same widgets over and over can get tedious. But there’s also no other job that I’ve had that makes me feel like I’m ten years old again, sitting in front of a fresh set of lego blocks on a rainy Saturday morning.