2.3 - Producing Robust Programs Flashcards
What is considered when creating a secure and robust program?
- Anticipating misuse
- Input sanitisation
- Validation
- Verification
- Authentication
- Maintainable code
What is anticipating misuse?
Planning ahead to take steps against potential misuse
What is input sanitisation?
Cleaning up data that has been input by removing non-standard characters
What is validation?
Checking whether input data follows specific criteria to be accepted
What is verification?
Checking whether data that has been entered is correct
What is authentication?
Ensuring only authorised users can gain access to a system
What is maintainable code?
Code that is readable for other programmers
What should be considered when creating maintainable code?
- Using comments so others can understand the purpose of each line of code
- Indentation to improve readability
- Appropriate variable names
- Using subprograms to reuse code and make them easier to test
What is the purpose of testing?
To check that:
- Program works correctly no matter what input has been entered
- Errors fixed
- User requirements met
- Acceptable performance and usability
- Unauthorised access prevented
What is iterative testing?
The testing of modules repetitively throughout development
What is terminal/final testing?
Testing that all modules work together (integration testing) at the end of development
What is a syntax error?
A grammatical mistake or a mistake in the rules of the programming language that means a program can’t run
What is a logic error?
A mistake by the programmer where the program runs but will display an incorrect or unexpected output
What are the four types of test data?
- Normal data
- Boundary data
- Invalid data
- Erroneous
What is normal data?
Sensible data that the program should accept and be able to process