CSC/ECE 517 Fall 2007/wiki2 9 NT: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
 
(65 intermediate revisions by 2 users not shown)
Line 1: Line 1:
''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?'' <BR>
''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'?==


__TOC__
'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 computer science, 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 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==


== What is 'Principle of Least Astonishment'? ==
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.
Principle of Least Astonishment, as its name suggests, states 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 other words, principle of least astonishment asserts that the system will not cause any astonishment, or cause the least astonishment for the users by making the system as consistent and predictable -therefore usable- as possible. In computer science, this principle has a wide range of usage in topics such as human-computer interaction, user-interface design, programming language design, and programming. This principle is used in various disciples as well as computer science such as ... which are mentioned 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.  


=== Examples ===
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. This section is divided into two subtopics where we list the links with the easy-to-understand examples and links that give a feel where this principle should be used, even though they are divided into these subtopics as the assignment question states, there is no strict boundaries between them. So, a topic that gives a feel where this principle is used may also give easy-to-understand examples to explain it.
:''Hi.''


==Guide to Web pages on Principle of Least Astonishment==
===Where should the reader look for easy-to-understand examples?===
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 by itself to explain the topic thoroughly.


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.  
[http://c2.com/cgi/wiki?PrincipleOfLeastAstonishment "Principle of Least Astonishment at Portland Pattern Repository"] provides 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.


===Which should the reader look at for easy-to-understand examples?===
[http://andywibbels.com/post/1263 "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.
[http://en.wikipedia.org/wiki/Principle_of_least_astonishment "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 usage in great detail at all.


[http://jooto.com/blog/index.php/2006/06/06/principle-of-least-astonishment/ "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 principle and it demonstrates it with the Ruby on Rails code which is very related and similar to what we have been doing in our class.
[http://en.wikipedia.org/wiki/Principle_of_least_astonishment "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.


[http://andywibbels.com/post/1263 "Andy Wibbel"] gives the easy-to-understand definition of the principle that he 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.
[http://jooto.com/blog/index.php/2006/06/06/principle-of-least-astonishment/ "Ethical Software"] is a blog of an instructor, Alex Bunardzic, 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.


[http://c2.com/cgi/wiki?PrincipleOfLeastAstonishment "Principle of Least Astonishment at Portland Pattern Repository"] explains the topic and gives a couple of easy-to-understand examples on the topic; this is one of the best sites that one should start to learn more on this topic.
====Examples of Violation of the Principle====
[http://news.bbc.co.uk/2/hi/technology/3129184.stm "Site finding system"] is a topic appeared in BBC News on September, 2003 which gives an real-life example of violation of this principle, and explains what it had caused.


===Which give a feel for where the principle should be used?===
[http://www.cs.arizona.edu/projects/sumatra/hallofshame/ "Java Hall of Shame"] presents some of the points where programming language Java does not obey the Principle of Least Astonishment.
 
[http://maba.wordpress.com/2006/09/10/thunderbird-just-stole-me-30-minutes/ "Thunderbird just stole me 30 minutes"] is a blog written by Martin Backschat, where he mentions how he was astonished by the user-interface of Mozilla Thunderbird while trying to change his password.
 
===Where should the reader look for to get a feel where the principle should be used?===
 
====Web Page Design====
[http://www.ibm.com/developerworks/web/library/us-cranky10.html "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.
[http://www.ibm.com/developerworks/web/library/us-cranky10.html "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.


====API Design and Programming====
[http://www.atalasoft.com/cs/blogs/stevehawley/archive/2006/02/27/9590.aspx "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.
[http://www.atalasoft.com/cs/blogs/stevehawley/archive/2006/02/27/9590.aspx "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.


[http://benpryor.com/blog/index.php?/archives/19-API-Design-The-Principle-of-Least-Surprise.html, "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 Interface Design====
[http://www.faqs.org/docs/artu/ch11s01.html "The Art of Unix Programming"] explains what the principle is and how it can be used when designing user-interfaces.
[http://www.faqs.org/docs/artu/ch11s01.html "The Art of Unix Programming"] explains what the principle is and how it can be used when designing user-interfaces.


[http://www.cs.arizona.edu/projects/sumatra/hallofshame/ "Java Hall of Shame"] presents some of the points where Java does not obey the Principle of Least Astonishment.
[http://ergo.human.cornell.edu/ahtutorials/interface.html, "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.
 
[http://www.ibm.com/developerworks/web/library/wa-cranky75/index.html, "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.


== Least Astonishment in Other Disciplines==
== Least Astonishment in Other Disciplines==
The 'Principle of Least Astonishment' can be considered as a cross disciplinary 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/field 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 and useful examples to define a good design using the current principle is [http://en.wikipedia.org/wiki/Physical_law 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 surprisingly, or in our case least surprisingly, the 'Principle of Least Astonishment' prove itself by being consistent through different disciplines, and by being true, universal, simple, absolute, stable, omnipotent, conservative, symmetry and reversible. Following is general outline where the principle is applied.


The 'Principle of Least Astonishment' can be considered as a basic principle in our modern life, from software to design to religion this principle will be found. The concept is introduced with different names as what will be shown next.
===Engineering and Design===
Design of equipment/product/system/laws/environment for human interaction is a whole science which is called [http://en.wikipedia.org/wiki/Ergonomics 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 [http://en.wikipedia.org/wiki/User-centered_design 'User Centered Design'] or [http://en.wikipedia.org/wiki/Contextual_design 'Contextual Design']. 'Contextual Design' not only supports 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.
 
* [http://en.wikipedia.org/wiki/List_of_human-computer_interaction_topics "Wikipedia List of human-computer interaction topics"] provides a comprehensive list of topics related to the application of the human-computer interaction. [Other links].


===Engineering and Design===
===Science and Nature===
The same principle is extended to science as well, where [http://en.wikipedia.org/wiki/Physical_law Law of Nature] is believed to carry the least surprise. As Einstein states, ''"To me, the most incomprehensible thing about the universe is that it is comprehensible" [http://www.csicop.org/si/2000-09/laws.html 2].'' A prove would be that many of the laws of natural and major discoveries, as relativity, were found before it was directly observed, analytically or experimentally observed. Which illustrate that the Natural and the universe is a good design as well.


* [http://ecommons.library.cornell.edu/retrieve/300/Art_of_Discovery_Oliver2.pdf "The Incomplete Guide to the Art of Discovery . PDF"], Page ''51,52'', '' by [http://www.mssu.edu/seg-vm/bio_jack_e__oliver.html Jack E. Oliver] introduce the 'Principal of Least Astonishment', or 'intuition' as a tool to be used to discover the nature and its laws.


Design of equibment/systems/laws/environment for human interaction would be a whole science which is called [http://en.wikipedia.org/wiki/Ergonomics Ergonomics]. Although this science expand to contain other aspects such as physical, Cognitive, and organizational ergonomics. More specific relation to our will be [http://en.wikipedia.org/wiki/User-centered_design 'User Centered Design'] or [http://en.wikipedia.org/wiki/Contextual_design 'Contextual Design']. 'Contextual Design' support not only research and development but also investigations into the context and motivation of user behavior, which insure the principle.[http://mitpress.mit.edu/catalog/item/default.asp?tid=10141&ttype=2 1]. Certain enough this principle is applied to every aspect cars, buildings, traffic, instituations, ...etc.
===Philosophy===
Another field where the principle apply is philosophy, where it is used to distinguish between several philosophical interpretation to the same controversy. While in philosophy it is more referred as [http://en.wikipedia.org/wiki/Occam%27s_razor#Philosophy_of_mind 'Occam's razor'] or [http://en.wikipedia.org/wiki/Parsimony 'Parsimony'], which is not identical to the current principle. 'Occam's razor' assumes that the most simple explanation, imply fewer assumptions, is probably the most valid solution. Anyway, simple design is probably the least surprising one.


* [http://en.wikipedia.org/wiki/List_of_human-computer_interaction_topics "Wikipedia List of human-computer interaction topics"] provide a comprehensive list of topics related of the application of the human-computer interaction. see also [other links].
* [http://home.att.net/~p.caimi/schrodinger.html "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. [http://en.wikipedia.org/wiki/Theism Theisms] use 'The Principal of Least Astonishment' to prove the [http://en.wikipedia.org/wiki/Existence_of_God Existence of God], and the [http://en.wikipedia.org/wiki/Intelligent_design Intelligent design of Universe]. In the other hand, [http://en.wikipedia.org/wiki/Atheism Atheisms] use 'Occam's razor' to argue [http://en.wikipedia.org/wiki/Existence_of_God Existence of God], and as an [http://en.wikipedia.org/wiki/Argument_from_miracles Argument against miracles].


* [http://interviews.slashdot.org/article.pl?sid=02/09/06/1343222 "Larry Wall On Perl, Religion, and..."] Larry Wall, the founder of Perl, uses the 'The Principal of Least Astonishment', which he introduced in Perl, to provide an explanation of faith.


===Science and Nature===
* [http://www.searchtruth.com/list.php "Quran"] Quran provides many arguments based upon 'Least Astonishment' and 'Occam's razor' principles for several controversies as [http://en.wikipedia.org/wiki/Creation-evolution_controversy creation/evolution controversy], [http://en.wikipedia.org/wiki/Existence_of_God existence of god], [http://en.wikipedia.org/wiki/Miracle miracles]. From the author point of view, Quran also obey the same rules of nature, which suggest it is from the same creator.


==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.


The principle is extended to science as well, as [http://en.wikipedia.org/wiki/Physical_law Physical law] is believed to be less surprising. Einstein said, ''"To me, the most incomprehensible thing about the universe is that it is comprehensible" [http://www.csicop.org/si/2000-09/laws.html 2].'' A prove for this that many of the law of natural were found before it was directly observed or analytically or expermintaly proved. Actually this show Natural as a good design.
This principle can be used in many different disciplines for a universal useful solution for good designs. But it should be taken into consideration that the principle goes parallel with common sense, although it may not go with the convention.


* [http://ecommons.library.cornell.edu/retrieve/300/Art_of_Discovery_Oliver2.pdf "The Incomplete Guide to the Art of Discovery . PDF"], Page ''51,52'', '' by [http://www.mssu.edu/seg-vm/bio_jack_e__oliver.html Jack E. Oliver] Introduce the 'Principal of Least Astonishment', or intiuation' as a tool to be used to discover the nature and its laws. see also [other links].
[[Image:LA_Science.gif]] <br>
From  [http://ecommons.library.cornell.edu/retrieve/300/Art_of_Discovery_Oliver2.pdf "The Incomplete Guide to the Art of Discovery"], *.PDF ''  


==External Links by Field==


===User Interface===
* [http://www.faqs.org/docs/artu/ch11s01.html "Applying the Rule of Least Surprise"] from ''[[The Art of Unix Programming]]'' by [[Eric S. Raymond|E.S. Raymond]]
* [http://en.wikipedia.org/wiki/Principle_of_least_astonishment "Wikipedia"]
* [http://www.geocities.com/krishna_kunchith/misc/bscs.html "Confessions of a Coder"]


===Philosophy===
===Internet===
* [http://news.bbc.co.uk/2/hi/technology/3129184.stm "Site finding system faces suspension"]
* [http://www.ibm.com/developerworks/web/library/us-cranky10.html "Applying the Rule of Least Surprise in webpages"]


===Programming and Coding===
* [http://c2.com/cgi/wiki?PrincipleOfLeastAstonishment "Principle of Least Astonishment at Portland Pattern Repository"]
* [http://andywibbels.com/post/1263 "Andy Wibbel"]
* [http://www.perlmonks.org/?node_id=553487 "On Interfaces and APIs"]
* [http://www.atalasoft.com/cs/blogs/stevehawley/archive/2006/02/27/9590.aspx "Steve’s Tech Talk"]
* [http://en.wikipedia.org/wiki/Thread_safety "Thread safety"]


Another field where the principle apply is phylosiphy, where it is used to distinguish between several phylosiphical enterpretation to the same observation. It is more refered to as [http://en.wikipedia.org/wiki/Occam%27s_razor#Philosophy_of_mind Occam's razor] or [http://en.wikipedia.org/wiki/Parsimony Parsimony], which is not the same as above principle as it assume that more simple explanation that imply fewer assumption is propaly the more valid theory, anyway simple deisgn is propaly the least surprise.
===Programming Language===
* [http://www.cs.arizona.edu/projects/sumatra/hallofshame/  "Java Violate the Principle of Least Astonishment"]
* [http://jooto.com/blog/index.php/2006/06/06/principle-of-least-astonishment/ "Example from Ruby in Rails"]


* [http://home.att.net/~p.caimi/schrodinger.html What is Life] A wiki description for physicist Erwin Schrödinger providing one of the first use of this principal in philosophy to provide an explanation for 'free will', and 'human consciousness'. It is worth to say that in the same book he introduced the DNA concept before it is even discovered.
===Engineering and Design===
* [http://www.iea.cc/browse.php?contID=what_is_ergonomics "International Ergonomics Association"]
* [http://mitpress.mit.edu/catalog/item/default.asp?tid=10141&ttype=2 "Book: Activity-Centered Design"]
* [http://en.wikipedia.org/wiki/Ergonomics "Ergonomics"]
* [http://en.wikipedia.org/wiki/User-centered_design "User Centered Design"]
* [http://en.wikipedia.org/wiki/Contextual_design "Contextual Design"]
* [http://en.wikipedia.org/wiki/Human-computer_interaction "Human computer interaction"]
* [http://en.wikipedia.org/wiki/List_of_human-computer_interaction_topics "Wikipedia List of human-computer interaction topics"]
* [http://www.usabilitynet.org/tools/contextualinquiry.htm "contextual inquiry"]


===Science and Nature===
* [http://ecommons.library.cornell.edu/retrieve/300/Art_of_Discovery_Oliver2.pdf "The Incomplete Guide to the Art of Discovery"], *.PDF '' by [http://www.mssu.edu/seg-vm/bio_jack_e__oliver.html Jack E. Oliver]
* [http://www.answersingenesis.org/tj/v9/i2/astonishment.asp "When Principle of Least Astonishment go wrong"]
* [http://plato.stanford.edu/entries/einstein-philscience/#5 "Einstein's Philosophy of Science"]
* [http://www.csicop.org/si/2000-09/laws.html "The laws of Nature"]


===Philosophy===
* [http://home.att.net/~p.caimi/schrodinger.html "What is Life?"]


===Religion===
===Religion===
* [http://interviews.slashdot.org/article.pl?sid=02/09/06/1343222 "Larry Wall On Perl, Religion, and..."]
* [http://en.wikipedia.org/wiki/Existence_of_God "Existence of God"]
* [http://en.wikipedia.org/wiki/Intelligent_design "Intelligent design of Universe"].
* [http://en.wikipedia.org/wiki/Existence_of_God "Existence of God"]
* [http://en.wikipedia.org/wiki/Argument_from_miracles "Argument from miracles"]
* [http://www.creationontheweb.com/content/view/5096/ "Occam’s Razor and creation/evolution"]
==External Links by Term==


===Principle of Least Astonishment===
* [http://www.ibm.com/developerworks/web/library/us-cranky10.html "Applying the Rule of Least Surprise in webpages"]


'Least
===Ergonomics===
A lighter side to the application of intuition is the so-called Principle of Minimum Astonishment, which is often mentioned
* [http://en.wikipedia.org/wiki/Ergonomics "Ergonomics"]
in fun by scientists. It means that when controversy arises in science, the view that agrees best with one's intuitive evaluation of the situation is probably correct. The "principle" is really an admonition to rely on one's intuition. At first this principle seems contrary to the quest for surprising discovery that is the focus of this book, but it is not. The trick is to break with convention, not necessarily with intuition. Most new discoveries are not so much counter to good intuition as they are counter to "conventional wisdom" of the science at the time. Plate tectonics, for example, did not counter intuition so much as it did conventional belief. <BR>


So in steering a course through the world of science and making the subjective decisions and judgments that affect that
===User Centered Design===
course, use some intuition. Intuition has led to many discoveries in the past and will surely lead to many in the future. How do I know? It's easy. I can feel it in my bones! <BR>
* [http://en.wikipedia.org/wiki/User-centered_design "User Centered Design"]


=== Examples ===
===Contextual Design===
:''Hi.''
* [http://en.wikipedia.org/wiki/Contextual_design "Contextual Design"]
* [http://mitpress.mit.edu/catalog/item/default.asp?tid=10141&ttype=2 "Book: Activity-Centered Design"]
* [http://www.usabilitynet.org/tools/contextualinquiry.htm "contextual inquiry"]


==References==
===Law of Nature===
* [http://ecommons.library.cornell.edu/retrieve/300/Art_of_Discovery_Oliver2.pdf "The Incomplete Guide to the Art of Discovery"], *.PDF '' by [http://www.mssu.edu/seg-vm/bio_jack_e__oliver.html Jack E. Oliver]
* [http://en.wikipedia.org/wiki/Physical_law "Law of Nature"]
* [http://www.csicop.org/si/2000-09/laws.html "The laws of Nature"]


==External links==
===Occam's razor or Parsimony===
* [http://www.faqs.org/docs/artu/ch11s01.html "Applying the Rule of Least Surprise"] from ''[[The Art of Unix Programming]]'' by [[Eric S. Raymond|E.S. Raymond]]
* [http://en.wikipedia.org/wiki/Occam%27s_razor#Philosophy_of_mind "Occam's razor"]   
* [http://www.ibm.com/developerworks/web/library/us-cranky10.html "Applying the Rule of Least Surprise in webpages"]
* [http://en.wikipedia.org/wiki/Parsimony "Parsimony"],
* [http://news.bbc.co.uk/2/hi/technology/3129184.stm "Site finding system faces suspension"]
* [http://www.cs.arizona.edu/projects/sumatra/hallofshame/ "Java Violate the Principle of Least Astonishment"]
* [http://www.answersingenesis.org/tj/v9/i2/astonishment.asp "When Principle of Least Astonishment go wrong"]
* [http://plato.stanford.edu/entries/einstein-philscience/#5 "Einstein's Philosophy of Science"]
* [http://interviews.slashdot.org/article.pl?sid=02/09/06/1343222 "Larry Wall On Perl, Religion, and..."]

Latest revision as of 03:12, 29 October 2007

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 computer science, 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 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. This section is divided into two subtopics where we list the links with the easy-to-understand examples and links that give a feel where this principle should be used, even though they are divided into these subtopics as the assignment question states, there is no strict boundaries between them. So, a topic that gives a feel where this principle is used may also give easy-to-understand examples to explain it.

Where should the reader look for easy-to-understand examples?

"Principle of Least Astonishment at Portland Pattern Repository" provides 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.

"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.

"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, Alex Bunardzic, 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.

Examples of Violation of the Principle

"Site finding system" is a topic appeared in BBC News on September, 2003 which gives an real-life example of violation of this principle, and explains what it had caused.

"Java Hall of Shame" presents some of the points where programming language Java does not obey the Principle of Least Astonishment.

"Thunderbird just stole me 30 minutes" is a blog written by Martin Backschat, where he mentions how he was astonished by the user-interface of Mozilla Thunderbird while trying to change his password.

Where should the reader look for to get a feel where the principle should be used?

Web Page Design

"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.

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 Interface Design

"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.

Least Astonishment in Other Disciplines

The 'Principle of Least Astonishment' can be considered as a cross disciplinary 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/field 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 and useful 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 surprisingly, or in our case least surprisingly, the 'Principle of Least Astonishment' prove itself by being consistent through different disciplines, and by being true, universal, simple, absolute, stable, omnipotent, conservative, symmetry and reversible. Following is general outline where the principle is applied.

Engineering and Design

Design of equipment/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' not only supports 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.

Science and Nature

The same principle is extended to science as well, where Law of Nature is believed to carry the least surprise. As Einstein states, "To me, the most incomprehensible thing about the universe is that it is comprehensible" 2. A prove would be that many of the laws of natural and major discoveries, as relativity, were found before it was directly observed, analytically or experimentally observed. Which illustrate that the Natural and the universe is a good design as well.

Philosophy

Another field where the principle apply is philosophy, where it is used to distinguish between several philosophical interpretation to the same controversy. While in philosophy it is more referred 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 assumptions, is probably the most valid solution. Anyway, simple design is probably 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 against miracles.

  • "Quran" Quran provides many arguments based upon 'Least Astonishment' and 'Occam's razor' principles for several controversies as creation/evolution controversy, existence of god, miracles. From the author point of view, Quran also obey the same rules of nature, which suggest it is from the same creator.

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 into consideration that the principle goes parallel with common sense, although it may not go with the convention.


From "The Incomplete Guide to the Art of Discovery", *.PDF

External Links by Field

User Interface

Internet

Programming and Coding

Programming Language

Engineering and Design

Science and Nature

Philosophy

Religion


External Links by Term

Principle of Least Astonishment

Ergonomics

User Centered Design

Contextual Design

Law of Nature

Occam's razor or Parsimony