2.3 Robust Programs Flashcards
What are the 2 main types of error
- syntax error
- logic error
What is a syntax error
An error where there is a problem with the code (such a spelling mistake) so the program does not run
What is a logic error
The program works, but not as intended
What is a runtime error
When the program crashes despite there appears to be nothing wrong with the code
What are the 4 types of test data
- Normal
- Boundary
- invalid
- erroneous
What is normal data
Data that is correct
What is boundary data
The min/max value that could be entered
What is invalid data
Values higher than the expected range
What is erroneous data
Incorrect values that the program should not accept (e.g. “Dave” in an age field)
What are the 2 types of testing
- iterative testing
- final testing
What is iterative testing
Testing the code as you create it
What is final/terminal testing
Testing carried out at the end of the program when it is complete
What is refining an algorithm
Making it more robust
What is the job of a comment in a program
- inform the reader of bugs or issues
- explain the code and it’s function
- to stop a line of section of code to stop running
What 2 factors help a program be more maintainable
Comments
Naming conventions
What is input validation
A check made by a computer to ensure data is reasonable
What is authentication
Checking that a user is who they say they are and that they are allowed to access the program