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

Re^2: Philosophical question about testing

by doom (Deacon)
on Oct 29, 2010 at 17:31 UTC ( #868366=note: print w/ replies, xml ) Need Help??


in reply to Re: Philosophical question about testing
in thread Philosophical question about testing

You have good instincts. You should strive for an orthogonal approach,
This is true, of course, you should try to think of a way to independently verify what the code does, but I would suggest there isn't any reason to go beserk about it.

Consider the fact that the algorithm in both code and test may be the same to start with, but they may diverge later. You might go in and refactor the main code, for efficiency, let's say, and then the older style of code out in the tests will be an excellent check on your work.

In general, tests should be relatively easy to write, or else you (or worse, your boss) will burn-out on it, and start skipping them altogether. A lot of things that would be Bad And Wrong in your real code are okay in your tests... e.g. cut-and-paste is a much more valid approach.


Comment on Re^2: Philosophical question about testing

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://868366]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-12-21 13:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (105 votes), past polls