Most Software Engineers have at sometime in their careers advocated for a rewrite. This is a Software Engineer’s utopia. I admit, there was a time I was that software engineer. Thankfully those days are behind me.
…the single worst strategic mistake that any software company can make.
That seems pretty harsh. Is it really that bad to toss the old and write anew?
Joel Spolsky has a thought on why software engineers want to rewrite code:
It’s harder to read code than to write it.
How many times have you read code and thought “What the hell were they thinking?” Worse yet, you’ve said it aloud. To understand code, you must mentally compile it. This is really hard. The author might be a novice, speak a different language or be an experienced coder. Heck the author could be you!
Have you ever read code and wondered why something was written a particular way? You rewrite it, only to discover why it was written in that particular way. Each line of code holds bit of knowledge. Sometimes this knowledge is hard fought. Have you ever chased a bug for weeks?
To be fair a rewrite may be the way to go, but most of the time it’s not.