When I first started posting code here I tested everything, even simple things like print "hello world\n"; Then I got a little cocky and stopped testing things (it took too long, I would start my post and no one had responded yet, but I would finish testing and my post ended up number 10 or something.) But then I kept feeling guilty. Even with the "untested" tag, I fealt guilty. So now I test almost everything except spuedo-perl-code. Which is to say that I try to make it clear that untested code is untested AND possibly incomplete and I only use it where real code is impractical or unessecary.<sp?>

As for formating, I'm with you. Open braces go below the function. Plus I wrap long predicates. I vary my wraping on tertiaries based on the length of the sections. I also like indentation. I usually use 4 spaces, but lately I cut that down to 2 in my posts because I don't like horizontal scrolling.


In reply to RE: On Testing and Formatting Code by Adam
in thread On Testing and Formatting Code by jcwren

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.