People often refactor without a strategy and for the wrong reasons. You need to know why you're doing it and have a clear end goal.
Here are few use cases for iterators and generators that are closer to the real-world scenario than a simple 'Hello World' type code.
This is the first part of the two-part series about the design patterns, where we'll go over the Factory, Proxy, and Strategy patterns.
In this post, let's cover Strategy Pattern. This pattern will help you write loosely coupled code and avoid long if/else statements.