CSC/ECE 517 Fall 2007/wiki2 9 NT
Principle of Least Astonishment. Write a guide to the Web pages on the Principle of Least Astonishment. Which should the reader look at for easy-to-understand examples? Which give a feel for where the principle should be used? Is this principle present in fields other than programming? Is the term used consistently in other disciplines?
What is 'Principle of Least Astonishment'?
'Principle of Least Astonishment' or 'Rule of minimum surprise' asserts that the system will cause the least surprise for the user by being as consistent and predictable as possible, and therefore usable. Which imply that in case of an ambiguity or a conflict in the system, the behavior of the system should be the one which will least surprise the user. In programming, this principle has a wide range of application in topics such as user-interface design, programming language design, and programming. This principle is used in various disciplines as well as computer science such as engineering, science, and philosophy which are briefly covered later in this wiki. After this brief information about the principle of least astonishment, now we are going to talk more about the sources found online about this topic and how well they explore the topic.
Guide to Web pages on Principle of Least Astonishment in Programming
When you type the keyword “Principle of Least Astonishment” to Google, it returns about 35,800 web pages. Surprisingly, none of the web pages listed are good enough to explain the topic thoroughly by itself.
Here, we are going to explain the top searches returned by the Google query and comment on how effective they are in presenting this topic.
Where should the reader look for easy-to-understand examples?
"Principle of Least Astonishment at Portland Pattern Repository" provide a simple explanation to the topic and gives a couple of easy-to-understand examples; this is one of the best sites that one should start to learn on this topic.
"Wikipedia" defines the Principle of Least Astonishment briefly, and gives two simple easy-to-understand real-life examples, this website can help one to understand what the principle is but it is not a very good page to understand the topic and its application in great detail at all.
"Ethical Software" is a blog of an instructor where he shares his in class experience when he was teaching Principle of Least Astonishment. The example that he gave in class is the Ruby on Rails code where he suggests using <%yield%> instead of <%content_for_layout%> to demonstrate this principle. This web page is not a good start to learn the topic, but it gives the idea of the principle and it demonstrates it with the Ruby on Rails code which is very related to what we have been doing in our class.
"Andy Wibbel" gives the easy-to-understand definition of the principle that is combined from different sources. This is a good web page to start to learn about the topic, but it does not give any examples and it does not present where this principle is used.
Where to get a feel where the principle should be used?
Web Pages
"Peter Seebach" explores the Principle of Least Astonishment on the web pages, talks about the common issues in web pages that astonish viewers. This web page gives many easy-to-understand examples of how this principle being violated on web pages.
"Site finding system" presents the problem of typing wrong site name in the internet, as a violation for the principle.
API Design and Programming
"Steve’s Tech Talk" gives examples of the Principle of Least Astonishment from a computer scientist’s perspective. The examples provided in this site are all about how to write code and API that would surprise the client least.
"API Design" emphasized the importance of following the principle of least surprise in API design. Since an API will be used my many consumers, it should be intuitive, naming conventions should be clear and understandable, and API overall should meet the consumers expectations which is what this principle states.
User Interfaces
"The Art of Unix Programming" explains what the principle is and how it can be used when designing user-interfaces.
"Ergonomic Guidelines for UI Design" lists the basic rules of thumb for designing good user interfaces, which of course includes following the Principle of Least Astonishment to be intuitive and consistent for the users of the system.
"Simple is the the Sophisticated" is an article by Peter Seebach on how applications with simpler user interfaces tend to dominate the ones with complicated interfaces which all ties in with what Principle of Least Astonishment states.
"Java Hall of Shame" presents some of the points where Java does not obey the Principle of Least Astonishment.
"Thread safety" gives few tips, and more links to implement the principle in multi-threading environment.
Least Astonishment in Other Disciplines
The 'Principle of Least Astonishment' can be considered as a cross disciplanry law in our modern life. From software to machine design to modern philosophy it is considered as a valid test criteria to well designed system. While the system changes (IT, product design, law, science, ...) the principle name will changes as well, as it appear in different terms ('User Centered Design', Contextual_design, Law of Nature, Occam's razor, ...). May be one of the clear examples to define a good design using the current principle is Law of Nature, which define a solution -or well designed system- to be:
- True!
- Universal. They appear to apply everywhere in the universe.
- Simple. They are typically easily expressed.
- Absolute. Nothing in the universe appears to affect them.
- Stable. Unchanged since first discovered.
- Omnipotent. Everything in the universe apparently must comply with them (according to observations).
- Conservative.
- Symmetry in space and time.
- Reversible in time.
Certainly these criteria would define a good code or a user interface as a counter to law of nature. Which surprisngly, or in our case least surprisingly, the 'Principle of Least Astonishment' prove itself by being least surprise solution as it is true, universal, simple, absolute, stable, omnipotent, symmetry and reversable. Following is general outline where the principle is applied.
Engineering and Design
Design of equibment/product/system/laws/environment for human interaction is a whole science which is called Ergonomics. Although, this science expands to contain other aspects such as physical, cognitive, and organizational ergonomics. More specific concepts that relate to ours will be 'User Centered Design' or 'Contextual Design'. 'Contextual Design' support not only the principle of least surprise but also investigate into the context and motivation of user behavior to be adopted by the design. Certain enough this principle is applied to every aspect in our life; cars, buildings, traffic, education, ...etc.
- "Wikipedia List of human-computer interaction topics" provides a comprehensive list of topics related to the application of the human-computer interaction. [Other links].
Science and Nature
The same principle is extended to science as well, where Law of Nature is believed to carry the least surprise. Einstein said, "To me, the most incomprehensible thing about the universe is that it is comprehensible" 2. A prove would be that many of the law of natural and major discoveries, as relativity, were found before it was directly observed, analytically or expermintaly observed. Which illustrate that the Natural and the universe is a good design as well.
- "The Incomplete Guide to the Art of Discovery . PDF", Page 51,52, by Jack E. Oliver introduce the 'Principal of Least Astonishment', or 'intiuation' as a tool to be used to discover the nature and its laws. [Other links].
Philosophy
Another field where the principle apply is phylosiphy, where it is used to distinguish between several phylosiphical enterpretation to the same contraversly. While in philosophy it is more refered as 'Occam's razor' or 'Parsimony', which is not identical to the current principle. 'Occam's razor' assumes that the most simple explanation, imply fewer assumption, is propably the most valid solution. Anyway, simple deisgn is propably the least surprising one.
- "What is Life?" a book by physicist Erwin Schrödinger providing one of the first usage of this principal in philosophy to provide an explanation for 'free will', and 'human consciousness'. It is worth to say that the DNA concept is first introduced through this book, while it hadn't been discovered yet. [Other links].
Religion
'The Principal of Least Astonishment' and 'Occam's razor' are surprisingly used in religion. Theisms use 'The Principal of Least Astonishment' to prove the Existence of God, and the Intelligent design of Universe. In the other hand, Atheisms use 'Occam's razor' to argue Existence of God, and as an Argument from miracles.
- "Larry Wall On Perl, Religion, and..." found to be the most related here. Larry Wall, the founder of Perl, uses the 'The Principal of Least Astonishment', which he introduced in Perl, to provide an explanation of faith. [Other links].
Quraan
Quraan is considered by Muslims and some non-Muslims to strongly obey both 'Least Astonishment' and 'Occam's razor' principles as nature do, which suggests that it was created by the same designer. This would prove several controversies as creation/evolution controversy, existence of god, miracles ...etc, as it supports other profits stories and their miracles.
- "Search the Truth" provides a search tool in different interpretations of Quraan in different languages.
Conclusion
This wiki is intended to be a Guide for Principle of Least Astonishment. It provides many links to online sources that explains the topic simply with easy-to-understand examples, and/or gives an idea where this principle can be used in real-life. These links should be helpful for the ones who want to learn more on this topic or understand the topic in more detail.
This principle can be used in many different disciplines for a universal useful solution for good designs. But it should be taken in consideration that although the principle goes parallel with common sense it may not necessarily go with the convention.
External Links by Field
User Interface
- "Applying the Rule of Least Surprise" from The Art of Unix Programming by E.S. Raymond
- "Wikipedia"
- "Confessions of a Coder"
Internet
Programming and Coding
- "Principle of Least Astonishment at Portland Pattern Repository"
- "Andy Wibbel"
- "On Interfaces and APIs"
- "Steve’s Tech Talk"
- "Thread safety"
Programming Language
Engineering and Design
- "International Ergonomics Association"
- "Book: Activity-Centered Design"
- Ergonomics
- 'User Centered Design'
- 'Contextual Design'
- Human computer interaction
- "Wikipedia List of human-computer interaction topics"
- "contextual inquiry"
Science and Nature
- "The Incomplete Guide to the Art of Discovery", *.PDF by Jack E. Oliver
- "When Principle of Least Astonishment go wrong"
- "Einstein's Philosophy of Science"
- "The laws of Nature"
Philosophy
Religion
- "Larry Wall On Perl, Religion, and..."
- Existence of God
- Intelligent design of Universe.
- Existence of God
- Argument from miracles
- "Occam’s Razor and creation/evolution"
Others
External Links by Term
Principle of Least Astonishment
Ergonomics
User Centered Design
Contextual Design
- 'Contextual Design'
- "Book: Activity-Centered Design"
- http://www.usabilitynet.org/tools/contextualinquiry.htm "contextual inquiry"]