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 [2025-11-04 22:12] – created ivanblair7 | principles:keep_it_simple_stupid [2025-11-25 10:53] (current) – old revision restored (2021-10-20 21:09) christian | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | The biggest financial winner is Wall Street. Anyone noticed the rise in concern flusters investors for insurance firms during this debate? These kinds of are at their highest for that year. Insurers will make loads of greenbacks when 30 million join the ranks of the insured. Insurance coverage will be mandated. If you can afford it can be vital to Acupuncture clinic buy it and prone to can't afford to pay for it, then taxpayers would. Either way, the companies obtain the money. | + | ====== Keep It Simple Stupid (KISS) ====== |
| - | Although comes . is unsurpassed in treating trauma along with other acute, moment has come woefully ineffective for prevention or chronic conditions, which account for 80% personal [[http:// | + | ===== Variations and Alternative Names ===== |
| - | The biggest financial winner is Wall Street. Maybe you noticed an upswing in stock prices for insurance providers during this debate? Usually are at their highest for your year. Insurers will make loads dollars when 30 million join the ranks belonging to the insured. Insurance policy will be mandated. Anyone have can afford | + | * (Rule of) Simplicity |
| + | * KISS may also mean " | ||
| - | Acupuncture for back pain can help even years after essential issue or complaint been turned. Also you are never to old to try something new - for - even when what you are trying in thousands | + | **Remarks**: |
| - | With all the hoopla the particular healthcare debate in this country I thought it high time I share my experience that was up close and their individual. In the summer of 2008 To become enjoying a little relaxation with friends at our cottage on in france they River, just south of Sudbury, Ontario, Canada. Now as I share this let me make it clear, we have been going to Canada for five decades and personally I love the place and the people. The healthcare on the other hand, not really. | ||
| - | I am grateful for that 新潟市中央区 整骨院 I have received throughout my one's life. In 1957 I was born in a rural hospital in East Tennessee using a club foot. At 10 years old, doctors performed surgery to straighten my legs. I'd personally later become an athlete and routinely outperform others in physical activities. I want to start a boxing league for guys over 50 right correct. | + | ===== Context ===== |
| - | But this physical contact does usually not mean tend to be doomed to 2-weeks of a particular runny nose and hacking cough. In case the immune system hasn't been bombarded using a highly acidic diet, ingestion of the pesticides sprayed on the veggies and fruit you eat, and also the processed, sugar-loaded delicacies and fast foods, then you stand half a possibility of avoiding this nuisance. | + | * [[contexts: |
| + | * [[contexts: | ||
| + | * [[contexts: | ||
| + | * [[contexts: | ||
| - | The common cold is in charge of more absenteeism from school and the job, fairly a few physicians cannot offer much in the way of cure. Bacteria, as some believe, aren't the regarding a cold-colds are the effects of a virus infection, so antibiotics are absolutely no use Osteopathic clinic . Viruses are smarter than medication companies. | + | ===== Principle Statement ===== |
| - | For 20 years, overall revenue 12 months would require 288.5 billion more than the 2010 revenues for 2,450.2 billion, which an increase of 113.3%. Using exactly three examples the new tax that i see $3,550 for that single, $1,624 for the married, and $11,523 for me. Percentage of income would move to 7.1% for your single, 3.3% for the married, and on the lookout for.8% for me. | + | A simple solution is better |
| - | You: OK, well I am aware that sometimes people get yourself a bit nervous when they require their first acupuncture treatment so this is exactly what I'll do for anybody. we have a free report how to chose incredibly best acupuncturist for you or all your family and before you are available as I'll send that to you through the mail so you have an involving what to be able to in an Acupuncture clinic, does that proper? | ||
| - | She apologized and then decided location a scope down my nose to insure Initially but then have a wind pipe blockage. It's true that little about these types of things even so knew Worry me at first have a wind pipe blockage or I'd already be dead. She insisted well, i relented between episodes as she stuck the instrument in my nose, down my throat and then said, " | + | ===== Description ===== |
| - | I am grateful | + | The KISS principle is about striving |
| - | Doctors tend to be simply breaking | + | 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. | ||
| + | |||
| + | ===== Rationale ===== | ||
| + | |||
| + | A simpler solution is better than a complex one because simple solutions are easier to maintain. This includes increased readability, | ||
| + | |||
| + | The advantage of simplicity is even more significant when the person who maintains the software is not the one who once wrote it. The maintainer might also be less familiar | ||
| + | |||
| + | One reason to create more complex code is to make it more flexible to accommodate further requirements. But one cannot | ||
| + | |||
| + | "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 | ||
| + | "Three rules of optimization": | ||
| + | |||
| + | |||
| + | ===== Strategies ===== | ||
| + | |||
| + | This is a very general principle, so there is a large variety of possible strategies to adhere more to this principle largely depending | ||
| + | |||
| + | * Avoid inheritance, | ||
| + | * Avoid low-level optimization of algorithms, especially when involving Assembler, bit-operations, | ||
| + | * Use simple brute-force solutions instead of complicated algorithms. Slower algorithms will work in the first place. | ||
| + | * Avoid numerous classes and methods as well as large code blocks (see [[More Is More Complex]]) | ||
| + | * For slightly unrelated but rather small pieces of functionality use private methods instead of an additional class. | ||
| + | * Avoid general solutions needing parameterization. A specific solution will suffice. | ||
| + | * ... | ||
| + | |||
| + | |||
| + | ===== Caveats ===== | ||
| + | |||
| + | See section [[#contrary principles]]. | ||
| + | |||
| + | |||
| + | ===== Origin ===== | ||
| + | |||
| + | 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 | ||
| + | |||
| + | |||
| + | ===== Evidence ===== | ||
| + | /* Comment out what is not applicable and explain the rest: */ | ||
| + | /* * [[wiki: | ||
| + | /* * [[wiki: | ||
| + | |||
| + | |||
| + | [[wiki: | ||
| + | |||
| + | [[wiki: | ||
| + | |||
| + | The following hypotheses can be stated: | ||
| + | - Simpler solutions are faster to implement. | ||
| + | - 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 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. | ||
| + | |||
| + | 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, | ||
| + | |||
| + | Furthermore, | ||
| + | |||
| + | Lastly, hypothesis 4 is likely to be false. Several studies relating complexity metrics and post-release reliability show that module size in lines of code predicts reliability at least as good as the McCabe metric (also called cyclomatic complexity) ((see Albert Endres, Dieter Rombach: //A Handbook of Software and Systems Engineering//, | ||
| + | |||
| + | |||
| + | ===== Relations to Other Principles ===== | ||
| + | |||
| + | ==== Generalizations ==== | ||
| + | |||
| + | ==== Specializations ==== | ||
| + | |||
| + | * [[More Is More Complex]] (MIMC): KISS states that one should strive for simplicity. MIMC makes this more concrete stating that more of anything (methods, classes, lines of code, ...) increases complexity. | ||
| + | * [[You Ain't Gonna Need It]] (YAGNI) | ||
| + | * [[Rule of Parsimony]] | ||
| + | * [[Rule of Robustness]] | ||
| + | |||
| + | ==== Contrary Principles ==== | ||
| + | |||
| + | Note that many principles are contrary to KISS. This means that it is worthwhile to consider KISS when considering one of those. Nevertheless this does not mean that this is true the other way around. When considering KISS, one wouldn' | ||
| + | |||
| + | * **[[Generalization Principle]] (GP)**: This is the directly converse principle. A generally applicable solution typically is not simple anymore. | ||
| + | * **[[Murphy' | ||
| + | * [[Model Principle]] (MP): There are often simpler ways to build a software system than to model and mirror the real-world behavior, which frequently means having more objects and more complicated structures. Nevertheless, | ||
| + | |||
| + | ==== Complementary Principles ==== | ||
| + | |||
| + | ==== Principle Collections ==== | ||
| + | |||
| + | {{page> | ||
| + | {{page> | ||
| + | |||
| + | |||
| + | ===== Examples ===== | ||
| + | |||
| + | ==== Example 1: Fuzzy Simplicity ==== | ||
| + | |||
| + | Simplicity is a blurry, partly subjective measure. Sometimes it is difficult to tell what is simpler. The following example shows that: | ||
| + | |||
| + | <code java> | ||
| + | public String weekday1(int dayOfWeek) | ||
| + | { | ||
| + | switch (dayOfWeek) | ||
| + | { | ||
| + | case 1: return " | ||
| + | case 2: return " | ||
| + | case 3: return " | ||
| + | case 4: return " | ||
| + | case 5: return " | ||
| + | case 6: return " | ||
| + | case 7: return " | ||
| + | default: throw new IllegalArgumentException(" | ||
| + | } | ||
| + | } | ||
| + | |||
| + | public String weekday2(int dayOfWeek) | ||
| + | { | ||
| + | if ((dayOfWeek < 1) || (dayOfWeek > 7)) | ||
| + | throw new IllegalArgumentException(" | ||
| + | |||
| + | final String[] weekdays = { | ||
| + | " | ||
| + | |||
| + | return weekdays[dayOfWeek-1]; | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | 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 '' | ||
| + | |||
| + | 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. | ||
| + | ===== Description Status ===== | ||
| + | /* Choose one of the following and comment out the rest: */ | ||
| + | / | ||
| + | [[wiki: | ||
| + | / | ||
| + | |||
| + | ===== Further Reading ===== | ||
| + | |||
| + | * [[wiki> | ||
| + | * [[wp> | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | ===== Discussion ===== | ||
| + | |||
| + | Discuss this wiki article and the principle on the corresponding [[talk: | ||
principles/keep_it_simple_stupid.1762290746.txt.gz · Last modified: by ivanblair7
