Preview lessons, content and tests

Computer Science & Programming solved. All in one platform.

1. To trial the platform and take tests, please take a few seconds to SIGN UP and SET UP FREE.
2. Searching for something specific? See our text overview of all tests. Scroll right for levels, and lists.

Join 30000+ teachers and students using TTIO.

Defensive Design Techniques

The purpose of defensive design is make sure, as far as possible, that a program runs correctly and continues to run no matter what actions a user takes. Planning for all possibilities (contingencies) is important as well as thinking about what a user may do that the program does not expect.

Defensive design encompasses three areas:

  • protection against unexpected user inputs or actions, such as a user entering a letter where a number was expected
  • maintainability - ensuring code is readable and understandable
  • minimising/removing bugs

This anticipation and protection is done through:

  • validation
  • sanitisation
  • authentication
  • maintenance
  • testing

Suggested Video

Additional Reading