Producing Robust Programs Flashcards
what is the purpose of defensive design
to ensure that a program runs correctly and continues to run no matter what
what three areas does defensive design encompass
- protection against unexplained user inputs
- maintainability
- minimising/removing bugs
List 5 ways in which defensive design is done
Sanitisation Validation authentication testing maintainance
Explain 3 examples of validation that can be built into a program
Range Check-the item entered must be in the range given
Length Check- the item must not be too long or too short
Format Check-the data must be in the correct format
What does validation not do
ensure that the data is correct-it only checks that it is valid and sensible
What is the purpose of data sanitisation
to hide or protect data so it cannot be seen or disclosed
What is masking and what does it do?
masking hides data by replacing it with something else. an example of this is passwords
What is input sanitisation
checks data that is entered and removes anything that could be potentially dangerous
What is authentication, list 3 factors of it
a user confirming that they are who they say they are on a computer system The 3 factors of this are: something you are (eg username) something you know (eg password) something you have (eg biometrics)
What is the purpose of maintainability?
to ensure that over time a product can be easily maintained