Where I work, we have an in-house Python course that includes a few exercises.
I’ve been checking the same exercise solution for a few years now, for every new
programmer in our group. It’s interesting to see how a lot of programmers new
to Python solve the very same problem. I get to see what each of them does
differently and what they all do the same.
Nice article! I agree that DRY principle should be used with caution.
Another article that demonstrate a scenario in which “code duplication” should be prepared:
But I think it is important, and responsible to highlight the Testing context. DRY is a fundamental rule, and goal to follow and pursue in Software Engineering.