Wednesday, March 18, 2009

The Joy of Coding

I love to write code.

Funny, saying that, for though I am thinking of 'current' code, like html, css and php, but the feeling goes a long way back into my childhood. I can recall 'inventing' a code by mixing up the letters in the alphabet when I was about six or seven. I painstakingly transcribed the code onto s series of index cards, then wrote two or three 'encrypted' messages to my dad before I realized how much effort it required for even the simplest of notes. Then, too, I had no information that required a secret transfer, though I don't think this would have been too serious an impediment given my imagination.

I first discovered useful code--and I never did count Morse Code in this category, nor did I ever learn it, Cub Scouts notwithstanding--as a senior in high school when I took what was a the time a very nerdy and rudimentary introduction to computer programming. Programmers and coders today are fond of recalling the 'old days' when they first started, engaging in a sort of one-upmanship game like that game called the "Dozens"...you know, where you say: 'yo mama is so ____'. Alas, I am no different, but I do think that it's more than a bragging game because it does give a sense of how far we--as individual coders and as a society of the same--have come since we started. It's like looking back at the trail you've just walked; a satisfying if not terribly useful exercise.

At the risk of sounding like one of those grumpy old men who claim to have walked ten miles to school uphill in the snow both ways, I did start out programming at what today seems like the most primitive level possible: punch cards.

Odd it is to think that some people actually managed to eke out a career as a 'punch card operator' even though such a career had a very narrow window in the sixties and seventies and is now gone the way, literally, of the buggy whip. Not only do we no longer use punch cards, no one but a historian could be expected to even know why. Goodness knows it was a very crude method for say, adding and averaging a set of integers, often requiring a set of several dozen--up to several hundred--carefully punched and even more carefully stacked paper cards. Get one card out of order and the 'program' no longer works. Drop that stack of cards on the floor and, well, just start over.

I went from punch cards to FORTRAN and BASIC in college, writing a 'Star Trek' program for my semester project that 'ran' on computer the size of a refrigerator with an 'interface' that was nothing more than a teletype machine. After that, I had no use for the 'skills' gained from that grand experiment, and my code brain went dormant.

I might have thought my desire to code was dead, but the day that someone mentioned that "html might be what you are looking for" in response to my query about how to build a BBS (Bulletin Board Systems: precursors to websites) was definitely a turning point for me, even though it was another three years before I was actually introduced to html and the www.

I like elegant code, like poetry and cuisine. To me elegance is a function of simplicity. Simple code is the most beautiful because like poetry or food, it gathers strength of meaning from all things necessary and nothing that is not.

To code well, beauty must be the muse of the present and skill the servant of the unseen eye of the future. Any good craftsman knows he will be eventually be judged by the eye of future just as he has judged the work of the past.

1 comment:

d2 said...

Damn, I must be nearly as old as you. I remember coding on punch cards, too! We still used them at JPL up until 1997 when I left as timesheets, believe it or not.

I got introduced to HTML (ironically enough) at JPL by an engineer who didn't want the hassle of keeping up the Mars Pathfinder web site - which he was basically just using as a place to share spacecraft operating system code. I took it over gladly after his 10-minute lesson and built 10,000 pages in 2 years.

Ah, the good old days when I walked 20 miles to JPL in the Southern California snow...