The Joy of Programming

Friendster and Digital Identity < Weekly Archives > Waypath: A "What's Related" for Weblogs

The Joy of Programming

personal, philosophy, software development

June 13, 2003, 01:05 AM

I've been thinking recently about the craft of programming, and why it is that some people derive a strong and fulfilling enjoyment from this activity that many others do not. I'm certainly among those who enjoy programming, but I was at a loss to clearly explain what it is I see in sitting in front of a computer monitor typing in cryptic codes, testing them, getting angry and frustrated when they inevitably don't work, etc. This lead me back to Fred Brooks's The Mythical Man-Month.

In the first essay of this wonderful collection, Brooks articulates the joys and woes of the programmer's craft better than anyone I've read since. At the end of "The Tar Pit", he writes:

Finally, there is the delight of working in such a tractable medium. The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination. Few media of creation are so flexible, so easy to polish and rework, so readily capable of realizing grand conceptual structures....

Yet the program construct, like the poet's words, is real in the sense that it moves and works, producing visible outputs separate from the construct itself. It prints results, draws pictures, produces sounds, moves arms. 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.

Programming then is fun because it gratifies creative longings built deep within us and delights sensibilities we have in common with all men.

The Mythical Man-Month by Fred Brooks, pages 7-8

Programming is, above all, a creation act. In this sense, writing a good program is not so very different from designing a usable interface, or producing an aesthetic work of art, or writing a clearly articulated essay, or any of the other myriad creation acts humans delight in. And yet, in a sense, programming is more "pure" than these others, with the possible exception of poetry, as Brooks implies. For the programmer essentially works with concepts alone, he builds abstractions that have no real basis in reality. Our interlocking pieces, our classes and modules and functions, have no true existence within the machine; we simply pretend that they do because it is much easier to grok than the billions of electrical signals flying around that constitute what's really happening. Castles in the air.

My father is a cabinetmaker. He builds fine furniture and other functional art from wood, nails, and glue, and he takes pride in being considered a fine craftsman. I too am a craftsman, but I do not work with wood. I work with pure thought, with interlocking concepts, patterns, and algorithms. And where my father creates with his hands, I create through pure force of will. Dream up a vision, then type the words, the correct incantation, and it shall be so. The mantra of the modern magician.

Yet like any craft, programming has its dark moments. Brooks continues to describe the woes of the craft:

First, one must perform perfectly. The computer resembles the magic of legend in this respect, too. If one character, one pause, of the incantation is not strictly in proper form, the magic doesn't work. Human beings are not accustomed to being perfect, and few areas of human activity demand it. Adjusting to the requirements for perfection is, I think, the most difficult part of learning to program.

...

The next woe is that designing grand concepts is fun; finding nitty little bugs is just work. With any creative activity comes dreary hours of tedious, painstaking labor, and programming is no exception.

Ibid, pages 8-9

All creativity has its share of toil and drudgery. It is sometimes easy to get lost among the toil; to get frustrated by the bugs and distracted by syntax and details. Veils. It is easy to miss what lies behind them. Ultimately, it's important is to keep your eyes fixed on the goal: to produce the creation, to perform the act of creating, to be the creator. Little else brings you closer to the divine.

Commentary

Posted by Jason Silver on April 02, 2004 at 02:12 PM

I was the kid that drew maps of secret tunnels underground, or floor-plans of castles I’d someday build. I liked to assemble Lego blocks, or Mechanno into wild and crazy inventions. I experimented with electricity, I carved into wood— but none of these mediums were as pliable as I would have them.

I ran out of Legos before my structure was finished. My floor-plans never transpired into real houses. I didn’t have the resources I needed to dig underground tunnels. My mum and dad gave me a hard time for blowing so many fuses.

But with computers, there is no limit to what “could be.” I can design anything; run it, turn it, view it, play with it, mold it, use it— simply by tapping away on a keyboard. And no electric shocks.

Got Something to Say About This?

Email Rob:

OR Post a Comment:

 

Enter the number below into the text box next to it.*


 

* These fields are required. Your email address will not be publicly displayed. Your web address is optional, and will be publicly displayed if provided.

Allowed HTML: a href, strong, em, ul, ol, li, blockquote, dl, dt, dd, dfn, code, q, samp, kbd, var, cite, abbr title, acronym title, sub, sup