What is Refactoring vs Rewriting? — UK Software Development Guide

4 min readJune 2025ClickMasters Technical TeamReviewed by James Whitmore, CTO
refactoring vs rewriting software

Direct Answer

Refactoring is improving existing code's internal structure without changing its external behaviour. Rewriting (or rebuilding) means starting from scratch with a new codebase, abandoning the existing implementation. The choice between refactoring and rewriting is one of the most important — and most contentious — decisions in software engineering.

Refactoring-vs-rewriting in the UK

The "big rewrite" is the most common expensive mistake in UK software development. Joel Spolsky's famous 2000 essay "Things You Should Never Do" argued that rewriting discards accumulated business logic embedded in the old codebase — often irreplaceable. UK legacy system reality: 80% of the time, incremental refactoring (using the strangler fig pattern) is safer, cheaper, and less disruptive than a full rewrite. ClickMasters recommends rewriting only when: the codebase is so poorly structured that incremental improvement is impossible, the technology is genuinely end-of-life with no security patch support, or the business logic is so well-documented that reimplementation risk is low.

Get Expert Advice on Refactoring-vs-rewriting

Speak with our UK software development experts about Refactoring-vs-rewriting. Free consultation, transparent pricing, no obligation.