A u-turn I have made in recent years is one on rewrite. It was born from two things. First was Martin Fowler's Refactoring book - not that we were not doing it before the book, just that we never really advocated it was right. An ex-CTO (and still a friend) of mine put it as "You say refactoring, I say you fucked up". Second was Joel Spolsky's article Things You Should Never Do, Part I which cites a great example where rewrite was the wrong thing (despite the end product being wonderful). I am now inclined to say that a series of refactorings with decent unit tests to prove that things still work (or at least is no more broken than it was before) is the best approach. Of course, that the app largely works before you decide, is a proviso...


August 12th, 2002