principles:keep_it_simple_stupid
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
principles:keep_it_simple_stupid [2021-09-02 14:01] – old revision restored (2021-09-02 10:22) 65.21.179.175 | principles:keep_it_simple_stupid [2021-10-20 21:09] (current) – +++ restored and merged +++ christian | ||
---|---|---|---|
Line 15: | Line 15: | ||
* [[contexts: | * [[contexts: | ||
* [[contexts: | * [[contexts: | ||
- | * | + | |
===== Principle Statement ===== | ===== Principle Statement ===== | ||
Line 27: | Line 27: | ||
A solution that follows the KISS principle might look boring or even " | A solution that follows the KISS principle might look boring or even " | ||
- | This does not mean that features like inheritance and polymorphism should not be used at all. Rather they should only be used when they are necessary, or there is some substantial advantage | + | This does not mean that features like inheritance and polymorphism should not be used at all. Rather they should only be used when they are necessary or there is some substantial advantage. |
===== Rationale ===== | ===== Rationale ===== | ||
Line 38: | Line 39: | ||
"When you make your code more flexible or sophisticated than it needs to be, you over-engineer it. Some do this because they believe they know their system' | "When you make your code more flexible or sophisticated than it needs to be, you over-engineer it. Some do this because they believe they know their system' | ||
- | Another reason to create more complex code is to make optimizations. An optimized code is a more complex code. The Pareto principle | + | Another reason to create more complex code is to make optimizations. An optimized code is a more complex code. Pareto principle applies |
"Three rules of optimization": | "Three rules of optimization": | ||
Line 64: | Line 65: | ||
The principle was coined by the American engineer Kelly Johnson referring to the requirement that a military aircraft should be repairable with a limited set of tools under combat conditions ((Ben R. Rich: // | The principle was coined by the American engineer Kelly Johnson referring to the requirement that a military aircraft should be repairable with a limited set of tools under combat conditions ((Ben R. Rich: // | ||
- | The principle of striving for simple solutions sometimes is also called "(rule of) simplicity" | + | The principle of striving for simple solutions sometimes is also called "(rule of) simplicity" |
Line 155: | Line 156: | ||
</ | </ | ||
- | Both methods do exactly the same thing. They return a string representing the weekday. Just the implementation is different. Both versions may be seen as simpler than the other depending on the view taken. | + | Both methods do exactly the same thing. They return a string representing the weekday. Just the implementation is different. Both versions may be seen as simpler than the other depending on the view taken. |
- | On the other hand "weekdays1" | + | On the other hand '' |
So it's not objectively clear which of the two implementations KISS prefers without saying which complexity metric to apply. But this ambiguity is not a problem since principles are not meant to be unambiguous and objective. Eventually a human developer has to decide which solution to implement and the principles only give guidelines. | So it's not objectively clear which of the two implementations KISS prefers without saying which complexity metric to apply. But this ambiguity is not a problem since principles are not meant to be unambiguous and objective. Eventually a human developer has to decide which solution to implement and the principles only give guidelines. |
principles/keep_it_simple_stupid.1630584103.txt.gz · Last modified: 2021-09-02 14:01 by 65.21.179.175