Defensive Design + Errors and Testing Flashcards
What can Data Validation routines do?
Ensure that data entered is of the right type.
What can Validation not do?
Ensure that the user has not made a spelling error or entered the wrong value.
What can Validation ensure?
Validation can only check that the data entered is reasonable.
What does Data Verification do?
Verification is used to double check that the data has been typed in correctly.
What is double entry verification?
A good example of double entry verification is when two passwords don’t match their password will be needed to be rentered.
What is Authentication?
Confirm that the person is who they are.
What are some common examples of Authentication?
Commonly, you are asked to enter a username and password.
You may also be asked to confirm these details on a separate device (2FA).
Why do Programs need to be maintained?
This will be to improve the code, fix bugs or add new features.
What are some examples of things that appear in maintainable programs?
Use of subprograms (functions + procedures)
Using appropriate naming conventions
Indentation
Commenting
What do subprograms include?
Functions and Procedures.
Will Subprograms take inputs?
Yes, well written subroutines will take inputs through parameters and if necessary return a value.
What makes a well written subprogram?
They should be written so they can be reused multiple times in the program.
Can you have the same function and variable name?
NO, this is inappropriate naming conventions.
Can you have the same function and variable name?
NO, this is inappropriate naming conventions.
Why does indentation improve code?
Indentation makes it possible to easily see which lines of code are part of different structures.