Defensive design

Last updated
BS 1363 plug and socket, an example of defensive design: the plug can only be inserted in the correct orientation G type plug and socket.png
BS 1363 plug and socket, an example of defensive design: the plug can only be inserted in the correct orientation

Defensive design is the practice of planning for contingencies in the design 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. [1] 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.

Contents

Defensive design in software engineering is called defensive programming. Murphy's law 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 approaches can make software safer and catch user errors. Code that implements this is termed a sanity check.

Electronics

Many electrical connectors 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.[ citation needed ]

See also

References

  1. Groeger, Lena V. (8 June 2016). "Too Human (Not) to Fail". ProPublica .