2.3 Robust Programs Flashcards
What is Validation ?
Ensuring that any data input is possible and sensible.
What is a range check ?
the input must fall within a specified range.
What is a length check ?
the input must not be too long or too short.
What is a presence check ?
a data value must be entered
What is a format check ?
the data must be in the correct format
What is a type check ?
the data must be of a specified data type
What is a verification check ?
they repeat the entered data to the user and ask them to confirm if this data is correct.`
What is authentication ?
the process of a user confirming that they are who they say they are on a computer system
What are the 3 factors of authentication?
- something you are - username
- something you know - password
- something you have - swipe card, biometrics
What is the purpose of defensive design ?
that a program runs correctly and continues to run no matter what actions a user takes.
What are the 3 areas of defensive design?
- protection against unexpected user inputs
- maintainability
- minimising/removing bugs
How are anticipation and protection applied ?
- validation
- sanitisation
-authentication
-maintenance
- testing
What is the purpose of maintainability ?
to ensure that, over time, a program can be easily maintained.
How to increase maintainability ?
- Using comments
- Using naming conventions
- Using indentation
What are comments ?
Lines in programs that provide information about what the different parts of the program do.