Avoiding the temptation to start over

I saw an essay on Rewrites Considered Harmful referenced recently on Slashdot. It reminded me of an article I read a long time ago from Joel Spolsky called Things You Should Never Do, Part I. Both have similar points and both cite the rewrite of Navigator/Mozilla as an example. (Note: I noticed in revisiting the Rewrites Considered Harmful article that he also has added a reference to Joel's original article). This is something I struggle with because 1) it can be so hard to read other people's code, and 2) I can always do it better ( :-) )

I have really noticed this urge to start over when dealing with NAnt scripts. Obviously I should start with a well constructed build script that is successfully building someone else's project right?  Well maybe it is a flaw with the NAnt/XML format, but I find this virtually impossible. I've tried, but I end up stripping it down to an empty build script and building it up from scratch again. Is Fowler right, is XML a bad language for builds or am I just incompetent?

I plan on experimenting with NAnt's <include...> task to see if things can be encapsulated for re-use a little more. MSBuild's target files do a great job of this. Of course whenever you design things for reuse and flexibility you end up making them more complex and harder to use, causing the next person to want to start over again...sigh...will it ever end?

2 Comments

  • Sometimes, someone is so incompetent that you have no choice but to start over since their basic logic was scewed.



    We have a situation where a person that developed a pretty important API (legacy messaging) is retiring in a few months. The API is very poor. Not from his lack of know how but just that he's been a legacy guy his entire life and doesn't understand the new generation.



    Well the comment was made, you know he is leaving and NO ONE knows what he did to get this to work. While someone else replied with, this might not be a bad thing.



    Considering a re-write for this crucial peice of software might be worth the effort. In fact in my opinion it will be required later because the current API will not hold up to the test of time and their are some basic logic flaws.



    We really should consult experienced engineers and architects before we do this stuff but its a in-house crowd.



    So, I do agree that re-writes can hurt software and introduce unneeded code bloat or features that go un used or slow down the system.



    bleh ... :)

  • Counterexample to Mozilla: MS SQL 7 was a complete rewrite, and it kicked 6.5's ass.

Comments have been disabled for this content.