Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

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

In my experience – and I can only speak from my experience – the answer for me is:   “yes, but it’s not a religion.”   On the one hand, there is always the (legitimate) urge to “get started.”   On the other, there is the (also legitimate) concern that it takes exactly the same amount of time to write source-code that you won’t use, as it does to write source-code that you will.

A very interesting viewpoint on this picture was described in a book, Managing the Mechanism, which so far as I know is available right now only on the Kindle.   The premise is that, when you are writing software, you are constructing a machine ... and, not just “a machine,” but “an automaton.”   A mechanical machine that has to successfully play Chess and win.   When you frame the challenge of software in that way, the importance of specification and testing becomes much more intuitive.

I don’t reach for textbooks to tell me what to do.   When faced with a task of any significant complexity, I definitely do find a test-driven approach to be beneficial.   Why?   Because I know the value of actually being able to use myModule; with the same degree of confidence (and the same technical justification for holding such confidence ...) as I know that I am able to do when I use DBI;.

When you use a battle-tested CPAN module such as this one, you do not give a second thought as to whether this module will actually perform as the perldoc promises you that it will.   And, if you have ever paid attention while that module and its many brethren are being installed, you will know why this is so.   You will recognize the need to be able to make the same statements and to have the same assurances with regard to “the stuff that you wrote.”

So ... “it’s not a religion, but it is a Best Practice that can be routinely achieved.”   With a little extra effort.   Which is worth it.

That has been my experience, anyway.   But always keep in mind that these are simply guidelines.   Strategies, if you will.   Strategies that have proven useful-enough to other people (like me), that they would recommend those strategies to others.   Your Mileage May Vary,™ but My Mileage™ so far has been pretty darned good.


In reply to Re^3: A brief question about testing/best practices by sundialsvc4
in thread A brief question about testing/best practices by Amblikai

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, 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?
    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 rifling through the Monastery: (3)
    As of 2021-01-16 23:50 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Notices?