Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Touching it when it ain't broke

by Ovid (Cardinal)
on Aug 09, 2002 at 18:15 UTC ( #188993=note: print w/ replies, xml ) Need Help??


in reply to Touching it when it ain't broke

If it works, but you have nothing else to do, what I would recommend is starting a comprehensive test suite. Then you can refactor at will and have instant knowledge of whether or not your changes broke things. For any system of significant size, trying to make sweeping changes without a test suite is a recipe for disaster. You wind up testing everything by hand and you will miss something. Of course, you'll miss things with a test suite, too, but then you write a new test for what you missed and continue on your way :)

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.


Comment on Re: Touching it when it ain't broke
Re: Re: Touching it when it ain't broke
by pdcawley (Hermit) on Aug 11, 2002 at 22:39 UTC
    Hear hear! I've worked on site where the existing code is sufficiently complex, and the existing test suite so non existent, that we've ended up applying the 'Extract Algorithm' refactoring to give ourselves a restricted set of well tested functionality, and then added tests and refactored towards the same functionality as the old code.

    It seems scary at first, but old code with no tests is scarier still. Especially when that code is a tightly coupled mess of objects with no consistent naming style, let alone a consistent code layout style. Our new code doesn't do everything the old code does. Yet. But it's reasonably clear, naming is consistent and IT HAS TESTS! Tests are great. I really cannot recommend them highly enough.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2014-10-21 12:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (103 votes), past polls