4 ms·
Some of the points the author makes are good, but some are severely misguided. An example: > The Single Responsibility Principle says that code should only do
by shock 6y ago
Some of the points the author makes are good, but some are severely misguided. An example:
> The Single Responsibility Principle says that code should only do one thing. Another framing is that it should have “one reason to change”. I called this the “Pointlessly Vague Principle”. What is one thing anyway? [...]
If a change request comes in to change the format of the logs to include milliseconds and you're running a search and replace over the code base, you've broken the SRP. We can argue that is a good thing or a bad thing, but that's what it means. I think it's a bit of both, a trade-off, like most things.
- balfirevic 6y agoI believe that would be violating DRY, not SRP.