Rewrite

It can be tempting, when faced with a particularly troublesome body of software, to apply the Alexandrian solution—cut through the Gordian knot by discarding the code and rewriting it from scratch.

Sometimes this really is the right solution, but experience shows that we software engineers have a tendency to adopt it too readily.

From a psychological point of view, it’s just nicer to be working on greenfield code instead of having to fight against the crusty old stuff. And our natural optimism leads us to underestimate how much effort and time it’s going to take to replicate the old functionality.

Old and Rusty vs. New and Shiny

Outside the world of software, my passion is motor racing. As a result, I spend many weekends fettling ...

Get Debug It! now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.