On Mon, Sep 17, 2001 at 12:29:56AM -0600, chromatic wrote: > Ideally, there'd also be a comprehensive test suite to run after the > refactoring to see what breaks. If the browser doesn't catch > everything, and if the test suite is kept at 100% pass, and if the > coverage is close enough to comprehensive, it ought to catch almost > everything else.
Well, yeah. Step one of refactoring is to have a good test suite. Refactor, make test. Refactor, make test. etc... > There's a chapter in Extreme Programming Examined that discusses the > Smalltalk refactoring browser. They worked up some sort of change > object that can be applied, reverted, and reapplied as necessary. > Any change is represented with one of these objects. Smalltalk is so seeped in the "everything is an object" that this sort of thing is a sneeze for them. One of the examples in the Squeak book is a drawing program where every individual thing drawn is a seperate object. Forget Photoshop layers, the image never gets flattened until you actually save it as a jpeg (or whatever). So I can scribble all over your masterpiece and you can just delete my individual scribblings by popping the object stack. For us, we can just use RCS. Tag each check-in with info about what we refactored. So a refactoring run would go... Refactor, check-in, refactor, check-in, refactor, check-in, test. With a simple "diffs/refactorings since last good test" command. -- Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/ Perl6 Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One Tasty, yet morally ambiguous.