Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I think you might be causing some confusion with the terminology you're using. When people speak of testing code, more and more they mean in an automated fashion. In other words, test suites that exercise all of the code for you, and check for expected results. There's a difference between that and trying out the program in an ad-hoc way after you make changes. Sure, both can be said to be testing the code, but generally the automated test suite variety is what people call "testing."

If your post is about testing as in writing test suites, then I think the implication in your post -- that "testing" is a crutch -- is wrong. As others have already written, any non trivial piece of code will tend to have some bugs, and anything you can do to find those bugs is helpful. Furthermore, a good test suite can help ensure changes to one part of the code don't cause problems in other parts of the code. I definitely think test suites help with those things, so I think they're useful tools.

If, on the other hand, you meant trying to go through the program after each change, then it's not so clear. Certainly, you will tend to "smoke out" new bugs, but only if you do the right sequence of events. It could end up giving a false sense of security when things appear to go right. On the balance, though, I think it's worthwhile.

So I guess my point is that whichever type of testing you were talking about, it is useful. Writing a lot of code all at once may be fun, and if it works on the first try, very satisfying. But my experience says that's not a very common occurance, and it's probably best to try the code as it's being written, so problems can be fixed as they're created.


In reply to Re: Programming strategy with no on-going testing by revdiablo
in thread Programming strategy with no on-going testing by punkish

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-19 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found