I would like to use more testing

I do test. Just not with the Test::* tools.

It is my contention that when writing a module, you should write the application (or at least an application) that uses that module, concurrently with the development of the module itself. This improves the module design by ensuring that its interface works with the needs of the application. That it has the entry points the application needs, and no more. The application becomes the prototypical test-bed for the module.

Far too many modules are developed in isolation of their use case, designed on the basis of what-if and maybe and it-could-do, hence you end up with clumsy, fragile, bloated, and over-specified interface definitions

Once the module is written and working with the application, then is the time to go back and see if it can be generalised to some degree, without breaking the original use case. At that point I write a generic application -- a cut-down and simplified version of the original use case -- that self-checks its own results and serves as test case and regression test, and lives in the module file itself. It can then be annotated and also serves as user documentation for the module.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


In reply to Re^9: Developing a module, how do you do it ? by BrowserUk
in thread Developing a module, how do you do it ? by mascip

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.