|We don't bite newbies here... much|
Re(4): RFC CGI.pm refactoringby mstone (Deacon)
|on Feb 15, 2002 at 20:44 UTC||Need Help??|
> Sorry about the rant and the strong language but this is a pet peeve of mine.
Don't worry about it. People have strong feelings about this issue, and people with strong feelings express themselves forcefully. It takes more than an emphatic response to piss me off. I do like people who can swing back to a more measured tone once they've blown off some steam, though, and will advance you the respect of assuming you're one of them.
While I think you missed the point I was trying to make, it's clear that the fault was mine, not yours. I expressed myself badly, and your reaction does follow sensibly from what I actually wrote.
The offending phrase is 'figure out CGI.pm'. Since I was talking about interfaces, it only makes sense to assume that I meant learning CGI.pm's interface. That's not the case, though. What I meant falls closer to 'reverse engineer CGI.pm' -- or even 'read CGI.pm'.
See, my pet peeve is the idea that programming is a write-only occupation. I think Knuth was absolutely right when he decided that programming is a form of literature. We should be able to sit down with a glass of wine and a batch of source files, and enjoy them just as much as we'd enjoy a good book.
Good code is fun to read. It expresses the thoughts and personality of the programmer. It can be full of wit, style, and suspense, and can change the way we see the world. There are parts of the Perl source, for instance, that are absolutely delightful. Bad code, OTOH, is torture. And I'm sorry to say that I've had to wade through a lot more bad code than good code, because most programmers never once stop to think that another human might read the stuff. They treat code like it's a love letter to the compiler, and as long as the compiler understands them, they think their code is as good as it needs to be.
I've read CGI.pm -- several times -- and it's an awful read. It's a palimpset of quick fixes and grandiose schemes that may or may not have been executed with adequate skill. My visceral reaction to it is one of pure rage, and it annoys me to see people enshrine such a monster in the name of an otherwise good concept like code reuse.
I have more to say, but will post it in a thread of its own, rather than drift too far off-topic from this one. I'll merely note that the number of people who say "use CGI.pm" vastly outweighs the number who say, "read CGI.pm".