Re-implementing

Been discussing with Alex about the dangers of re-implementing – he wants to simplify the command-line arguments code in FreeGuide, but rather than modifying the existing code, he’s re-written it. The problem with re-writing is that old code usually has lots of non-obvious bug fixes in it which you will have to re-implement all over again as they are reported. Alex has re-written a few things, and generally he’s improved the code structure, but we have both then had extra work to do fixing the bugs that are inevitably introduced. That can seem like a waste of time if they’re bugs that I have already fixed in the past.

It always feels easier to write your own new version instead of understanding what’s already there, but in reality, unless you’re changing the output, it’s never a good idea completely to re-write the internals. There’s a good article by Joel Spolsky on this.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.