Software Design Patterns are indicators, best practices & proven methods that have been developed and refined over decades to produce better code that is easily maintainable, has high cohesion and low coupling - aka. is modular. In this series I've explore the different types of software design patterns within their broader context & philosophize about their usage in the machine learning (ML) sector. There are Creational, Structural and Behavioral Patterns.
In my first article I wrote about Creational Design Patterns - it’s a good starting point to dive into the topic, since I preface it with a bit about why software design is even relevant in the field of data science and machine learning. Plus, I quickly cover the UML framework which I use to visualize all the patterns, aaaaand also touch on the “SOLID” principle.
You can find the article here.
Behavioral patterns will be the topic today.
They can help us reduce redundancies in our code significantly and provide valuable, reusable structures that we can recycle in upcoming projects, and other devs will be much more likely to understand, too.
More specifically:
Behavioral patterns are concerned with algorithms and the assignment of responsibilities between objects.
There are a few Behavioral Patterns but here are the ones I will be talking about today: