You can download this free eBook, “31 Days of Refactoring: Useful refactoring techniques you have to know” written by Sean Chambers and Simone Chiaretta.
Book Description
Refactoring is an integral part of continually improving your code while it moves forward through time. Without refactoring you accrue technical debt, forget what portions of code do and create code that is resistant to any form of testing. It is an easy concept to get started with and opens the door to much better practices such as unit testing, shared code ownership and more reliable, bug-free code in general.
Table of Contents
- Encapsulate Collection
- Move Method
- Pull Up Method
- Push Down Method
- Pull Up Field
- Push Down Field
- Rename (method, class, parameter)
- Replace Inheritance with Delegation
- Extract Interface
- Extract Method
- Switch to Strategy
- Break Dependencies
- Extract Method Object
- Break Responsibilities
- Remove Duplication
- Encapsulate Conditional
- Extract Superclass
- Replace exception with conditional
- Extract Factory Class
- Extract Subclass
- Collapse Hierarchy
- Break Method
- Introduce Parameter Object
- Remove Arrowhead Antipattern
- Introduce Design By Contract checks
- Remove Double Negative
- Remove God Classes
- Rename boolean method
- Remove Middle Man
- Return ASAP
- Replace conditional with Polymorphism