A few months ago I finally decided to fork off, because the useful bits were really good, but the rest was dragging it down and stagnating. While I could change code before the fork, I always kept the changes simple and small because I wanted to keep everything backwardly compatible (espeically the command-line, preprocessing tools). The last few days are the first time I've really attacked it and made big, non-backwards compatible changes. Mostly cutting out the cruft which I think is unnessessary, but also lots of refactoring to make it easier to change and grow.
Since the code is (mostly) alien to me, and since I want the behaviour I use to remain fixed, I've wheeled out our reliable friend - unit tests.
I really should have done this a while ago. It's only a small collection of tests - some to nail down existing behaviour, some used to drive new behaviour - but it's nice to once again have a collection of tests to run which says "everything ok" after a particularly big series of refactorings.
JUnit intergration in Eclipse is rather nice - minimal, seemless, and lets you easily step in with the debugger when things go wrong. I expect I'll have a few more tests added while I get the new behaviour in, and leave it at that for now. But any further development in this library is going to be test driven - I expect that list is going to get much bigger in time. [grin]
As an aside, does anyone else find that refactoring a big, icky piece of code is quite relaxing? Watching a nice and tidy collection of code emerge out of a horrible mess is quite facinating - especially as the end result is often better than if you'd explicitly designed it up front.