Quick thought on use strict dogma

I missed the original post, but caught Chris Prather's great response. It got me thinking about why the "strict" dogma got started.

Here's my take: too many people debug code by asking others to do their thinking for them.

If I'm looking to be helpful and answer programming questions, whether it's on USENET (old-school), or Perl Monks, or StackOverflow or IRC, nothing pisses me off more than someone wasting my time asking for help with some code that would be trivially easy to figure out if they followed a few, simple, defensive programming practices or actually bothered to carefully read and think about their code.

Posting questions without defensive coding squanders a community resource of altruism and good will.1

Even those of generally good will are hard pressed not to eventually respond along the lines of "use strict and stop wasting my time, you jackass!" And from there, it's not hard to see how such things become dogma.

Does that piss off some people who like to write offensively (pun intended)? Maybe. But I sure wonder if the alternative is worse.

1.Go ahead and write however you want if you never plan to share it with anyone.

This entry was posted in perl programming and tagged , , . Bookmark the permalink. Both comments and trackbacks are currently closed.

2 Comments

  1. Posted February 15, 2012 at 2:36 pm | Permalink

    My response is always:
    Always use strict and use warnings, until you know exactly why it is recommended.

  2. caleb cushing
    Posted February 15, 2012 at 4:04 pm | Permalink

    I say use strict warnings and perl critic severity 3 until you can explain why your exception to the rule is ok.

© 2009-2014 David Golden All Rights Reserved