Tuesday, February 17, 2009

If We Love What We Do, Why Are We Trying To Not Do It?

Seems like the Universe wants me to talk about something today, as at least 4 different sources have all touched on the same topic – namely, what is the essence of the “hacker” programmer.  You know what I mean if you read my blog – the passionate, lives and breathes for it, if you didn’t pay him (and even if you do) he’ll do it anyway sort of guy who was born to this stuff, you can see it in his eyes when he talks about it.  Know the type?  Heck, you might be the type.  I’d like to think I am, when the stars align.

Now, here’s the question – we love what we do, right?  We wake up in the middle of the night because we just thought of the fix for a bug, and we have to get up at 2:30 to code it.  If we don’t have enough work at the day job, we come up with projects for ourselves at night.  True?  Or at least, true enough for discussion?

How come we’re also so busy trying to stop doing it?  One of the core principals for many (Ruby on Rails fanatics in particular) is, Don’t Repeat Yourself.  Said another way, “Programmers are lazy, and that’s a good thing.”  We are always on the lookout to refactor some code, or build a tool to get around a job we were doing by hand.  Asked to solve one problem, we imagine 10 variations of the problem and write a program once that will solve all of them, just in case we’re going to be asked.

See the paradox?  On the one hand we love it, but on the other it seems like we spend our days trying to find ways to get around doing it.

So what it is, exactly, that we’re after?  It’s obviously not writing code.  When you refactor, chances are very good that you’re refactoring your own code, so it’s not like you can say “I wrote better code in place of code that sucked.”  Maybe you can, but that’d be because your perception changed, you probably didn’t think the code sucked the first time you wrote it.

If the perfect IDE existed where it wrote the code for you, would you use it?  Or would you want to hack the code generator to see how it worked?  What is the part that we love so much, and how do we know it when we’ve found it?


steveo said...

Stop doing it? My focus is on doing more of it by being efficient. Who wants to do the same thing 10 times when you can do it one, use it 10 times, then move on to something more exciting?

Duane said...

Then what is the exciting part? How do you quantify that bit?

I'm reminded of Robert Pirsig's book Lila, where he spent a good deal of time trying to find the meaning of "quality". He gives the example of hearing a new song on the radio, then rushing out to buy the album (it's an old book!) and playing it over and over again until you're sick of it. Did it lose quality? The song itself did not change, after all.

I think that the rush we get is similar - solve a problem once and it is exciting, and maybe you get a similar rush from babysitting your v1.0 through some point revisions, but eventually you're going to get bored with it - even though it's code you wrote for a problem you solved.

steveo said...

Sure, I'd say I enjoy creativity and novelty. Coming up with exiting and novel programming projects has never been a problem. Getting around to doing them all is usually the problem. I don't enjoy programming because I like sitting in front of a computer, I don't enjoy it because I like taping keys. I enjoy thinking about new things and seeing something that I'm implementing come to life.

I'm sure that one of your four sources for this post was the recent daily WTF article. Developers actually try to come up with solutions that are overly complex solutions to avoid drudge work. It leads to implementations that are less than ideal.