Answer the question
In order to leave comments, you need to log in
KISS vs SOLID, what and when to cook?
Hello!
Based on a video about the implementation of FizzBazz in JS, I wondered what is really easier to maintain, a dozen lines of KISS ("structural approach")
Answer the question
In order to leave comments, you need to log in
Firstly, now the moderator will bang your question for violating paragraph 3.8 of the rules. Secondly, paradigms, approaches, patterns and principles are tools for managing the complexity of the code base, and the tool must be chosen according to the task - you should not wind up a multi-level abstraction on FizzBuzz. Thirdly, KISS does not rule out SOLID.
First KISS: decide if you want to make the code complex or if you can get by with a simple solution that is easy to read and maintain.
If it is clear that it will be difficult to read and maintain a sheet of procedurals, we begin to split up the logic, and SOLID helps us in this - it is he who determines the boundaries of the code responsibility areas and allows minimizing the links between the designed classes.
Finally, having decided on the architecture, we return to KISS again within each class, without overcomplicating its internal life beyond the tasks that it must solve. Thanks to the use of SOLID a level above, we can painlessly redo all the giblets of this class if the tasks change and the KISS solution stops working, without refactoring the rest of the code.
No contradictions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question