HOME

TheInfoList



OR:

Defensive design is the practice of planning for contingencies in the
design A design is the concept or proposal for an object, process, or system. The word ''design'' refers to something that is or has been intentionally created by a thinking agent, and is sometimes used to refer to the inherent nature of something ...
stage of a project or undertaking. Essentially, it is the practice of anticipating all possible ways that an end-user could misuse a device, and designing the device so as to make such misuse impossible, or to minimize the negative consequences. For example, if it is important that a plug is inserted into a socket in a particular orientation, the socket and plug should be designed so that it is physically impossible to insert the plug incorrectly. Power sockets are often keyed in such a manner, to prevent the transposition of live and neutral. They are also recessed in the wall in a way that makes it impossible to touch connectors once they become live. Defensive design in
software engineering Software engineering is a branch of both computer science and engineering focused on designing, developing, testing, and maintaining Application software, software applications. It involves applying engineering design process, engineering principl ...
is called
defensive programming Defensive programming is a form of defensive design intended to develop programs that are capable of detecting potential security abnormalities and make predetermined responses. It ensures the continuing function of a piece of software under un ...
.
Murphy's law Murphy's law is an adage or epigram that is typically stated as: "Anything that can go wrong will go wrong." Though similar statements and concepts have been made over the course of history, the law itself was coined by, and named after, Americ ...
is a well-known statement of the need for defensive design, and also of its ultimate limitations.


Applications


Computer software

Implementation decisions and
software design Software design is the process of conceptualizing how a software system will work before it is implemented or modified. Software design also refers to the direct result of the design process the concepts of how the software will work which co ...
approaches can make software safer and catch user errors.
Code In communications and information processing, code is a system of rules to convert information—such as a letter, word, sound, image, or gesture—into another form, sometimes shortened or secret, for communication through a communicati ...
that implements this is termed a
sanity check A sanity check or sanity test is a basic test to quickly evaluate whether a claim or the result of a calculation can possibly be true. It is a simple check to see if the produced material is rational (that the material's creator was thinking ration ...
. * Data entry screens can "sanitize" inputs, e.g. numeric fields contain only digits, and if acceptable, a single positive/negative sign and/or decimal point. * Inputs can be checked for legitimate values, e.g. for counts of workplace injuries (or number of people injured) the number can be 0 but can't be negative and must be a whole number; for number of hours worked in one week the amount for any specified employee can be 0, can be fractional, but can't be negative and can't be greater than 168, nor more than 24 times the number of days they were in attendance. * A word processor requested to load a saved document should scan it to ensure it is in good form and not corrupted. If it is corrupted, the program should say so, then either accept the partial document that was valid, or refuse the entire document. In either case it should remain running and not quit.


Electronics

Many
electrical connectors Components of an electrical circuit are electrically connected if an electric current can run between them through an electrical conductor. An electrical connector is an electromechanical device used to create an electrical connection between ...
apply this principle by being asymmetric. Alternatively, USB-C plugs are mechanically but not electrically symmetric, but achieve an illusion of symmetry resulting from how devices respond to the cable, and hence can be plugged in either of two ways. Accompanying circuitry makes the plugs and cables behave as though they are symmetric.


See also

* Defensible space theory *
Fail-safe In engineering, a fail-safe is a design feature or practice that, in the event of a failure causes, failure of the design feature, inherently responds in a way that will cause minimal or no harm to other equipment, to the environment or to people. ...
* Idiot-proof * Inherent safety *
Poka-yoke is any mechanism in a process that helps an equipment operator to avoid mistakes and defects by preventing, correcting, or drawing attention to human errors as they occur. It is a Japanese term that means "mistake-proofing" or "error prevention", ...
*
Usability testing Usability testing is a technique used in user-centered interaction design to evaluate a product by testing it on users. This can be seen as an irreplaceable usability practice, since it gives direct input on how real users use the system. It is mo ...


References

{{DEFAULTSORT:Defensive Design Design