Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://335208]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2018-03-24 19:59 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (299 votes). Check out past polls.