DeepRead
Cover of Refactoring to Patterns

Refactoring to Patterns

Joshua Kerievsky · 2004

Programming and computer science › Software design and clean code

#1,954 most recommended

About the book

Refactoring to Patterns is about improving existing code by moving it toward a design pattern, such as Strategy, Composite, or Template Method, through a sequence of small, behavior-preserving steps. It covers the refactorings that lead to specific patterns, along with the code smells that signal when a pattern would help. The scope is practical code restructuring in object-oriented software rather than pattern theory in the abstract. Patterns should be reached by refactoring toward them when a codebase needs them, not added speculatively during up-front design. The approach ties refactoring, test-driven development, and design patterns together, with tests serving as the safety net that makes each incremental change safe. The author presents pattern-directed refactorings as a repeatable method for evolving code toward a chosen design.

Written by Claude from what it knows of this book.

What Hacker News says 68% recommend · 0% critical

02.5520092015202020262011 peak · 4
This bookAverage book in Software design and clean code

In the commenters’ own words

  • I don't agree with either of the claims in your comment. Although the GoF Abstract Factory pattern doesn't rule out having mutable state in your factory…

    kragen · 2021 · in Why OO Sucks by Joe Armstrong (2000)

  • The examples shown in the post aren't wrong because they fail the grep test, they are wrong because they A) capture an uninteresting abstraction that is not…

    stiff · 2013 · in The Grep Test

What Open Library readers say 4.00 from 2 ratings

  1. 51
  2. 40
  3. 31
  4. 20
  5. 10
  • 16 want to read
  • 0 reading
  • 2 have read

Only 2 ratings: treat the average as a hint.

Open Library’s page for the book

What critics say, via Wikipedia

No Wikipedia article about this book yet, so no critics to quote.

Reddit communities — coming later

The threads it came up in

Details

First published
2004
ISBN
9780321213358
Editions known
2 at Open Library
Open Library
OL8924975W

Explore in the mosaic

Read next: its neighbours on the mosaic