While refactoring code is important, it can be ambiguous. You need to have a clear strategy when refactoring your code.
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.