Defensive Design
Computer Science: OCR GCSE, topic 2.3.1
Defensive Design
Defensive design is an approach to software development that aims to produce robust and reliable programs.

Defensive design
- Defensive design considerations include:
- Anticipating misuse of the program.
- Writing maintainable code.
- Testing the program.

Robust and reliable
- Robust programs can handle unexpected inputs and data without crashing and without being tricked into malicious action.
- Thus, preventing an unauthorised user from performing a certain action when they do not have the correct access rights.
- Reliable programs will work as intended under many different conditions or situations.
- The way a program has been created and is intended to work is often very different to how users will actually use it.

Anticipating misuse
- There are a number of ways that a system could be misused:
- Malicious inputs.
- Attempts to remotely connect.
- Attempts to alter access rights.
- Brute force attacks.
Test yourself on Defensive Design
How might a system be misused?
What does it mean for a program to be robust?