Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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]
[usemodperl]: no dude i'm just asking how to access meta via http and you are getting defensive for some reason (did you turn off http at meta? :-)
[choroba]: why do you need to access metacpan via http?
[usemodperl]: stop asking why, just say how
usemodperl pulls teeth...
[usemodperl]: change the world? you mean BREAK THE WEB? we will regret this once google starts pulling certs for cursing or something...
Veltro Sees open mouth and feeds troll
[Corion]: usemodperl: Naah, you're just being unreasonable. It's not hard to download https URLs, and we've shown you ways to avoid downloading at all, and ways to keep downloading via http possible. You reject both.
[choroba]: Also, try asking at IRC
[usemodperl]: corion baby you have done nothing of the sort
[usemodperl]: asking how to download from cpan with core perl via http is unreasonable???

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2018-06-24 16:33 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.