What is Refactoring vs Rewriting? — UK Software Development Guide
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.
Related Glossary Terms
Refactoring
Refactoring explained. Refactoring is the process of restructuring existing code without changing its external behaviour. The goal is...
Brownfield-vs-greenfield
Brownfield vs Greenfield explained. Greenfield software development means building from scratch — a new project with no existing codebase or legac...
Cloud-migration
Cloud Migration explained for UK software developers. Cloud migration is the process of moving data, applications, or IT resources from on-premises infrastructure (physical s...
Code-review
Code Review explained for UK software developers. A code review is the systematic examination of code by one or more developers (other than the original author) before it...
Code-smell
Code Smell explained. A code smell is a surface indication in code that suggests there may be a deeper problem with the code's desig...
Database-migration
Database Migration explained for UK software developers. Database migration is the process of moving data from one database system to another, or upgrading to a newer version of...
Get Expert Advice on Refactoring-vs-rewriting
Speak with our UK software development experts about Refactoring-vs-rewriting. Free consultation, transparent pricing, no obligation.