The SRP is a [[Programming]] principle that states that a class should have only one reason to change. I've often wondered what 'one reason to change' means. I think generally, classes are these huge things, and they change way too often. A bunch of related functionality goes into one file. Just as [[Zettelkasten]] atomizes concepts into Zettels, modules should only have a single responsibility. However, this responsibility of changing is not literal code modifications, but of the purpose of the module. ## How to achieve this Ask myself, "Does this do more then one thing?" "Could this be two files?" "What is reusable here?" "Is this function too long, and, if so, how can I break it" SRP is something to strive for, but it's not always achievable in pure form. But, the idea of this being responsible for "one thing" should stay. --- # References https://medium.com/@eloufirhatim/solid-principles-in-laravel-1418be178346 https://medium.com/codex/single-responsibility-principle-it-isnt-what-you-think-it-is-a652debed329