Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Testing: Fun for the family

by swngnmonk (Pilgrim)
on Mar 09, 2004 at 17:38 UTC ( #335208=note: print w/ replies, xml ) Need Help??


in reply to Re: Testing: Fun for the family
in thread Testing: Fun for the family

I've found this to absolutely be the case. I only started writing tests for code I was working on about 9 months ago, and I'm a believer. For code I've written tests for, I no longer dread re-opening it 3 months later. Happened this morning, in fact - I had to fix ambiguous behavior in a core module, and I knew the tests (not only of that module, but the entire system) would help protect me from doing something seriously bad.

Testing has worked wonders for me when it comes to API developement - especially when I know other people are going to have to work with the API I'm developing. Writing tests forces you to run your proposed API through its paces before anyone else takes a look at it. Maybe it's not tuned to race yet, but at least you'll know all the wheels are bolted on and the engine runs. :)

Check out Test Driven Development (amazon link) by Kent Beck. All the examples are in Java, but it's a good (fast) read on how to approach coding in this fashion - through heavy testing, coding, refactoring, and testing again.

As others have said, testing isn't a magic bullet. I view it kind of like safety rigging in construction work - you could get by without it, but would you really want to?


Comment on Re: Re: Testing: Fun for the family

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (16)
As of 2014-07-28 17:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (204 votes), past polls