An Ode to C

I actually wrote this several months ago, before I started this blog. Two (really three) great but very different blogs posted this week made me decide to dig it up.

{

I took some C classes in my early 20’s.

It was mostly for the exposure. I had absolutely no call for anything of the kind in my job at the time, nor any plans to significantly alter my career path. And yet, they’re some of the classes that have stuck with me the most over the years.

Until then, my sole coding experience had been short BASIC programs to create silly graphics with quarter-inch color blocks on Apple IIes in elementary school. This was different.

I was fascinated by the fact that you had to think about the address space you were writing to (8-bit at that time). I was constantly, forcibly aware of the physicality of the machine I was haphazardly, like the sorcerer’s apprentice, bringing to life. That sort of intimacy was novel.

I loved the enforced conciseness. It always made me think of Tang poetry. Tang poems are conceptually dense. They have a tight word count: typically 5 or 7 words in a line. Most are entirely composed of nouns, verbs, and adjectives/adverbs, with few or no function words (no prepositions, no words like “of” or “to”, etc)–nothing extraneous that would clutter up the core meaning. The result is very primal and visual, leaving you with a small handful of concentrated images to contemplate.

Image

Spring Scene, by Du Fu (translations, audio)

I came to like the moment when I got to write “i++;”. After hacking my way through a set of commands, there came the gentle, familiar little refrain, the end of the stanza. I liked the rhythm that it contributed within a completed program.

Later I started taking a Java class. Java was all the rage then. “Write once, read anywhere!” was the cry, except that was a lie. And it was verbose. Sure, it had its advantages as an object-oriented language. But it felt more intellectual, overexplanatory, less immediate…like Song poetry. And it took three lines of code to simply say “i++;”! Ridiculous. Overwrought. Top-heavy with abstractions.

But I’d realized something that, had I understood it five to ten years earlier, might have significantly affected my career choices: that despite—or better, within—the rules and constraints of a machine language (really a human language, like any other), there’s plenty of room for aesthetic choices and personal expression.

But then, you know, daily life takes over. You work 60+ hours a week. Maybe you acquire a spouse, house, offspring. They all have their own never-ending array of activities and obligations that you’re caught up in. It’s all a big pile of spaghetti. Sometimes you get stuck in loops, or things hang, or heaven forbid, you find yourself dealing with a core dump and have to rebuild almost everything.

But every once in a while, when your mind is relaxed enough to receive it, something will cross your path that will remind you of a long-buried epiphany. Often it’s because your last flurry of activities is complete and it’s time to move forward and iterate on them.

It doesn’t have to be a grand leap. Just a single step will often do.

One small step.

i++;

}

Be sure to also read Burning Out on Your Career by John Herbert and Burnout Redux by Teren Bryson.

Advertisements

3 comments on “An Ode to C

  1. You nailed it. There is an elegance to ‘C’ that makes you care about your code. I solved problem “x” with algorithm “y” and I cleaned up after myself. The code speaks for itself. Sure, you can turn it into a lesson in obscurity, but well written C is authentic. It has a purpose, it’s designed well.

    Java is “throw away” code. Frameworks within forgotten frameworks. Broken castles, paper walls. Sell it for a dollar on Google Play, maybe it’ll work. Maybe it won’t drain the battery. Ticker-tape parades for cracker-jack prizes, when the fanfare dies and the stock crashes, throw away the needle. Needles are cheap.

    Erlang gives me hope.

    Time for coffee.

  2. Coding as poetry… I love the metaphor… I wrote C++, java, visual basic, prolog, php, Object pascal… and it is so true – each language has its comparative art form. I recall that I had an early programming teacher who loved recursive algorithms. To this day I have had a fascination with recursive algorithms. When I worked as a consultant at Accenture, they were very against the use of recursion – very hard for another programmer to understand easily and debug or re-code. I haven’t coded for many years now… almost miss the days of i++;}

  3. Pingback: Stop Hiding. Just Ask. | The Borg Queen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s