Code as art versus Code as a tool
Before I began programming, when someone pulled up a source code on a web page or started running unix commands in a terminal window it was all gobbledegook. It was just random strings of punctuation marks I rarely use and abbreviations that I didn’t understand. Now, code appears in chunks, recognizable chunks with purpose I can discern. I don’t pinpoint the exact functioning, but instead get a feel for and make predictions about how data might be passed through a function. Everything is structured with a purpose and moving one comma out of place or forgetting to close a parentheses could break the machine, and everything would fail. To me, it appeared a profession with no tolerance for error.
I quickly found out that programming, and specifically programming for the web, is a mess. It’s filled with dead ends, variables with non-descript names, and weird work arounds. I regularly find myself knocking wonky elements off the screen or hiding them under another element, sometimes even hiding things in plain sight to create different illusions. Regularly, programmers refer to ways to “trick” the server or browser, like we are some sort of magician hiding our true intentions from the machine.
These goofy hacks create beautiful corners of the web, some with no purpose (this one has raptors, I highly recommend checking it out), or others provide comical and useful tools used every day to generate cross-browser CSS. I think code with syntax highlighting looks pretty cool on it’s own, even without any context.
On the other end, we have machine-like code optimized to the last character, silently performing their duty millions of times a day. These honed programs and snippets are not designed to be pretty, but to serve a narrow function and nothing more. They are trimmed of the fat of the human brain, minified into unreadable mashes of code.
Take for instance the Google Analytics tracking code. Don’t mind if you don’t understand the script, I don’t even know what most of it does. Wtf is gaq.
var _gaq = _gaq || ;
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(‘script’); s.parentNode.insertBefore(ga, s);
Websites like CSS Zen Garden and WordPress like to analogize code to poetry, and I would have to agree. You must choose every character deliberately and remain focused on what you want to express. But at the end of the day, your code is converted into 01010101 and back in time frames that are nearly inconceivable and across oceans that used to take years to travel. Or hell, you could have written some of the millions of lines of C++ that landed with the Mars rover. What test cases do you even begin to prepare for on an alien planet?