Re: The Rule of Least Surprise

From: Shalom Bresticker (Shalom.Bresticker@motorola.com)
Date: Mon Sep 22 2003 - 00:30:14 PDT

  • Next message: Steven Sharp: "Minutes of BTF Meeting September 22, 2003"

    Precedence: bulk

    This can be found at http://www.catb.org/esr/writings/taoup/html/ch01s06.html

    More good rules there, too.

    Im general, the book is a good read.

    Shalom

    Shalom Bresticker wrote:

    > I saw this in Eric Raymond's "The Art of Unix Programming".
    >
    > He did not originate it, but no matter.
    >
    > He was referring to interface design,
    > but we can apply it to language design as well.
    > Just generalize it.
    >
    > This is what he says:
    >
    > Rule of Least Surprise: In interface design, always do the least 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 Chapter 5 and Chapter 10.)
    >
    > 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

    --
    Shalom Bresticker                           Shalom.Bresticker@motorola.com
    Design & Reuse Methodology                             Tel: +972 9 9522268
    Motorola Semiconductor Israel, Ltd.                    Fax: +972 9 9522890
    POB 2208, Herzlia 46120, ISRAEL                       Cell: +972 50 441478
    


    This archive was generated by hypermail 2.1.4 : Sun Sep 21 2003 - 23:43:11 PDT and
    sponsored by Boyd Technology, Inc.