# Same Steps, One Step Different

Same Steps, One Step Different: Template Method: Same Routine, Your Own Step, Strategy or Template Method?.

Updated: November 17, 2026

1. [Template Method: Same Routine, Your Own Step](https://www.ask-codey.com/lessons/dp-template-method) (Journeyman): When three label classes copy the same four steps and differ only in the barcode, a fix to the shared steps has to be made three times, and one copy is always missed; writing the routine once in a base class and letting each carrier's subclass fill in its own barcode is the Template Method pattern.
2. [Strategy or Template Method?](https://www.ask-codey.com/lessons/dp-strategy-vs-template-method) (Journeyman): Strategy and Template Method both let one step of a routine vary: Strategy hands the step in as an object or function (has-a), Template Method leaves it for a subclass to fill in (is-a); a look-alike table, a run-time change and a second varying step show what each costs, and why most teams reach for Strategy first.

Source: https://www.ask-codey.com/courses/design-patterns/topics/dp-same-steps-one-step-different
