Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

comment on

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

If you are going to mention bugs, why not focus on writing tests? It is amazing to me that this area is so broadly ignored by programmers. An even better place to start would be writing modules that would follow the format of a CPAN distribution. Requiring a,

  • README file, force them to write notes about anything special about module.
  • Changes file, force them to keep track of their changes to their code.
  • Build.PL file, gets them thinking of their code as a building block that other programs/modules can use.
  • a t directory with a standard set of tests (like Pod and Pod-Coverage). It is easier to write tests if they know where those tests will be and what can be expected.

The tests get them into the good practice of writing interfaces for their code instead of writing code and then try to figure out how the interface works. It gives them examples of how to write code in general.

To often I see programmers write modules without any documentation, working examples, testings or ANYTHING THAT IS NOT CODE! It leads to crappy, buggy and ultimately unmaintainable code.

Why? Reading code is hard, when code be explained in english in a few sentences and be read in a minute might take 10 or 20 minutes of reading code to figure out how it is supposed to work. The reason for this is code has no frame of reference, writing documentation is supposed to do that.

In reply to Re: Perl Exercises by Herkum
in thread Perl Exercises by jesuashok

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, 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
  • 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.
  • Log In?

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

    How do I use this? | Other CB clients
    Other Users?
    Others chanting in the Monastery: (6)
    As of 2020-05-31 14:24 GMT
    Find Nodes?
      Voting Booth?
      If programming languages were movie genres, Perl would be:

      Results (173 votes). Check out past polls.