|
|
|
|
|
by jacknews
1197 days ago
|
|
The problem with DRY and SRP is that you might be simply moving the complexity instead of reducing it. Eg with a bunch of one-line functions, you then need to call them, or they call each other, and then the complexity is in the call graph rather than laid out in a single function. Code needs to be as complex as the problem it is solving, the challenge is to avoid complexity beyond that, and ideally have the code be 'transparent' to the problem, ie it's easy to see the problem and how it's being solved from the code. As an aside, didn't 'fat controller' stop being a thing in the early 2010s, and the problem changed to 'god models'. |
|