Principle of least astonishment
Principle of least astonishment - Wikipedia https://en.wikipedia.org/wiki/Principle_of_least_astonishment
最小惊讶原则
Principle of least astonishment
Jump to navigationJump to search
The principle of least astonishment (POLA) (alternatively "principle/law/rule of least astonishment/surprise")[1][2] applies to user interface and software design.[3] A typical formulation of the principle, from 1984, is: "If a necessary feature has a high astonishment factor, it may be necessary to redesign the feature."[4]
In general engineering design contexts, the principle means that a component of a system should behave in a way that users expect it to behave; that is, users should not be astonished by its behavior.[citation needed]
Contents
[hide]
Formulation[edit]
A textbook formulation is: "People are part of the system. The design should match the user's experience, expectations, and mental models."[5]
The choice of "least surprising" behavior can depend on the expected audience (for example, end users, programmers, or system administrators).[1]
In more practical terms, the principle aims to leverage the pre-existing knowledge of users to minimize the learning curve, for instance by designing interfaces that borrow heavily from "functionally similar or analogous programs with which your users are likely to be familiar".[1] User expectations in this respect may be closely related to a particular computing platform or tradition. For example,Unix command line programs are expected to follow certain conventions with respect to switches,[1] and widgets of Microsoft Windows programs are expected to follow certain conventions with respect tokeyboard shortcuts.[6] In more abstract settings like an API, the expectation that function or method names intuitively match their behavior is another example.[7] This practice also involves the application of sensible defaults.[4]
When two elements of an interface conflict, or are ambiguous, the behavior should be that which will least surprise the user; in particular a programmer should try to think of the behavior that will least surprise someone who uses the program, rather than that behavior that is natural from knowing the inner workings of the program.[4]
Examples[edit]
A web site could declare an input that should autofocus when the page is loaded,[8] such as a search field (e.g., Google.com), or the username field of a login form. Sites offering keyboard shortcutsoften allow pressing ? to see the available shortcuts. Examples include Gmail[9] and Jira.[10]
The F1 Function key in Windows operating systems is almost always for opening a help program associated with an application, and similarly for some of the Linux desktop environments. The corresponding key combination in Mac OS X is ⌘ Command+⇧ Shift+/. Users expect a help screen or similar help services popup when they press this key. Software binding this key to some other feature is likely to cause astonishment if no help appears. Malicious programs are known to exploit users' familiarity with regular shortcut keys.[11]
In programming, a good example of this principle is the common ParseInteger(string, radix) function which exists in most languages and is used to convert a string to an integer value. The radix is usually an optional argument and assumed to be 10 (representing base 10). Other bases are usually supported (like binary or octal) but only when specified explicitly; when the radix argument is not specified, base 10 is assumed. Notably JavaScript did not originally adopt this behaviour, which resulted in developer confusion and software bugs.[12]
See also[edit]
- DWIM (do what I mean)
- Convention over configuration
- Human interface guidelines
- Look and feel
- Occam's razor
- WYSIWYG
- List of software development philosophies
References[edit]
- ^ Jump up to:a b c d Raymond, Eric Steven (2003). "Applying the Rule of Least Surprise". The Art of Unix Programming. faqs.org. p. 20. ISBN 978-0-13-142901-7. Retrieved 2014-01-23.
- Jump up^ James, Geoffrey (1987). "Law of Least Astonishment". The Tao of Programming. 4.1. ISBN 0-931137-07-1. Retrieved2014-02-05.
- Jump up^ Seebach, Peter (2001-08-01). "The Principle of Least Astonishment". The cranky user. IBM DeveloperWorks. Retrieved 2014-01-23.
- ^ Jump up to:a b c Cowlishaw, M. F. (1984). "The design of the REXX language" (PDF). IBM Systems Journal. 23 (4): 333.doi:10.1147/sj.234.0326. Retrieved 2014-01-23.
Could there be a high astonishment factor associated with the new feature? If a feature is accidentally misapplied by the user and causes what appears to him to be an unpredictable result, that feature has a high astonishment factor and is therefore undesirable. If a necessary feature has a high astonishment factor, it may be necessary to redesign the feature.
- Jump up^ Saltzer, J. H.; Kaashoek, Frans (2009). Principles of computer system design: an introduction. Morgan Kaufmann. p. 85. ISBN 978-0-12-374957-4.
- Jump up^ Petroutsos, Evangelos (2010). Mastering Microsoft Visual Basic 2010. Wiley. p. 133. ISBN 978-0-470-53287-4.
- Jump up^ Bloch, Joshua (2006). "How to design a good API and why it matters". Proceeding OOPSLA '06 Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applications. Association for Computing Machinery. pp. 506–7. doi:10.1145/1176617.1176622.ISBN 1-59593-491-X.
- Jump up^ "Forms in HTML". Mozilla Developers Network. Mozilla. Retrieved 2013-07-27.
- Jump up^ Vivian (2013-06-21). "Keyboard shortcuts for Gmail". Google. Retrieved 2013-07-27.
- Jump up^ "Using Keyboard Shortcuts". Atlassian. Retrieved2013-07-27.
- Jump up^ Keizer, G. (1 March 2010). "Microsoft: Don't press F1 key in Windows XP". Computerworld.
- Jump up^ "Why does the radix for JavaScript's parseInt default to 8?". Stack Overflow. 8 April 2011.
External links[edit]
Principle of least astonishment的更多相关文章
- 优秀程序设计的Kiss原则(keep it simple,stupid)
优秀程序设计的Kiss原则(keep it simple,stupid) 良好的编程原则与良好的设计工程原则密切相关.本文总结的这些设计原则,帮助开发者更有效率的编写代码,并帮助成为一名优秀的程序员. ...
- asp.net web api [FromBody]参数
Using jQuery to POST [FromBody] parameters to Web API 时间2013-04-04 00:28:17 Encosia原文 http://encosia ...
- C++ 容器一些细节
今天学习是看到了讲解C++容器的一些细节用法,故记之!参考:http://www.cnblogs.com/answeryi/archive/2011/12/16/2289811.html: 目录 == ...
- C++ 容器及选用总结
目录 ==================================================== 第一章 容器 第二章 Vector和string 第三章 关联容器 第四章 迭代器 第五 ...
- JavaScript Application Architecture On The Road To 2015
JavaScript Application Architecture On The Road To 2015 I once told someone I was an architect. It’s ...
- c++容器使用总结(转载)
目录 ==================================================== 第一章 容器 第二章 Vector和string 第三章 关联容器 第四章 迭代器 第五 ...
- (转)C++ 容器及选用总结
目录 ==================================================== 第一章 容器 第二章 Vector和string 第三章 关联容器 第四章 迭代器 第五 ...
- Effective API Design
Effective API Design */--> div.org-src-container { font-size: 85%; font-family: monospace; } Tabl ...
- 学习笔记:STL
第一部分:(参考百度百科) 一.STL简介 STL(Standard Template Library,标准模板库)是惠普实验室开发的一系列软件的统称.它是由Alexander Stepanov.Me ...
随机推荐
- 九度oj 题目1131:合唱队形
题目描述: N位同学站成一排,音乐老师要请其中的(N-K)位同学出列,使得剩下的K位同学不交换位置就能排成合唱队形. 合唱队形是指这样的一种队形:设K位同学从左到右依次编号为1, 2, …, K,他们 ...
- hdu6059[字典树+思维] 2017多校3
#include <bits/stdc++.h> using namespace std; typedef long long LL; * ][]; * ]; * ]; ][]; ; LL ...
- BZOJ4446 [Scoi2015]小凸玩密室 【树形Dp】
题目 小凸和小方相约玩密室逃脱,这个密室是一棵有n个节点的完全二叉树,每个节点有一个灯泡.点亮所有灯 泡即可逃出密室.每个灯泡有个权值Ai,每条边也有个权值bi.点亮第1个灯泡不需要花费,之后每点亮4 ...
- scrapy介绍及源码分析
一 简介 Scrapy基于事件驱动网络框架 Twisted 编写.因此,Scrapy基于并发性考虑由非阻塞(即异步)的实现. 官方文档 :https://docs.scrapy.org/en/late ...
- 更改navigationBar 颜色
if (IS_IOS7()) { /* iOS7 时 Navigation 颜色 */ [[UINavigationBar appearance] setBarTintColor: HexCo ...
- Scrapy学习-3-Request回调巧用
基于twisted的异步回调 使得页面爬取有阶段性和连续性 from scrapy.http import Request from urllib import parse def parse(sel ...
- 有向图tarjan算法求连通分量的粗浅讲解、证明, // hdu1269
打算开始重新复习一遍相关算法.对于有向图tarjan算法,通过学习过很多说法,结合自己的理解,下面给出算法自己的观点. 算法总模型是一个dfs,结合一个stack(存放当前尚未形成SCC的点集合),记 ...
- 洛谷——P1746 离开中山路
P1746 离开中山路 题目背景 <爱与愁的故事第三弹·shopping>最终章. 题目描述 爱与愁大神买完东西后,打算坐车离开中山路.现在爱与愁大神在x1,y1处,车站在x2,y2处.现 ...
- 使用systemtap调试Linux内核 :www.lenky.info
http://www.lenky.info/archives/category/nix%E6%8A%80%E6%9C%AF/%E8%B7%9F%E8%B8%AA%E8%B0%83%E8%AF%95
- 【Todo】【转载】Scala中Array, List, Tuple的区别
参考了这篇文章: https://my.oschina.net/u/1034176/blog/512314 1. 在Scala 2.7中,Array.List都不能混合类型,只有Tuple可以:而在S ...