|
|
|
|
|
by andyg_blog
2556 days ago
|
|
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. |
|