Uploaded September 2021 | Updated September 2026, 2 weeks ago
As a Machine Learning engineer, you should write clean and maintainable code. A first step to achieve that is following the Single Responsibility Principle.
Learn more about the theory and implementation of the Single Responsibility Principle in my new video.
Slides:
github.com/musikalkemist/solidforml/blob/main/solidforml/02%20Single%20Responsivility%20Principle/Single%20Responsibility%20Principle.pdf
Code:
github.com/musikalkemist/solidforml/blob/main/solidforml/02%20Single%20Responsivility%20Principle/singleresponsibility.py
===============================
Interested in hiring me as a consultant/freelancer?
valeriovelardo.com
Join The Sound Of AI Slack community:
valeriovelardo.com/the-sound-of-ai-community
Connect with Valerio on Linkedin:
linkedin.com/in/valeriovelardo
Follow Valerio on Facebook:
facebook.com/TheSoundOfAI
Follow Valerio on Twitter:
twitter.com/musikalkemist
===============================
Content:
0:00 Intro
0:37 Defining Single Responsibility
3:02 How to spot SRP violations
3:45 SRP violation problems
4:42 Analysing SRP violations in the Python example
7:42 Refactoring code
10:32: What's next
As a Machine Learning engineer, you should write clean and maintainable code. A first step to achieve that is following the Single Responsibility Principle.
Learn more about the theory and implementation of the Single Responsibility Principle in my new video.
Slides:
github.com/musikalkemist/solidforml/blob/main/solidforml/02%20Single%20Responsivility%20Principle/Single%20Responsibility%20Principle.pdf
Code:
github.com/musikalkemist/solidforml/blob/main/solidforml/02%20Single%20Responsivility%20Principle/singleresponsibility.py
===============================
Interested in hiring me as a consultant/freelancer?
valeriovelardo.com
Join The Sound Of AI Slack community:
valeriovelardo.com/the-sound-of-ai-community
Connect with Valerio on Linkedin:
linkedin.com/in/valeriovelardo
Follow Valerio on Facebook:
facebook.com/TheSoundOfAI
Follow Valerio on Twitter:
twitter.com/musikalkemist
===============================
Content:
0:00 Intro
0:37 Defining Single Responsibility
3:02 How to spot SRP violations
3:45 SRP violation problems
4:42 Analysing SRP violations in the Python example
7:42 Refactoring code
10:32: What's next










