principles:easy_to_use_and_hard_to_misuse
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
principles:easy_to_use_and_hard_to_misuse [2020-10-12 20:19] – old revision restored (2013-01-15 15:53) 159.69.186.191 | principles:easy_to_use_and_hard_to_misuse [2021-10-13 08:19] – old revision restored (2021-09-02 12:26) 194.209.25.108 | ||
---|---|---|---|
Line 11: | Line 11: | ||
===== Principle Statement ===== | ===== Principle Statement ===== | ||
+ | A module shall be easy to use and hard to misuse. | ||
===== Description ===== | ===== Description ===== | ||
Line 19: | Line 20: | ||
===== Strategies ===== | ===== Strategies ===== | ||
+ | |||
+ | This is a very general principle so there is a large variety of possible strategies to adhere more to this principle largely depending on the given design problem: | ||
+ | |||
+ | * Make use of static typing, so the compiler will report faults | ||
+ | * Make the interface simple, so there will be fewer usage defects (see [[Keep It Simple Stupid|KISS]]) | ||
+ | * Use the same mechanisms wherever reasonably possible (see [[Uniformity Principle|UP]]) | ||
+ | * Use consistent naming and models throughout the design (see [[Uniformity Principle|UP]] and [[Model Principle|MP]]) | ||
+ | * Avoid Preconditions (see [[Invariant Avoidance Principle]]) | ||
+ | * ... | ||
+ | |||
+ | |||
+ | ===== Caveats ===== | ||
+ | |||
+ | See section [[#contrary principles]]. | ||
Line 37: | Line 52: | ||
==== Generalizations ==== | ==== Generalizations ==== | ||
- | * [[principles:Murphy' | + | * [[Murphy' |
==== Specializations ==== | ==== Specializations ==== | ||
- | * [[principles:Principle of Least Surprise]] | + | * [[Principle of Least Surprise]] |
==== Contrary Principles ==== | ==== Contrary Principles ==== | ||
+ | |||
+ | * [[Keep It Simple Stupid]] (KISS): Both principles, KISS and EUHM, are about simplicity. But while EUHM is about the simplicity of an interface, KISS is rather concerned with simplicity of the implementation. KISS is contrary in those cases where the solution which is easier to implement is not so easy to use or imposes further possibilities for misuse. | ||
==== Complementary Principles ==== | ==== Complementary Principles ==== | ||
- | * [[principles:Model Principle]] | + | * [[Model Principle]] |
- | * [[principles: | + | * [[Invariant Avoidance |
- | * [[principles: | + | * [[Information Hiding/ |
==== Principle Collections ==== | ==== Principle Collections ==== | ||
Line 68: | Line 85: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ |
principles/easy_to_use_and_hard_to_misuse.txt · Last modified: 2021-10-18 21:29 by christian