(2006-04-23)
I've been toying around with TurboGears lately, and it does taste pretty sweet. It contains some familiar bits and bolts, like CherryPy and SQLObject, but somehow they really managed to melt several components into an integrated and productive experience. (My apologies for the corny phrase.)
Though, if I were to sell TurboGears for some fellow developer, I wouldn't quite know how to do it. It feels great for me, but I'm not sure if I'm able to translate that feeling into words.
But then it dawned on me. What I couldn't quite describe was the absence of pain. You know, pain, that constant feeling that "this is not what I am supposed to do." TurboGears didn't give me a total absence of pain, mind you, but still a qualitatively different experience compared to, say, some Java frameworks. (I assume that frameworks like Django, Ruby on Rails and similar are on the par with TurboGears in this respect.)
Sure, you're expected to endure some of this mental pain if you're getting regular paychecks. If a job needs to be done, you just have to do it. You can't be a primadonna. Customer is the king, do whatever Customer wants.
But still, some pains are worse than others.
One of the worst pains (in programming) is the nagging feeling that there is an easier way to do whatever you're doing. I don't know if there are any working programmers (for whom salary is not a matter of life and death) who are satisfied with whatever tools they're thrown at. But I am sure that anyone of them is not going to be a decent programmer. No, if you want to become a decent programmer, you're never going to surrender to a "it doesn't matter, it's just work" slogan.
An excellent illustration of this pain is a little story I read in a university course material. I am just going to quote it here verbatim:
A college professor took two groups of 12 students to the woods. A low hill separated the groups so that, although aware of each other, neither group could see what the other was doing.
To the first group the professor assigned the task of chopping wood. He provided them with axes and agreed to pay them $2.00 per hour to chop, split, and stack logs. He assigned the second the same task at the same rate of pay, except that they could only use the blunt edge of the ax blade. They were not to use the sharp blade of the ax under any circumstances.
The first group, using the sharp edge, enjoyed the work and friendly competition sprang up. They could see the results of their efforts and began to take pride in the growing stack of chopped and split logs. The second group, required to thump the logs with the blunt edge of the ax, began to mutter about what the professor could do with this experiment. When they threatened to quit, the professor offered them more money to stay.
More money worked at first. However, soon even the increase in money was not enough to hold the second group to the task. The professor then continued to raise the hourly rate until he was paying $12.00 per hour when the last student ended the experiment, threw down his ax in disgust, and stalked off.
[Tannehill, 1974]
The mere thought of chopping wood with with the blunt edge makes most of us sick. (So long as there is an alternative.) Getting regular paycheck for that doesn't help either. (So long as you're not starving.) "This is not what I am supposed to do", you'd probably be thinking. "Screw this."
Of course, it's no different with programming tools. Chopping code with the blunt side of the axe makes you feel as mindnumbingly stupid as chopping wood with the blunt side of the axe.
But the analogy goes only so far. Switching to the sharp edge of the axe is easy. Switching the implementation language of a million lines legacy system is nigh impossible. Bringing another language to an established company is another lost battle.
And it's not just that. Defining sharpness in programming tools isn't that clear-cut either. It's obvious that you shouldn't chop wood with the blunt side of an axe. But with programming, we're not even sure what the blade is. Or whether we are chopping with the blunt or the sharp edge.
But still, that's just the difference I'm feeling with TurboGears. I'm enjoying it. I don't have the feeling that I'm working too hard because of the tool. Sure, my forehead gets a bit sweaty, but that's just sign of a growing stack of chopped logs.
You should find your sharp edge of the blade too. It's not necessarily, and not even probably, the same as mine. But chances are that it's not the XML-ridden, rusty old framework that you keep using. It should feel fun, that I can tell you. At least for some of the time.