Defensive Design Flashcards
What is data validation?
Ensuring that data is of the right type and is reasonable.
What is a range check?
That the data is between an allowed range.
What is a type check?
Ensuring data is of the right type. String, Integer etc
What is a length check?
Making sure that entered data is of the allowed/sensible length
What is a presence check?
Checking that a field has not been left blank.
What is a format check?
Making sure that data is in the correct format, e.g. for a postcode or address.
What is the difference between 1. Validation and 2. Verification?
- Validation is checking that data is resonable.
- Verification is confirming that data is correct, making sure the user has entered the right information.
What is a subroutine?
1. Function
2. Procedure
A subrotuine is a resuable executable such as a function.
1. A function will always return a value
2. A procedure will not return anything but always does something.