2.3 - Producing Robust Programs Flashcards
What is the purpose of data validation?
To check if data entered is reasonable.
What are the types of data validation?
Range check; format check; type check; presence check; length check
What is data verification?
Double-checking if data has been entered correctly.
What is the purpose of authentication routines?
Routines to make sure a person is who they claim to be.
Why do programs have it so that you are locked out of an account after three incorrect password attempts?
Anticipating misuse: three tries is enough for the average user. But, hackers may be trying out dozens of passwords.
Why do programs need to be maintained?
So it’s easier to improve code, fix bugs or add new features. Also makes it easier for other coders to follow the program.
How can we make programs more maintainable?
Sub-programs; appropriate naming conventions (identifiers); indentation; commenting
What is a syntax error?
An error that breaks the grammatical rules of the programming language and therefore stops the program from being run.
What is a logic error?
An error that does not prevent the compiler/interpreter from running the program, but the error causes the program to not function as intended.
What is normal test data?
Data that should be accepted by a program without causing errors.
What is boundary test data?
Data of the correct type which is on the very edge of being valid.
What is invalid test data?
Data of the correct data type which should be rejected by a computer system.
What is erroneous test data?
Data of the incorrect data type which should be rejected by a computer system.
What is iterative testing?
Testing modules and parts of the program as the program is being developped.
What is final testing?
Testing the whole program at the end of the production.