This is an outline of the links to my series of expository videos called 2-Minute Refactorings. The content is derived from the second edition of the book Refactoring: Improving The Design of Existing Code by Martin Fowler and the book Refactoring to Patterns by Joshua Kerievsky.
- Extract Function
- Inline Function
- Extract Variable
- Inline Variable
- Change Function Declaration
- Encapsulate Variable
- Rename Variable
- Introduce Parameter Object
- Combine Functions into Class
- Combime Functions into Transform
- Split Phase
- Encapsulate Record
- Encapsulate Collection
- Replace Primitive with Object
- Replace Temp with Query
- Extract Class
- Inline Class
- Hide Delegate
- Remove Middleman
- Substitute Algorithm
- Move Function
- Move Field
- Move Statements into Function
- Move Statements to Callers
- Replace Inline Code with Function Call
- Slide Statements
- Split Loop
- Replace Loop with Pipeline
- Remove Dead Code
- Split Variable
- Rename Field
- Replace Derived Variable with Query
- Change Reference to Value
- Change Value to Reference
- Decompose Conditional
- Consolidate Conditional Expression
- Replace Nested Conditional with Guard Clauses
- Replace Conditional with Polymorphism
- Introduce Special Case
- Introduce Assertion
- Separate Query from Modifier
- Parameterize Function
- Remove Flag Argument
- Preserve Whole Object
- Replace Parameter with Query
- Replace Query with Parameter
- Remove Setting Method
- Replace Constructor with Factory Function
- Replace Function with Command
- Replace Command with Function
- Pull Up Method
- Pull Up Field
- Pull Up Constructor Body
- Push Down Method
- Push Down Field
- Replace Type Code with Subclasses
- Remove Subclass
- Extract Superclass
- Collapse Hierarchy
- Replace Subclass with Delegate
- Replace Superclass with Delegate
- Replace Constructors with Creation Methods
- Move Creation Knowledge to Factory
- Encapsulate Classes with Factory
- Introduce Polymorphic Creation with Factory Method
- Encapsulate Composite with Builder
- Inline Singleton
- Compose Method
- Replace Conditional Logic with Strategy
- Move Embellishment to Decorator
- Replace State-Alerting Conditionals with State
- Replace Implicit Tree with Composite
- Replace Conditional Dispatcher with Command
- Form Template Method
- Extract Composite
- Replace One/ Many Distinctions with Composite
- Replace Hard-Coded Notifications with Observer
- Unify Interfaces with Adapter
- Extract Adapter
- Replace Implicit Language with Interpreter
- Replace Type Code with Class
- Limit Instantiation with Singleton
- Introduce Null Object
- Move Accumulation to Collecting Parameter
- Move Acumulation to Visitor
- Chain Constructors
- Unify Interfaces
- Extract Parameter