User Tools

Site Tools


principles:generalization_principle

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
Next revisionBoth sides next revision
principles:generalization_principle [2013-02-18 17:24] – external edit 127.0.0.1principles:generalization_principle [2021-09-02 11:48] – old revision restored (2021-05-12 02:05) 65.21.179.175
Line 3: Line 3:
 ===== Variants and Alternative Names ===== ===== Variants and Alternative Names =====
  
-  * Build Generality into Software +  * Build Generality into Software((Alan M. David: //201 Principles of Software Development//)) 
 +  * Abstractions Live Longer than Details((Andrew Hunt and David Thomas: //The Pragmatic Programmer//))
  
 ===== Context ===== ===== Context =====
Line 33: Line 33:
   * Use parameterizable modules   * Use parameterizable modules
   * Find suitable abstractions   * Find suitable abstractions
 +
 +
 ===== Caveats ===== ===== Caveats =====
  
-See section [[#contrary principles]].+Making a [[glossary:module]] (typically a layer, a subsystem or an API) too general leads to the [[wp>inner-platform effect]]. This means that the module is so general that it mirrors the functionality of the underlying platform without adding a benefit but only complexity. 
 + 
 +Another problem is the [[wp>turing tarpit]]. This means that the module is so general that arbitrarily complex tasks can be performed but those of interest, meaning the rather simple tasks that occur over and over again, are also difficult to do. This is a violation of the [[Easy to Use and hard to Misuse|EUHM]] principle. 
 + 
 +See also section [[#contrary principles]].
  
  
 ===== Origin ===== ===== Origin =====
  
-FIXME+The term "generalization principle" is proposed here. Nevertheless the value of generalized solutions is well known at least since: 
 + 
 +David Parnas: //Designing Software for Ease of Extension and Contraction// 
  
 ===== Evidence ===== ===== Evidence =====
Line 61: Line 70:
  
   * **[[Keep It Simple Stupid]] (KISS)**: A generalized solution is typically not simple anymore. This is the typical conflict between generality and simplicity.   * **[[Keep It Simple Stupid]] (KISS)**: A generalized solution is typically not simple anymore. This is the typical conflict between generality and simplicity.
 +  * [[Easy to Use and Hard to Misuse]] (EUHM): Too general solutions may lead to complicated usage of the module. 
 +  * [[Rule of Explicitness]] (RoE): RoE often results in specific solutions. Generality often requires stating something implicitly.
 ==== Complementary Principles ==== ==== Complementary Principles ====
  
Line 72: Line 82:
 {{page>collections:Principles in "The Pragmatic Programmer"#Box}} {{page>collections:Principles in "The Pragmatic Programmer"#Box}}
  
-===== Example =====+===== Examples =====
  
  
 ===== Description Status ===== ===== Description Status =====
 /* Choose one of the following and comment out the rest: */ /* Choose one of the following and comment out the rest: */
-[[wiki:Stub]] +/*[[wiki:Stub]]*
-/*[[wiki:Incomplete]]*/+[[wiki:Incomplete]]
 /*[[wiki:Complete]]*/ /*[[wiki:Complete]]*/
  
principles/generalization_principle.txt · Last modified: 2021-10-20 21:20 by christian