Back to Interests
by Martin Fowler

Refactoring: Improving the Design of Existing Code .

Software Engineering Best Practices
Refactoring: Improving the Design of Existing Code
Rating:
5/5
Read: 2020-09-10

Review

Fowler's catalog of refactoring patterns is indispensable. The book teaches you to recognize code smells and apply specific refactorings to fix them.

Favorite Refactorings

  • Extract Method: Break long methods into smaller, named pieces
  • Replace Temp with Query: Eliminate temporary variables
  • Introduce Parameter Object: Group params that go together
  • Replace Conditional with Polymorphism: OOP over if/else chains

The examples use Java, but the concepts apply to any language.