Refactoring by Martin Fowler — book cover
Technology

Refactoring — Book Summary & Review

by Martin Fowler

Last updated:

3 min read

Refactoring Summary

Fowler's "Refactoring" breaks down the process of improving existing code by introducing a structured approach with concrete examples. The book is organized around a catalog of over seventy refactorings, each with detailed steps and illustrative examples, primarily in Java. One standout section is the chapter on 'Composing Methods', which demonstrates how small changes like extracting methods can significantly enhance code quality. Fowler's approach is methodical, making complex ideas accessible, though the heavy focus on Java may limit its immediate applicability to developers working in other languages. While the book excels at providing practical, step-by-step guidance for improving code, it may frustrate those looking for a deeper exploration of refactoring's impact on team dynamics or broader software architecture issues.

Key Takeaways from Refactoring

  1. 1

    Composing Methods: Fowler emphasizes extracting smaller methods to improve readability and reuse, a fundamental refactoring technique.

  2. 2

    The Refactoring Catalog: A comprehensive list of refactorings provides step-by-step instructions, making complex processes manageable.

  3. 3

    Code Smells: Identifying problematic areas in code that indicate deeper issues, helping developers prioritize refactoring efforts.

  4. 4

    Encapsulate Field: This technique involves using getter and setter methods to control access and modification of class fields.

  5. 5

    Move Method: Relocating methods to more appropriate classes to enhance cohesion and reduce dependencies.

Who Should Read This

Someone who frequently inherits poorly structured code and struggles to maintain or extend it effectively. If you're a developer looking to enhance your coding skills and improve code quality, this book will provide invaluable guidance.

Who Shouldn't Read This

If you're not familiar with object-oriented programming concepts, the technical depth will likely overwhelm you. Purely theoretical readers seeking insights into software design philosophy will find the book too hands-on and narrowly focused.

Editor's Verdict

The best feature of this book is its Refactoring Catalog, which offers practical, actionable steps for improving code quality. However, its Java-centric examples might alienate those using other programming languages. Developers facing daily challenges with messy legacy code will find it particularly useful when they're ready to enhance both their skills and their codebase.

Ready to read Refactoring?

Get your copy on Amazon today.

Buy on Amazon →

Refactoring — Frequently Asked Questions

About Martin Fowler

Martin Fowler is a British software developer, author, and international speaker known for his expertise in software design and architecture. He is a Chief Scientist at ThoughtWorks and has significantly contributed to the field of software development. Fowler is best known for his book "Refactoring: Improving the Design of Existing Code," which established him as a leading authority on code refactoring. Other notable works include "Patterns of Enterprise Application Architecture" and "Domain-Specific Languages."

Share this summary

Related Technology Books