Refactoring is improving the quality of code without changing its behavior. Refactoring often is one key to keeping development speed high.
Learn how to simplify a method by breaking it down using explaining variables.
Learn to replace variables with query methods.
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.
Learn how to safely split up classes in small steps.
Learn to encapsulate logic surrounding nil by introducing Null Object classes.
Take your Null Object skills to the next level by completing this additional exercise.
Learn how to simplify a class by extracting a value object.
Learn how to replace a long list of parameters with a single parameter object.
Learn how to extract a validator into its own class with this exercise.
Slim down a controller that's gotten a bit bloated.
Learn how you can interact with entities of different types by replacing conditionals with polymorphism.