If you are a junior dev or self-taught programmer who watches this video and thinks "but... the original code was much tighter and easier to understand" I hope that you please understand that this is a totally natural thought to have. All of these design principles (as well as software architecture decisions) really shine when you are doing more than writing a quick 1-off script. Many times you will come back later to some code (either yours or someone elses) and need to make changes, or dramatically expand it's capability, and in those moments you will start to wish very much that the original code was written in this way (high cohesion, low coupling, dependency inversion, etc.) because then adding your new feature is not only relatively simple (e.g. a new processor subclass) but YOU CAN ADD IT WITHOUT BEING SCARED THAT YOU ARE BREAKING TONS OF STUFF. I cannot stress how important that last part is. I cannot tell you how many times I have looked at someones high-ly procedural code and tried to add a quick feature to it and though "oh god i hope this doesn't break something!" When you break code up this way, you make it so that adding a new feature capability is significantly de-risked.
You built a simple and practical example that progressively incorporates in a natural manner the SOLID principles "in the right order". That's not easy ! Really inspiring pedagogical work
Defining the SOLID principles in layman's terms (based on this video alone): 1. Single Responsibility Make things (classes, functions, etc.) responsible for fulfilling one type of role. e.g. Refactor code responsibilities into separate classes. 2. Open/Closed Be able to add new functionality to existing code easily without modifying existing code. e.g. Use abstract classes. These can define what subclasses will require and strengthen Principle 1. by separating code duties. 3. Liskov Substitution When a class inherits from another class, the program shouldn't break and you shouldn't need to hack anything to use the subclass. e.g. Define constructor arguments to keep inheritance flexible. 4. Interface Segregation Make interfaces (parent abstract classes) more specific, rather than generic. e.g. Create more interfaces (classes) if needed and/or provide objects to constructors. 5. Dependency Inversion Make classes depend on abstract classes rather than non-abstract classes. e.g. Make classes inherit from abstract classes.
Absolutely great work! It's such a rare occasion to find a good channel, dealing with intermediary stuff and up. Also, really like 'real life' examples in videos so far - makes it so much easier to memorize.
This Software Design series fills a gap that almost nobody else seems to be addressing. The real world examples + refactoring process make these videos truly amazing!
Good quality set, good camera, good clear concise speaker, good audio, good editing, good music, good examples, good explanations, good pacing. Good video. Probably one of the best SOLID vids out there
Dude you are the absolute best!!!! I am a computer science student in university, and they would never dream of teaching good design like this. This is the first time I've been able to actually understand the usefulness of Inheritance/Polymorphism in OOP.
I keep coming back to this video from time to time, it is so well-explained. The order of examples is so good that I was not only able to understand SOLID but make some small refactors in my day-to-day as well to make it adhere to the principles. Amazing work!
the way you walk through examples is brilliant! the way code is structured has always fascinated me to no limit, and seeing a live rework done this well is a gem to watch! i have started to use composition over inheritance for vast majority of cases for a while now due to it being more flexible. and you can apply inheritance to composition as well, so its the best of both worlds in a lot of cases
Best channel on YouTube for software design and architecture, Man you just saved us from those weird and complicated tutorials.
This is the first video I've seen clearly explaining LSP, how and why it's used, and its violations. Great job.
I have watched many SOLID priciples videos on You Tube and this is by far the best one. Thanks for all the efforts you put in these videos to share your deep knowledge with the world !
Well written, good presentation, high production value. This is easily the best programming advice channel on YouTube. Everybody should subscribe to this.
Suddenly discovered this channel and now addicted to this. Please continue the good work.
Nice to finally see a solid video without using the employee pay calculatkr example
You have an incredible talent to explain things clearly and in a very pedagogical way. Your channel is a gem.
I like your examples. They so precisely chosen to illustrare the problem at hand. They are neither too complex nor too simplistic. Kudos!
Finally, Solid Content about the SOLID principles in Python 👏👏👏
This channel is super helpful and quite frankly deserves much more appreciation and attention.
@sergiopietri5370