What it argues
Refactoring is Martin Fowler's catalog of techniques for improving the internal structure of existing code without changing its observable behavior. First published in 1999 in collaboration with Kent Beck and others, and substantially revised in a second edition in 2018, it gives programmers a shared vocabulary — a taxonomy of named moves, from Extract Method to Replace Conditional with Polymorphism — that makes the process of cleaning up code discussable, teachable, and reliable.
The central argument is that good software is not written once and left. Code that works is not the same as code that is well-structured, and working but poorly structured code becomes progressively harder and more expensive to change. Fowler calls this accumulation "technical debt," and refactoring is how you pay it down: not in large, risky rewrites, but in small, safe steps, each of which leaves the code slightly more understandable and slightly easier to modify. The key discipline is maintaining a green test suite before, during, and after each move. Without tests, refactoring is just guessing.
What it gets right
- 1.
Refactoring means changing the internal structure of code without changing its observable behavior. Small, safe steps rather than large rewrites.
- 2.
A green test suite is the prerequisite. You cannot refactor reliably without tests that tell you immediately if you've broken something.
- 3.
Code smells are surface indications of deeper problems — long methods, duplicate code, feature envy, mysterious names — that signal where to refactor first.
What it covers
Who wrote it
Martin Fowler is a British software engineer, author, and speaker based in the United States. He is chief scientist at ThoughtWorks and the author of several influential software engineering books, including Patterns of Enterprise Application Architecture, Continuous Delivery (with Jez Humble), and Domain-Specific Languages. His website, martinfowler.com, has been a reference for software architecture writing for over two decades. Refactoring, first published in 1999 and substantially revised in 2018, is his most widely read work and helped establish the practice of continuous code improvement as a professional norm.