Two methods perform similar steps, yet steps differ slightly.
Create a generalized method (the Template method) in a parent class and provide specific extension points for overriding.
Duplicated Code
easy
The template method refactoring can be applied easily to reduce duplicate code in algorithms. Instead of allowing sub-classes to override the entire logic of a method, the parent class provides specific extension points for sub-classes.
This refactoring should be used if you want to make sure that essential parts of an algorithm are followed while still allowing certain parts of the algorithm to be changed.
The Template Method Pattern (uses inheritance) is very similar to the Strategy pattern (uses composition) as such the benefits of either pattern closely relate to these fundamental code design approaches. Generally, the Strategy pattern allows you to make more fine-grained replacements of the algorithm in contrast to using a sub-class.
Checklists present a proven order of necessary refactoring steps and are especially helpful for beginners.
If you feel comfortable with a refactoring, there is no need to follow each of the steps literally; you can often perform multiple steps at once or skip some.
We suggest to try the recommended order at least once; this will often provide new insights - even for seasoned developers.