principles:keep_it_simple_stupid
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
principles:keep_it_simple_stupid [2016-09-04 01:00] – [Rationale] 5.12.30.152 | principles:keep_it_simple_stupid [2020-10-12 12:41] – old revision restored (2020-10-07 05:51) 159.69.186.191 | ||
---|---|---|---|
Line 26: | Line 26: | ||
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 39: | Line 37: | ||
"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’s future requirements. They reason that it’s best to make a design more flexible or sophisticated today, so it can accommodate the needs of tomorrow. That sounds reasonable, if you happen to be a psychic." | "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’s future requirements. They reason that it’s best to make a design more flexible or sophisticated today, so it can accommodate the needs of tomorrow. That sounds reasonable, if you happen to be a psychic." | ||
- | Another reason to create more complex code is to make optimizations. An optimized code is a more complex code. Pareto principle applies also in code: a program spend most of the time in a small portion of the code, so it will be wise to concentrate the effort to optimize only that part of the code. Another best practice is the to follow the | + | Another reason to create more complex code is to make optimizations. An optimized code is a more complex code. Pareto principle applies also in code: a program spend most of the time in a small portion of the code, so it will be wise to concentrate the effort to optimize only that part of the code. Another best practice is to follow the |
"Three rules of optimization": | "Three rules of optimization": | ||
Line 80: | Line 78: | ||
The following hypotheses can be stated: | The following hypotheses can be stated: | ||
- Simpler solutions are faster to implement. | - Simpler solutions are faster to implement. | ||
- | - Simpler solutions yield less implementation faults (which reduces testing effort). | + | - Simpler solutions yield fewer implementation faults (which reduces testing effort). |
- Simpler solutions are easier to maintain, i.e. detecting and correcting defects is more effective and efficient. | - Simpler solutions are easier to maintain, i.e. detecting and correcting defects is more effective and efficient. | ||
- | - Simpler solutions yield more reliable software, i.e. less defects show up after releasing the software. | + | - Simpler solutions yield more reliable software, i.e. fewer defects show up after releasing the software. |
All these hypotheses can be examined with respect to different complexity metrics. | All these hypotheses can be examined with respect to different complexity metrics. | ||
- | Hypothesis 1 can be regarded | + | Hypothesis 1 is true by definition. If the solution cannot be implemented |
Though hypotheses 2 and 3 are not true by definition but they can be regarded intuitively clear. Nevertheless there is some research. In ((Virginia R. Gibson and James A. Senn: // | Though hypotheses 2 and 3 are not true by definition but they can be regarded intuitively clear. Nevertheless there is some research. In ((Virginia R. Gibson and James A. Senn: // |
principles/keep_it_simple_stupid.txt · Last modified: 2021-10-20 21:09 by christian