軟件工程中嘅防禦式設計叫做防禦性編程。著名嘅梅菲定律表明咗點解要搞防禦式設計。防禦式設計係同契約式設計相反嘅一種設計方式。
Defensive design in software engineering is called defensive programming. The famous Murphy's Law shows why defensive design is necessary. Defensive design is the opposite of contract design.