Why I Program

Adam Derewecki
Jul 11 · 3 min read

Originally posted October 22, 2008 when I was fresh out of undergrad and still wet behind the ears; reposted with minor revisions.

On the bus this morning, I read part of “The World is Flat” that deals with left-brain versus right-brain activities. To Friedman, jobs that can be replaced by technology and outsourcing (left-brain) and those that require an element of creativity (right-brain). Friedman made a statement:

“This weekend there will be accountants painting watercolors in their garages. There will be lawyers writing screen plays. But I guarantee you that you won’t find any sculptors who on weekends will be doing other people’s taxes for fun.”

Friedman is trying to convey that some things are done out of passion, and some out of necessity. People do taxes out of necessity, people paint watercolors out of passion. It’s all very black and white, and the jobs of necessity are the ones that are more easily outsourced overseas.

Why can’t there be passion for traditional “jobs of necessity”? One can outsource financial management to an established institution — but what about the excitement of finding and making a sound investment? There is satisfaction in having done the research and reaping the reward. You need a table to eat dinner on, but can’t creating that table be a creative outlet? When categorizing these jobs, I don’t think there are clear cut categories; it’s up to the individual to say what he is passionate about.

When I visit with my parents, a lot of my free time is devoted to programming — and they can’t figure out why. “You do this all day for work [school]. Can’t you put down the laptop?” While it’s true that I sit in front of a computer for my day job, I’m working on problems of necessity. Database development isn’t particularly exciting for me; what I’ve been working doesn’t require a lot of creativity and seems mechanical. So, in my free time, I need to exercise my creative muscle, and I choose programming for that task.

I’ve often said that good code is beautiful (no, I’m not talking about the Perl Camel). A well designed component or architecture has elegance and sophistication; simplicity yet robustness. You step back, look at the code, say “Damn, that’s gorgeous”, and you know when you’ve created beauty instead of a quick hack. This element of beauty is something that I’ve found lacking in a lot of code. Too often programming is treated like a boring job of necessity than the passionate job of creativity that it can be. The example I most often reference as an example of beautiful necessity is the Tornado web server.

This is why I enjoy coding in my free time. Sure, it’s all ones and zeros when it comes right down to it, but the important thing isn’t what the end product does; how you got there is so much more important. Programming gives you a chance to come up with creative solutions. And they don’t even have to be real problems!

I spent an entire day obsessed with the idea of programming language quines, which are programs that print out their own source code. Sounds easy, right? “Just keep a copy of the source code in the code, and print it out. Oh crap. How do I recursively store the code in the code…” Quines are, as my office mate likes to say, mental masturbation: they produce no value and in that sense are worthless, but so incredibly amazing at the same time.

I look at quines and other beautiful code with the same curiosity and admiration that I look at pieces of artwork in a museum; I appreciate them not because of their utility, but because of their elegance. And I code as a hobby outside of my day job not as a task of necessity, but the desire to create beauty.

Adam Derewecki

Written by

Hi! I’m Adam. I live in San Francisco, write code, take pictures, and practice yoga.