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 revision Previous revision
Next revision
Previous revision
principles:keep_it_simple_stupid [2018-12-30 05:21]
72.178.89.198 [Evidence] fixing a few of the grammar mistakes
principles:keep_it_simple_stupid [2020-01-20 17:26] (current)
193.158.100.19 [Context]
Line 26: Line 26:
 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 in one being easily understandable. 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 in one 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 ​in using them. +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."​ - Refactoring To Patterns - Joshua Kerievsky. "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."​ - 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 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":​ (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) "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)
  
principles/keep_it_simple_stupid.1546143706.txt.gz · Last modified: 2018-12-30 05:21 by 72.178.89.198