Book · 448 pages

Refactoring: Improving the Design of Existing Code (2nd Edition)

Martin Fowler · martinfowler.com Paid Intermediate

The canonical case that you can reshape a system in safe, small steps rather than one dramatic rewrite. Fowler shows how to change structure without changing behavior, backed by tests, so quality improves while the product keeps shipping. This is the discipline that makes the incremental path actually work in practice.

  • Improve design in small behavior-preserving steps
  • Tests are what make continuous refactoring safe
  • You can keep shipping while the codebase gets healthier

It answers 2 questions

  1. We ship fast but our codebase is turning into a mess. How much should a two-person startup care about tech debt?
  2. When is the right moment to stop iterating on the MVP and rebuild it properly, and how do I avoid the second-system rewrite trap?

Read with it

  1. The permission slip to recruit users by hand, do things manually, and deliver 'insanely great' experiences to your first few... paulgraham.com Essay · ~15 min read Do Things That Don't Scale Paul Graham
  2. Michael Seibel, who ran YC, makes the blunt case for shipping something almost embarrassingly simple and learning from real... Y Combinator Startup Library Video · ~10 min video How to Build an MVP Michael Seibel
  3. This is the canonical warning against throwing away working code and rebuilding from scratch, told through Netscape's rewrite... Joel on Software Essay · ~10 min read Things You Should Never Do, Part I Joel Spolsky
  4. This is the canonical explanation of what a reviewer actually means when they flag your inherited code as risky. Fowler frames... martinfowler.com Essay · About a 10 minute read Technical Debt Martin Fowler
  5. This is the canonical framing for exactly your question: not all messy code is the same. Fowler splits debt on two axes,... martinfowler.com Essay · About a 5 minute read Technical Debt Quadrant Martin Fowler
  6. Video · 5 min Debt Metaphor Ward Cunningham
eChai Partner Brands The partnership →