Defensive design Flashcards
Why is defensive design important?
- the number of errors or bugs is minimized
- the program behaves as expected despite unexpected user actions (accidental or deliberate erroneous inputs or item selections)
- all possible errors that could occur are identified and allowed for
How is authentication used?
- the process of determining the identity of a user
- usually based on a username and an associated password
- authentication checks that the username and password exist
What is validation used for?
validation process checks that data that is input is sensible, reasonable and appropriate to be processed by the program
-should be used to ensure that the required data is input, is within a certain range or of a required length
presence check
ensures that data has been entered
length check
length checks ensure that a specified number of characters have been entered
range check
ensure that an input falls within the required range
program
sequence of instructions for a computer
What does planning for all contingencies mean?
planning for all possibilities
areas of defensive design (3)
- protection against unexpected user inputs or actions
- maintainability - code is readable and understandable
- minimizing/removing bugs
validation definition
checking data input is sensible and in the right format
data sanitization
the process of hiding or protecting data so it cannot be seen or disclosed
authentication
verifying the identity of a user
maintainability
the process of ensuring that a program is easy to understand, modify and update
testing
an important part of computer programming which involves checking a program for errors
defensive design definition
contingency planning using validation, sanitization, authentication, maintenance, and testing