User Tools

Site Tools


principles:fail_fast

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:fail_fast [2021-09-02 12:02] – old revision restored (2021-05-19 11:17) 65.21.179.175principles:fail_fast [2021-10-18 21:33] (current) – +++ restored +++ christian
Line 8: Line 8:
 ===== Context ===== ===== Context =====
 /* fill in contexts here: */ /* fill in contexts here: */
-  * [[contexts:Object-Oriented Design]] +  * [[contexts:Implementation]] /* FF is more about implementation than design */ 
 +  * [[contexts:API Design]] 
  
  
Line 23: Line 24:
 ===== Rationale ===== ===== Rationale =====
  
-Then a failure remains undetected, it propagates through the system ultimately causing other modules to fail. This results in in a more complicated fault removal. Furthermore undesired side effects like corrupted files may occur. A crashed program clearly communicates that there is a problem and is often a better situation than a misbehaving program.+When a failure remains undetected, it propagates through the system ultimately causing other modules to fail. This results in in a more complicated fault removal. Furthermore undesired side effects like corrupted files may occur. A crashed program clearly communicates that there is a problem and is often a better situation than a misbehaving program.
  
  
Line 31: Line 32:
   * Throw an Exception.   * Throw an Exception.
   * Use assertions.   * Use assertions.
 +
 +
 +===== Caveats =====
 +
 +FF reveals problems which are already present in the system. For a system with only a few problems, this is good as the remaining faults are identified and fixed more easily. But applying FF to a system that has many problems may decrease reliability further as problems which were hidden, show up, produce error messages and lead to system aborts.
 +
 +See also section [[#contrary principles]].
  
  
Line 62: Line 70:
 ==== Principle Collections ==== ==== Principle Collections ====
  
-{{page>collections:OOD Principle Language#Box}} 
 {{page>collections:Unix Philosophy (Eric S. Raymond)#Box}} {{page>collections:Unix Philosophy (Eric S. Raymond)#Box}}
 {{page>collections:Principles in "The Pragmatic Programmer"#Box}} {{page>collections:Principles in "The Pragmatic Programmer"#Box}}
  
-===== Example =====+===== Examples =====
  
  
Line 83: Line 90:
   * Jim Gray: //[[http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.110.9127|Why Do Computers Stop And What Can Be Done About It?]]//   * Jim Gray: //[[http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.110.9127|Why Do Computers Stop And What Can Be Done About It?]]//
   * Joshua Bloch: //[[http://www.infoq.com/presentations/effective-api-design|How to Design a Good API & Why it Matters]]//   * Joshua Bloch: //[[http://www.infoq.com/presentations/effective-api-design|How to Design a Good API & Why it Matters]]//
 +
 +===== Discussion =====
 +
 +Discuss this wiki article and the principle on the corresponding [[talk:principles:Fail Fast|talk page]].
  
principles/fail_fast.1630576957.txt.gz · Last modified: 2021-09-02 12:02 by 65.21.179.175