User Tools

Site Tools


principles:keep_it_simple_stupid

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
principles:keep_it_simple_stupid [2025-11-04 21:29] – created colequinn8555principles:keep_it_simple_stupid [2025-11-25 10:53] (current) – old revision restored (2021-10-20 21:09) christian
Line 1: Line 1:
-Emotions are a factor because the body and mind are strongly connected. Of course we all know, stress and frustration can cause insomnia. Individuals with this type of stress will also work irritable maintain neck afflictions. The treatment should smooth the liver, helping to flow the qi. The point LV 3 on the foot and LI 4 on the hand can help treat Liver Qi stagnation. This can sometimes also cause digestive problems such as bloating, belching, and feeling sick. Points for digestion can help, while ST 36 near the knee and PC 6 on the forearm.+====== Keep It Simple Stupid (KISS) ======
  
-Another kind of Spondylosis is cervical spondylosis that affects the backbone badly. Lumbar Spondylosis symptoms generally take place in those you also must be are at one point would work excessively on the computer, drive vehicle, farmers who work tirelessly in the sunshine and mostly in aged age guys and women. If the patient uses the painkillers for a hard time, it may have strangling effect on the Osteopathic clinic stomach and kidneys. However, in many cases, the Lumbar Spondylosis does not show any symptoms; just he feels backache typically the start. He should consult the doctor and get the x-ray report and CT scan of his foundation.+===== Variations and Alternative Names =====
  
-There are so many more questionsbut I am going to stop here. I am afraid. I believe within a freecapitalistic society. America became the greatestmost powerful, and richest because of the free spirit of it's peopleI do believe there are better ways fulfill the needs of the uninsured, but it will certainly be squarely at the disposal of politiciansIsn't it time?+  * (Rule of) Simplicity 
 +  * KISS may also mean "Keep it short and simple""keep it simple and straightforward""keep it smart and simple"etcA large amount of variations exists.
  
-[[http://www.gbsa.kr/bbs/board.php?bo_table=free&wr_id=814680|新潟市 整体院]] I am burdened for anyone who should not have access to quality healthcare. But I'm scared to death on the government taking it throughout. I still believe the free market would provide better healthcare faster, and lower costs if given chanceState insurance boards should be eliminated and also the insurance industry opened doing competitionnumerousOopsI forgot, you can't eliminate government departments.+**Remarks**"Stupid" may be interpreted as an adjective or a nounCompare the two variants "keep it simple and stupid" vs"keep it simplestupid!"Despite all these alternative namesthe general idea of the KISS principle is always the same.
  
-The government will mandate that organizations insure along with "pre-existing conditions". They are accused of denying people coverage as these conditions, since they can't make profits. The premiums will must be be huge, so will the government just pay them back with tax dollars? 
  
-Health is simple, healthcare is not even. If we keep it simple and manage health, we do not require as via a tunnel the complicated, expensive care. Wellness is the product. When you look at individual people, each and every person has to be accountable for their medical care. Being responsible for your health means Osteopathic clinic accountability for your care but also for your actions and efforts to minimize that think about.+===== Context =====
  
-According to Carmen Green, M.D., a problem specialist at the University of Michigan's Health System Center for Interventional Pain Medicine, as many as one-fifth to one-third of Americans live with form of chronic pain (Gazella, 2005). Let's say there are about 300 million people living planet United States right now, that means that as many as ninety-nine million people may be experiencing physical pain, many on a building basis.+  * [[contexts:Object-Oriented Design]] 
 +  * [[contexts:Architecture]] 
 +  * [[contexts:User Interface Design]] 
 +  * [[contexts:Implementation]]
  
-The United healthcare insurance provides a drug plan which requires social security part Ve had. This plan is aggressively marketed by United 新潟市 整体院. Large segments in the senior population have joined for medication plan.+===== Principle Statement =====
  
-For 20 years, essential revenue every year would require 288.5 billion more in contrast to 2010 revenues for 2,450.2 billion, which is an increase of 113.3%. Using caffeinated beverages contain three examples the new tax would be $3,550 for your single, $1,624 for the married, and $11,523 for me. Percentage of income would in order to 7.1% for the single, couple of.3% for the married, and eleven.8% for me.+A simple solution is better than a complex oneeven if the solution looks stupid
  
-Balancing each party is impossible. I should be paid well enough to support my family, yet I'd rather not be robbed when seeking to healthcare regions. This is where private industry can step to the peak. Healthcare shouldn't cost so much fulfill the needs of patients. Without going into great detail, healthcare companies have very much figured out how to "pool" their members to avoid a catastrophic trend of insurance claims that would bankrupt these kind of people. Therefore, why does it cost so often? Employers already bear a lot of the burden for their employees when contributing towards their premiums. The answer seems pretty obvious to me: Present insurance companies are top heavy. 
  
-Ditto for that costs. I really believe each people today will pay more for healthcare no this costs. The government again will offer their genius for reducing costs. They'll say which costs would have skyrocketed without their input.+===== Description =====
  
-Be open-mindedbe flexible and mostly be appreciation and. Roll with the punches and differences and treat these new experiences regarding opportunity Osteopathic clinic to flourish your thinking that. Leave at home the attitude of "my way or the highway"You could have several suggestionsYou could stay within Green hotel and like the low-impact romantic experience and do locallow-impact pursuits like river walkingexploring for special secret pools and waterfallsPracticalthen focus visit gardensgo for nature walksplant medicine walks or play at the beach and explore caverns. You could walk in order to Ballena Park'whale tale and snorkel (here in Costa Rica!).+The KISS principle is about striving for simplicity. Modern programming languagesframeworks and APIs have powerful means to create sophisticated solutions for various kinds of problems. Sometimes developers might feel tempted to write "clever" solutions that use all these complex features. The KISS principle states that a solution is better when it uses less inheritance, less polymorphism, fewer classes, etc. 
 + 
 +A solution that follows the KISS principle might look boring or even "stupid" but simple and understandable. The KISS principle states that there is no value in a solution being "clever" but being easily understandable. 
 + 
 +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, understandability, and changeabilityFurthermore, writing simple code is less error-prone. 
 + 
 +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 with sophisticated programming language features. So simple and stupid programs are easier to maintain because the maintainer needs less time to understand them and is less likely to introduce further defects. 
 + 
 +One reason to create more complex code is to make it more flexible to accommodate further requirements. But one cannot know how to make it flexible or if that flexibility will be ever needed. 
 + 
 +"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. The reason that it's best to make a design more flexible or sophisticated today is to accommodate the needs of tomorrowThat sounds reasonable, if you happen to be a psychic." - Refactoring To Patterns - Joshua Kerievsky. 
 + 
 +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 spends 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": (1. Don't, 2. Don't... Yet, 3. Profile before optimizing), which make sense: to optimize only the code with performance problems. (First author: Michael A. Jackson) 
 + 
 + 
 +===== Strategies ===== 
 + 
 +This is a very general principle, so there is a large variety of possible strategies to adhere more to this principle largely depending on the given design problem: 
 + 
 +  * Avoid inheritance, polymorphism, dynamic binding and other complicated OOP concepts. Use delegation and simple if-constructs instead. 
 +  * Avoid low-level optimization of algorithms, especially when involving Assembler, bit-operations, and pointers. Slower implementations will work just fine. 
 +  * 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: //[[http://www.nap.edu/html/biomems/cjohnson.pdf|Clarence Leonard (Kelly) Johnson 1910—1990: A Biographical Memoir]]//)). 
 + 
 +The principle of striving for simple solutions sometimes is also called "(rule of) simplicity"((Eric SRaymond: //[[http://www.catb.org/~esr/writings/taoup/html/ch01s06.html#id2877917|The Art of Unix Programming]]//)) which was also prominently stated by Tony Hoare in his Turing Award lecture: "I conclude that there are two ways of constructing software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult."((Tony Hoare: //[[http://awards.acm.org/images/awards/140/articles/4622167.pdf|The Emperor’s Old Clothes / The 1980 ACM Turing Award Lecture]]//)) 
 + 
 + 
 +===== Evidence ===== 
 +/* Comment out what is not applicable and explain the rest: */ 
 +/*  * [[wiki:Proposed]]*/ 
 +/*  * [[wiki:Questioned]]*/ 
 + 
 + 
 +[[wiki:Accepted]]: This principle is widely known and accepted in practice. See for example Jargon File: //[[http://www.catb.org/jargon/html/K/KISS-Principle.html|KISS Principle]]// 
 + 
 +[[wiki:Examined]]: While the preference for simple solutions can be considered trivially intuitive, there has been some work relating simplicity or rather complexity and certain quality attributes. But as there is no universally applicable complexity metric and not even a commonly agreed upon clear definition of simplicityresearch is bound to examine certain aspects of KISS independently.  
 + 
 +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 maintaini.e. detecting and correcting defects is more effective and efficient. 
 +  - Simpler solutions yield more reliable softwarei.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 quicklyit is not simple.  
 + 
 +Though hypotheses 2 and 3 are not true by definition but they can be regarded intuitively clear. Neverthelessthere is some research. In ((Virginia R. Gibson and James A. Senn: //[[http://dl.acm.org/citation.cfm?id=62073|System Structure and Software Maintenance Performance]]//)) a system was improved in two steps resulting in three variants of the same system. Several metrics show that the improvements reduced complexity. 36 programmers with varying experience conducted three different maintenance tasks and their performance was measured. The results indicate that the improvements also improved maintainability. Several other studies support the correlation between complexity and maintainability((Chris F. Kemerer: //[[http://link.springer.com/article/10.1007%2FBF02249043?LI=true|Software complexity and software maintenance: A survey of empirical research]]//)). 
 + 
 +Furthermore, software cost estimation techniques are partly based on complexity judgments((Barry W. Boehm: //Software Engineering Economics//, IEEE)). So complexity---although this normally relates the complexity of the problem and not to the complexity of the solution---is a known cost factor which may be accounted to maintenance. 
 + 
 +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//, p168ff.)). Assuming cyclomatic complexity correctly depicts the complexity of a module, reliability should not the reason for applying KISS. 
 + 
 + 
 +===== 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't want to consider all principles that have complexity as a disadvantage. So here are those needing consideration: 
 + 
 +  * **[[Generalization Principle]] (GP)**: This is the directly converse principle. A generally applicable solution typically is not simple anymore. 
 +  * **[[Murphy'Law]] (ML)**: The ultimate reason behind KISS is to increase maintainability and reduce the introduction of defects. But following KISS blindly by always using the simplest solution may also lead to //reduced// maintainability when Murphy's Law is not considered. 
 +  * [[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, it is advisable to do so anyway. 
 + 
 +==== Complementary Principles ==== 
 + 
 +==== Principle Collections ==== 
 + 
 +{{page>collections:OOD Principle Language#Box}} 
 +{{page>collections:Unix Philosophy (Eric S. Raymond)#Box}} 
 + 
 + 
 +===== 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 "Monday"; 
 +        case 2: return "Tuesday"; 
 +        case 3: return "Wednesday"; 
 +        case 4: return "Thursday"; 
 +        case 5: return "Friday"; 
 +        case 6: return "Saturday"; 
 +        case 7: return "Sunday"; 
 +        default: throw new IllegalArgumentException("dayOfWeek must be in range 1..7")
 +    } 
 +
 + 
 +public String weekday2(int dayOfWeek) 
 +
 +    if ((dayOfWeek < 1) || (dayOfWeek > 7)) 
 +        throw new IllegalArgumentException("dayOfWeek must be in range 1..7"); 
 + 
 +    final String[] weekdays = { 
 +        "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}; 
 + 
 +    return weekdays[dayOfWeek-1]; 
 +
 +</code> 
 + 
 +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. ''weekday2'' has less statements and less execution branches. Complexity metrics measuring these aspects (e.g. the [[glossary:cyclomatic complexity]]) will therefore prefer ''weekday2''
 + 
 +On the other hand ''weekdays1'' uses less language features (just switch, return, and exceptions whereas ''weekdays2'' needs if, arrays, arithmetic, return, and exceptions). Furthermore in ''weekdays1'' the relation between input and output can be seen directly and it's clear how it works by just seeing the method. But for understanding ''weekday2'' there are more details to think about. This is especially true for the range check at the beginning and the index computation in the ''return'' statement. Clearly this is not particularly difficult but these are aspects which are more difficult than in the other version of the method. 
 + 
 +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:Stub]]*/ 
 +[[wiki:Incomplete]] 
 +/*[[wiki:Complete]]*/ 
 + 
 +===== Further Reading ===== 
 + 
 +  * [[wiki>KeepItSimple]] 
 +  * [[wp>KISS principle]] 
 +  * [[http://people.apache.org/~fhanik/kiss.html|Apache: KISS]] 
 +  * [[http://www.catb.org/~esr/writings/taoup/html/ch01s06.html#id2877917|The Art of Unix Programming: Rule of Simplicity]] 
 + 
 +===== Discussion ===== 
 + 
 +Discuss this wiki article and the principle on the corresponding [[talk:principles:Keep It Simple Stupid|talk page]].
principles/keep_it_simple_stupid.1762288179.txt.gz · Last modified: by colequinn8555