Dave Bush
1 min readSep 25, 2021

--

In my experience (33+ years in case you are wondering) I've found that most problems we face are from not following SRP well enough rather than following it to rigorously.

I can still point to the system that I re-wrote after only 3 years of experience that amounted to essentially less than 4 lines of code per function (this is before OOP became a thing) that "just worked" once it was done. Why? Because each function only "turned on the light bulb" to steal an illustration from your article.

If you can't write unit tests, can't write integration test, have a system full of bugs, have trouble deploying, can't effectively use feature flags, can't have multiple people work on your code base at the same time without significant merge issues, can't easily reason about your code or have a new developer easily reason about your code, ... to name just a handful of issues we face as developers... the ultimate reason, you will find, is because you were not granular enough.

Finally, I fail to see how "Do one thing and do it well" is in any way different from "Single Responsibility Principle" in its ability to be over-simplified or even in its ultimate meaning.

--

--

Dave Bush
Dave Bush

Written by Dave Bush

Dave Bush is an Agile/Scrum/Extreme Architect and Programmer who is currently focused on the world of Angular.

No responses yet