|Do you know where your variables are?|
Re: Never, never, neverby mstone (Deacon)
|on Apr 24, 2005 at 01:47 UTC||Need Help??|
There's an old german proverb:
Follow the traditions until you know what they're for. Then do whatever you want.
That broadly applies to your question. Rules like "never do X," and "always do Y" are the condensed version of some larger, more complicated piece of wisdom. But those rules don't actually teach you the wisdom. Take "never use symbolic refs" for instance. It's easy enough to follow that rule, but what do we learn from doing so?
If we dig into what the rule is for, we discover concepts like data localization and scope management, which offer much more insight about programming than simply avoiding symbolic references. Learning to think about those issues makes us better programmers, where just following the rule only keeps us from getting stuck in one well known tarpit.
Always/never rules are no substitute for actual programming wisdom. They're just the rare cases where some principle works so very much of the time that few people will call bullshit if you state them in extreme terms. But never (yes, I'm aware of the reference) just accept always/never rules as doctrine. Dig into them, and find out what they're really saying. Learn the principles, then learn the limits of those principles. Once you know how the principles work, you won't need the simple little always/never rule any more.
As an aside, I've noticed a reduction in the number of people saying, "use CGI.pm or die!" here in the monastery since people actually started trying to read it. And version 2.98 (which happens to be on my current machine) is a lot cleaner than previous versions.