
Sean O’Halpin did a very nice job with his Unobtrusive Metaprogramming rant/presentation that has been making rounds particularly in the Rails community. Sean’s suggestions seem thought out, and the ideas he gives for the maturing rails community are sound. That said, I can see a bunch of folks taking Sean’s thinking as dogma (ala Edgar Dikjstra’s famous letter “Goto Considered Harmful”). I understand the futility of my efforts, but cannot help my urge to fight creativity-bashing dogmatic thinking.
Talks such as Sean’s are about how to be polite. And for sure politeness is a nice thing to be around. “Politeness is the art of choosing among your thoughts”, wrote Madame de Stael. So while a programmer should certainly choose carefully among the thoughts they offer the rest of the world, should we really care? No, and in fact, I would argue that new languages like Ruby and Go have grown out of the desire of programmers to have power restored to their hands, maybe at the expense of some politeness.
I’m talking here about the difference between Convention and Protocol. Convention helps people get along, if they want to. Protocol prescribes pre-arranged actions and consequences. Woe to those who violate protocol. The protocol of programming has become deep. Don’t use goto, don’t use private data, don’t use globals, don’t monkey patch, don’t put more than one class into a file, don’t return except from the end of a function, yada yada yada. Now I understand protocol is a great way, albeit Maoist, to get along, but convention is really a better choice for many programmers.
The fact that your patient gets well does not prove that your diagnosis was correct. ~Samuel J. Meltzer.
Many will point out that function calls really did improve the general quality of software from the the spaghetti-coded goto-strewn mess that preceded it. Likewise, it is also true that I see goto often and productively used in device drivers and OS kernels where conciseness and complex control are inevitable. And there lies the rub. Bruised fingers do not argue for outlawing hammers. Though a pneumatic nailer is a nice thing too. I once had a land-lady that insisted the workers replacing her roof use hammers. I understand her feeling.
Sometimes to do great work you need to have full control. Craftsmanship requires being so close to the workpiece that great skill can be distinguished from the damn near inevitable errors. The error has to be as likely as success to expose the skill, and the art. Folks choose Ruby so that they can monkey patch. If that’s a bad thing, maybe Java is a better choice for the project at hand? The agility of a tool like Ruby brings the possibility of getting cut by one’s own knife. And you know, that just might be a good thing.
Sean O’Halpin did a very nice job with his Unobtrusive Metaprogramming rant/presentation that has been making rounds particularly in the Rails community. Sean’s suggestions seem thought out, and the ideas he gives to the maturing rails community are sound. That said, I can see a bunch of folks taking Sean’s thinking as dogma (ala Edgar Dikjstra’s famous letter “Goto Considered Harmful”). I understand the futility of my efforts, but cannot help my urge to fight creativity-bashing dogmatic thinking.
Talks such as Sean’s are about how to be polite. And for sure politeness is a nice thing to be around. “Politeness is the art of choosing among your thoughts”, wrote Madame de Stael. So while a programmer should certainly choose carefully among the thoughts they offer the rest of the world, should we really care? No, and in fact, I would argue that new languages like Ruby and Go have grown out of the desire of programmers to have power restored to their hands, maybe at the expense of some politeness.
I’m talking here about the difference between Convention and Protocol. Convention helps people get along, if they want to. Protocol prescribes pre-arranged actions and consequences. Woe to those who violate protocol. The protocol of programming has become deep. Don’t use goto, don’t use private data, don’t use globals, don’t monkey patch, don’t put more than one class into a file, don’t return except from the end of a function, yada yada yada. Now I understand protocol is a great way, albeit Maoist, to get along, but convention is really a better choice for many programmers.
The fact that your patient gets well does not prove that your diagnosis was correct. Samuel J. Meltzer
Many will point out that function calls really did improve the general quality of software from the the spaghetti-coded goto-strewn mess that preceded it. Likewise, it is also true that I see goto often and productively used in device drivers and OS kernels where conciseness and complex control are inevitable. And there lies the rub. Bruised fingers do not argue for outlawing hammers. Though a pneumatic nailer is a nice thing too. I once had a land-lady that insisted the workers replacing her roof use hammers. I understand her feeling.
Sometimes to do great work you need to have full control. Craftsmanship requires being so close to the workpiece that great skill can be distinguished from the damn near inevitable errors. Error has to be as likely as success to expose the skill, and the art. Folks choose Ruby so that they can monkey patch. If that’s a bad thing, maybe Java is a better choice for the project at hand? The agility of a tool like Ruby brings the possibility of getting cut by one’s own knife. And you know, that just might be a good thing.