Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Excellent replies. (Keep 'em coming!) I'll bundle up a few replies to keep the page size down:

hippo: It's an interesting concern and should probably remain up to the whim of the individual poster,

I agree completely. Once in a while, my individual whim benefits from a little collective influence such as this.

toolic: Regarding the signature, some monks (like me) disable it because it is a distraction from the rest of the post, but we are probably in the minority.

I hadn't considered that. It's probably a pretty good bet that any monk PM-savvy enough (and active enough to care) to use custom CSS to hide pmsig blocks already knows a thing or ten about strictures and warnings (i.e., not part of the target demographic). From a continuity standpoint, though, probably best, then, not to rely on a post making sense iff the signature is visible.

davido on Dominus: If I do advocate for the use of strictures and warnings, I'll also try to point out which aspect of "strict" would have caught some problem in the user's code, or which warning might have been raised had warnings been enabled.

I do like that much better than the blanket "use strict;" 2x4 some monks wield (and I've no doubt taken a swing or two myself with).

BrowserUk: Insisting that every snippet posted is a complete, stand-alone, pedant-compliant work of dogma; is like insisting on a full salt-throwing ritual before demonstrating tying a nappy on a doll. Ie. Meaningless overkill.

I think your analogy itself may have been meaningless overkill, but that won't get in the way of me agreeing with your overall sentiment. :-)

BrowserUk: Perhaps the only thing sillier is worrying about it :)

Perhaps. I could say I see it more as "optimizing" than "worrying", but then I could be rightly accused of worrying about semantics.

moritz: And newcomers already have enough to struggle with, I don't want to increase their cognitive load by using a convenience subroutine that then makes their live harder.

This ↑ ↑ ↑ is the whole point I was dancing around, I think: i.e., minimizing cognitive load. Well said.


So, where does that leave me? There's still some room for me to be swayed, but what I take away from these replies (colored a bit by my own preferences of course) is that it makes sense to ditch the boilerplate unless it's relevant, but including any pragmas required to successfully run the code (i.e., use 5.010; in examples with say) is still worth it.

Again, thank you all for the most thoughtful replies. Yes, even you, Anonymonk. Please keep them coming, that is, if there's anything more to say.


In reply to Re: When do you include the usual use pragmas in your example code? by rjt
in thread When do you include the usual use pragmas in your example code? by rjt

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others examining the Monastery: (5)
    As of 2014-12-25 14:13 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (160 votes), past polls