|
|
|
|
|
by xlii
2040 days ago
|
|
Tl;dr use strategy pattern where applicable. One of the best programming books I read was UML Distilled (which introduced the idea of some pattern beside teaching UML) and Design Patterns (Shalloway, Trott). The moment I started reading this post I thought “that’s a strategy pattern use case”. And that’s the conclusion. A lot of people fret upon reinventing the wheel (use library instead!) but then they do so very often with the software design where a lot of problems are not only well researched but also peer reviewed and properly described with consequences that come with them. If you enjoyed this article I would recommend picking up book on design patterns (any popular will do) as there are many more prefabricated solutions to choose from. |
|