|
Unix Programming - Basics of the Unix Philosophy - Rule of Least Surprise: In interface design, always do
Rule of Least Surprise: In interface design, always do
theleast surprising thing.
(This is also widely known as the Principle of Least
Astonishment.)
The easiest programs to use are those that demand the least new
learning from the user — or, to put it another way, the easiest
programs to use are those that most effectively connect to the user's
pre-existing knowledge.
Therefore, avoid gratuitous novelty and excessive cleverness in
interface design. If you're writing a calculator program,
‘+’ should always mean addition! When designing an
interface, model it on the interfaces of functionally similar or
analogous programs with which your users are likely to be
familiar.
Pay attention to your expected audience. They may be end
users, they may be other programmers, or they may be system
administrators. What is least surprising can differ among these
groups.
Pay attention to tradition. The Unix world has rather well-developed
conventions about things like the format of configuration and
run-control files, command-line switches, and the like. These
traditions exist for a good reason: to tame the learning curve.
Learn and use them.
(We'll cover many of these traditions in Chapter5 and Chapter10.)
|
The flip side of the Rule of Least Surprise is to avoid
making things superficially similar but really a little bit different.
This is extremely treacherous because the seeming familiarity raises false
expectations. It's often better to make things distinctly different than
to make them
almost
the same.
|
|
| --
Henry Spencer
|
|
[an error occurred while processing this directive]
|