User Tools

Site Tools


principles:principle_of_least_surprise

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:principle_of_least_surprise [2021-05-11 22:18] – old revision restored (2021-03-25 15:44) 95.216.157.239principles:principle_of_least_surprise [2021-10-18 22:15] (current) – +++ restored +++ christian
Line 5: Line 5:
   * Principle of Least Astonishment (PLA)   * Principle of Least Astonishment (PLA)
   * May also be referred to as "rule" or "law" instead of "principle"   * May also be referred to as "rule" or "law" instead of "principle"
 +  * Acronyms sometimes include the "o" for "of": PoLA, PoLS
    
  
 ===== Context ===== ===== Context =====
 /* fill in contexts here: */ /* fill in contexts here: */
-  * [[contexts:Object-Oriented Design]]  +  * [[contexts:Object-Oriented Design]] 
 +  * [[contexts:API Design]] 
 +  * [[contexts:User Interface Design]] 
 +  * [[contexts:Implementation]]
  
 ===== Principle Statement ===== ===== Principle Statement =====
  
 > In interface design, always do the least surprising thing.((Eric S. Raymond: //[[http://www.catb.org/~esr/writings/taoup/html/ch01s06.html#id2878339|The Art of Unix Programming: Rule of Least Surprise]]//)) > In interface design, always do the least surprising thing.((Eric S. Raymond: //[[http://www.catb.org/~esr/writings/taoup/html/ch01s06.html#id2878339|The Art of Unix Programming: Rule of Least Surprise]]//))
 +
  
 ===== Description ===== ===== Description =====
  
 +Never surprise the user. An interface should behave exactly as the user thinks it behaves. What surprises the user depends on the kind of interface (user interface, module interface) and the type of user (end user, fellow programmer, maintainer). The central idea of PLS is to think about how the user would want to use the interface.
  
  
 ===== Rationale ===== ===== Rationale =====
  
 +Surprises are always a potential source for frustration. A user wants to be in control of the system. If the system does not behave as intended, the user gets disappointed and has to determine how to get the system do what it should do. On the other hand a system that behaves according to the users wishes is pleasant to use.
 +
 +Secondly when everything works as expected, the user will make fewer mistakes. In case of a user interface this means that the user is more effective and in case of a module interface the software will have fewer defects.
  
  
Line 45: Line 53:
  
 ===== Origin ===== ===== Origin =====
 +
 +The precise origin is unknown. Probably it's //[[http://www.canonical.org/~kragen/tao-of-programming.html|The Tao Of Programming]]// by Geoffrey James.
  
  
 ===== Evidence ===== ===== Evidence =====
 /* Comment out what is not applicable and explain the rest: */ /* Comment out what is not applicable and explain the rest: */
-/+ 
-  * [[wiki:Proposed]] +/*[[wiki:Proposed]]*/ 
-  * [[wiki:Examined]] +/*[[wiki:Examined]]*
-  * [[wiki:Accepted]] + 
-  * [[wiki:Questioned]] +[[wiki:Accepted]]: PLA is widely known and also treated in Eric S. Raymond's //The Art of Unix Programming// 
-*/+ 
 +/*[[wiki:Questioned]]*/
  
  
Line 84: Line 95:
 ===== 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]]*/
  
Line 95: Line 106:
   * [[wiki>PrincipleOfLeastAstonishment]]   * [[wiki>PrincipleOfLeastAstonishment]]
   * 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:Principle Of Least Surprise|talk page]].
  
principles/principle_of_least_surprise.1620764328.txt.gz · Last modified: 2021-05-11 22:18 by 95.216.157.239