Principle of least surprise
   HOME

TheInfoList



OR:

The principle of least astonishment (POLA), aka principle of least surprise (alternatively a law or rule), applies to user interface and software design, software design. It proposes that a component of a system should behave in a way that most users will expect it to behave. The behavior should not astonish or surprise users. The following is a formal statement of the principle: "If a necessary feature has a high astonishment factor, it may be necessary to redesign the feature." The term has been in use in relation to computer use since at least the 1970s. Although first formalized in the field of computer technology, the principle can be applied broadly in other fields. For example, in writing, a cross-reference to another part of the work or a hyperlink should be phrased in a way that accurately tells the reader what to expect. In a book about fishing for bass (fish), bass, "For recipes on how to cook your catch, see chapter 4" should not lead the reader to a chapter about bass fishing seasons in various locations.


Formulation

A textbook formulation is: "People are part of the system. The design should match the user's experience, expectations, and mental models." The principle aims to leverage the 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". 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 Switch (command line), switches, and GUI widget, widgets of Microsoft Windows programs are expected to follow certain conventions with respect to keyboard shortcuts. In more abstract settings like an Application programming interface, API, the expectation that Function (computer science), function or method names intuitively match their behavior is another example. This practice also involves the application of sensible default (computer science), defaults. When two elements of an interface conflict, or are ambiguous, the behavior should be that which will least surprise the User (computing), 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. The choice of "least surprising" behavior can depend on the expected audience (for example, end users, programmers, or system administrators).


Examples

Websites offering keyboard shortcuts often allow pressing to see the available shortcuts. Examples include Gmail, YouTube, and Jira (software), Jira. In Windows operating systems and some desktop environments for Linux, the function key typically opens the User assistance, help program for an Application software, application. A similar keyboard shortcut in macOS is . Users expect a help Window (computing), window or context menu when they press the usual help shortcut key(s). Software that instead uses this shortcut for another feature is likely to cause astonishment if no help appears. A programming language's standard library usually provides a Subroutine, function similar to the pseudocode ParseInteger(string, radix), which creates a machine-readable Integer (computer science), integer from a String (computer science), string of human-readable Numerical digit, digits. The radix conventionally Default argument, defaults to 10, meaning the string is interpreted as decimal (base 10). This function usually supports other bases, like Binary number, binary (base 2) and octal (base 8), but only when they are specified explicitly. In a departure from this convention, JavaScript originally defaulted to base 8 for strings beginning with "0", causing Programmer, developer confusion and software bugs. This was discouraged in ECMAScript 3 and dropped in ECMAScript 5.


See also

* DWIM (do what I mean) * Convention over configuration * Human interface guidelines * Look and feel * Occam's razor * WYSIWYG * List of software development philosophies * User experience design


References

{{Reflist, 30em


External links


Principle of Least Astonishment
at Portland Pattern Repository Heuristics Ergonomics Human–computer interaction Programming principles