News for hackers. Stuff that matters.
Re:Algorithms as Objects by andyg_blog on Wednesday June 19, 2019 @11:27AM (#20224189)
The SRP is a bit fuzzy when it comes to algorithms, though. What counts as "one thing"? Bob Martin covers this in Clean Code. "If a function does only those steps which are one level of abstraction below the stated name of the function, then the function is doing one thing." SRP falls out of that, as noted by Jeff Atwood(https://blog.codinghorror.com/curlys-law-do-one-thing/).

The author is still overly vague here; it's not that the algorithm has multiple logical parts, it's that it has those plus the kitchen sink.

There are no comments on this comment yet.