Refactoring is improving the quality of code without changing its behavior. Refactoring often is one key to keeping development speed high.


Explaining Variable

Learn how to simplify a method by breaking it down using explaining variables.

Replace Variable with Query

Learn to replace variables with query methods.

Extract Method

Extracting methods makes complicated code clearer and encourages re-use. It also also encourages you to name a collection of operations, which tends to improve readability.

Extract Class

Learn how to safely split up classes in small steps.

Null Object: Part One

Learn to encapsulate logic surrounding nil by introducing Null Object classes.

Null Object: Part Two

Take your Null Object skills to the next level by completing this additional exercise.

Extract Value Object

Learn how to simplify a class by extracting a value object.

Introduce Parameter Object

Learn how to replace a long list of parameters with a single parameter object.

Extract Validator

Learn how to extract a validator into its own class with this exercise.

Cleaning up a Controller

Slim down a controller that's gotten a bit bloated.

Replace Conditional with Polymorphism

Learn how you can interact with entities of different types by replacing conditionals with polymorphism.