December 19, 2001Accidental ProgrammingIn this month's article I'll examine "The Lost Art of Computer Programming" giving credit to the original author of "The Art of Computer Programming". Along the way you'll find a status report on my continuing journey towards heightened awareness and a reminder of the dirty tricks of history. In these heady daze(sic) of .NET, mono, SOAP, java, xml, object oriented software design and "network as computer" metaphors we (professional programmers) seem to have lost sight of the "computer as machine" truism. Despite all the power of abstractions a fundamental understanding of how the machine really works remains invaluable. Like many modern engineers today I began life with a computer in the house -- OK technically not since birth, but since the time I was 8 years old and Pops brought home that Apple ][+ things just haven't been the same (with a little math YOU can date me). By no means do I consider myself a great programmer, or even a good programmer -- in polite company I stifle a cough when saying I'm a "Software Engineer", quietly knowing I'm a little more than a quick hack. I know people who can code circles around me in various problem domains, whose understanding of the underpinnings of the problem far exceed my own. I am an accidental programmer. That first Apple that my father bought did little to teach me the "Art of Computer Programming". What it did teach me is that playing games like Ultima, The Bard's Tale and Wizardy was wickedly fun -- not a very practical thing to know. As a teenager I spelunked into 6502 programming enough to implement a bubble sort algorithm simply because I could, not out of necessity. I also played with "Apple Pascal" -- it's compile and link stages fascinated the BASIC programmer I was. I thought it cute I had to shuffle four 5.25" floppy disks in and out of the drive to compile and link a simple "Hello World" application. The LOGO-like "TurleGraphics" was also very cool, with simple statements like used to make isoscelese triangles. All things being equal computers rated about a 6.5 on a scale of one to ten, somewhat behind playing basketball during the day and drinking cold beer during cool summer nights in the Mojave Desert where I grew up. After all you couldn't get a computer drunk under a stary desert sky as you unhooked her bra all the while explaining that the twinkling starlight was billions of years old. (BTW the desert is an excellent place to be a teenager, where one can get into all manner of red neck rural mischief -- guns, dirt bikes, beer, explosives ... all the stories you've ever heard are true.) Computers did rank above going to church on Sunday's and watching TV strangely enough. Computers were fun, but my sport-o, jock-o, red neck friends could care less -- the sun is shining (the sun is always shining) outside in the desert. Being mathematically inclined and curious about the universe I enrolled as a Physics major at a University of California. Physics seemed like the ideal major for one whom mathematics came easily, but for whom actually **doing** math was tedious. The beauty of partial differential equations, wave mechanics and complex numbers intrigued me -- using these concepts to model and understand the sights, sounds and experiences of the physical world around me was extremely compelling. The further I went in physics the more intriguing it became, going from simple torque equations that explained why I could ride my bicycle with no hands to the more esoteric quantum mechanics, general relativity, high energy particle physics, astrophysics and cosmology. Very heady concepts for a young man set about understanding the universe and securing his place in it. But I digress, this article is about programming. As a physics major I received my first mainframe computer account unlocking a Pandora's Box that has not closed since. Gopher, FTP, email, who-is -- all these people connected to machines, which in turn are connected to more machines with people connected to them. Fascinating. People to machines. Machines to people. Fascinating, but not physics. Physics was all about FORTRAN, long doubles, complex variables, crunch, crunch, crunch. While in graduate school in the early 1990s two realizations would lead me to discover that Physics was not for me, sort of. First, while questioning the universe I thought physics held some answers to the unexplainable. So I attended a seminar on "Early Universe Cosmology" given by visiting theoretical "bad-asses" from around the globe. What a disappointment to find these "experts" arguing over the fundamentals of their science. In truth they knew just as little as I did, perhaps less. Second, while writing pattern recognition software for a high energy physics detector I decided that FORTRAN was crap and would instead write my filter routines in C and figure out how to link to the monolithic FORTRAN libraries (we were running Ultrix at the time). A fellow grad student questioned this approach to which I dryly replied "If physics does not pan out I hope to get a real job some day." (BTW Graduate school is a great place to see what you do not want to become -- either a grumpy 7th year student, or worse an even grumpier post-doc making slightly less than the campus grounds keeper on four hours of sleep per night.) It was also clear I was no Einstein, that I was not destined to be a theoretical physicist ( my hat's off to those that are!) . At 23 years old I was hopelessly washed up as a theoretical physicist and the thought of spending all my time indoors in a basement laboratory sounded, well ... horrible. That the summer the kiss of death came: I discovered this little program called mosaic. The rest, as they say, is history. I dropped out of grad school, packed my bags and landed a job in the heart of silicon valley -- Menlo Park, CA. __Close_but_no_cigar__ I landed in Silicon Valley, but I did not land on the Internet. When the dust cleared I found myself at a digital map company, writing software that integrated text tour guide information with digital map data. All of this was for GPS car navigation systems and had little to do with the Internet (though a couple of people left said digital map company to go and found MapQuest about the time I joined). Here I really cut my teeth with UNIX on SunOS 4.1 . Here I had to keep up with people who were "real" computer scientists, people with Ph.D's in mathematics and topology (calculating routes on a topologically correct road network map is non-trivial). These people were good to me and taught me many programming principles, most of which were gleaned by trying to grok their source code. I also learned to leverage the power of an OS with virtual memory -- I really could allocate a gigabytes worth of unsigned ints, even if my Sparc5 workstation only had 128MB of RAM. Really, how cool is that? What a beautiful abstraction! That discovery also marked the beginning of my decline -- I started to become a really lazy programmer. From there I moved to C/C++ Win32 programming and sloppy GUI design. I copied and pasted, cursed, used the debugger, swore and generated the most horrible looking makefiles. At one point I even generated afx DLLs that worked only during certain phases of the moon. Nasty bad habits. Then things took a turn for the worse.... I was assigned to a Visual Basic project -- now I really could sit back and forget all about how the underlying OS machinery worked (except when it came time to write the InstallShield, which unfailing fucked any system we installed to -- uninstall, my butt). VB made life so simple, so easy, so ... dangerous. About this time the Internet madness was really picking up steam, when it seemed like any hack (me) with confidence could get funding for even the most hair brained idea. It was time to found a start-up Internet company. What could be more en vogue? Luckily for me and my partners funding a bad idea is a two-way street -- first it takes a hare brained idea and then it takes someone zany enough to invest in it. Coupled together you really understand the phrase "burn rate". The story about the formation, function and dis-function of that start-up I will leave for a future article. Remember I promised this story, I mean article, would be about programming. Our start-up was based on a well known GNU operating system including Apache, PERL and postgresql. Perl is great for implementing whatever you want in the shortest amount of time possible ... a hacker's language. Among other things our company was into the nuevo chic business of wireless e-commerce. We were right in the middle of everything that was happening: web meets phone meets bank account. Who has the most efficient method of moving money from one wallet into one's own? We quickly adopted SOAP before most application server vendor's supported it -- it seemed like the perfect way to get disparate machines talking the same language quickly and easily. Our colleagues on the other end of the pipe balked at first, but ultimately gave into our design more out of fear of being left behind in the information arms race than anything else. __Kaboom__ Then the bubble burst... wireless wasn't hot, e-commerce wasn't hot, nothing was hot. Our fun little start-up whirlwind settled down to little more than a gentle breeze on a Sunday afternoon. It was about this time I started going to a little Lutheran church around the corner from my apartment -- I was raised Lutheran and I could draw some comfort from ceremonies repeated throughout my childhood. Something stable. The first Sunday my fianc� and I attended Church we stood around after the service talking with various people. One tall older gentleman came up, shook our hands and asked if we were new to the area. Did we work at Stanford? "No," I replied. "I work at a small Internet startup," I said sheepishly while stifling a cough. "Oh, well don't tell me anything I need to sign an NDA for," he said. "Don't worry about that," I laughed. "All of our stuff is open source and public domain anyway." The old man cocked an eyebrow at me and said, "I've written a few open source programs in my day. Perhaps I didn't introduce myself. My name is Don ... Don Knuth." Holy shit. Exposed. In church no less. In front of a true computer scientist, if not THE defining computer scientist. "I have your books on my bookshelf," I gushed like a school girl. "A lot of people have my books on their bookshelves. That's the problem, they need to read them," he said. I don't remember much of what happened next. Later my fianc� told me I looked sort of pitiful with my mouth hanging open. She had never seen my fast talking self stopped dead in my tracks. It was terribly humbling. Terribly. It was then I decided that my next gig would be to uncover the lost art of programming. Time to quit screwing around and actually learn the trade. to be continued... The next installment "Crossover -- WSDL to Gamma Ray Telescopes" email me and I'll send you next month's installment -- curt@acm.org |
|||
|