Principle of least astonishment

{{PsyPersepctive]] The principle of least astonishment (POLA/PLA) applies to user interface design, software design, and ergonomics. It is alternatively referred to as the rule or law of least astonishment, or the rule or principle of least surprise (POLS).

A textbook formulation is "People are part of the system. The design should match the user's experience, expectations, and mental models." What is least surprising may however depend on the expected audience, e.g. end users, programmers or system administrators.

In more practical terms, the principle aims to exploit users' pre-existing knowledge as a way to minimize the learning curve for instance by designing interfaces borrowing heavily from "functionally similar or analogous programs with which your users are likely to be familiar." 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, and widgets of Microsoft Windows programs are also expected to follow certain conventions with respect to key bindings. In more abstract settings like an API, the expectation that function or method names intuitively match their behavior is another example. This practice also involves the application of sensible defaults.{{Citation needed|date=November 2011}}

When two elements of an interface conflict, or are ambiguous, the behaviour 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.{{Citation needed|date=January 2012}}

Examples

 * A website may declare an input that should autofocus when the page is loaded, such as a search field (e.g. Google.com), or the username field of a log in form.
 * Sites offering keyboard shortcuts often allow pressing ? to see the available shortcuts. Examples include Gmail and JIRA.
 * The Function key (in Windows operating systems) is almost always for opening a help program associated with a software. Users expect a help screen or similar help services popup when they press the  key. Software binding this key to some other feature is likely to cause astonishment at the lack of help. Malicious programs are known to exploit users' familiarity with regular shortcut keys.  The corresponding key in Mac OS X is.