robust program Flashcards
1
Q
why are programs tested
A
- to check if they are robust
- to check if they work as expected
2
Q
what is iterative testing
A
testing a program line by line
3
Q
what is defensive programming
A
- performing validation/sanitising
- writing a roust code
- testing for all possibilities
3
Q
what is final/terminal testing
A
testing after the implentation
4
Q
what are run time errors
A
errors that occur during the program bc of a specific issue like no more memory left
5
Q
types of tests data
A
erroneous: testing what doesnt work
normal: testing a program working normally
boundary: testing parameter
6
Q
types of validation methods
A
- null check: make sure its not empty
- length check: make sure its got right amount of characters
- range check: make sure it manages a range
7
Q
what is sanitisation
A
fixes the errors found
8
Q
how to improve readability or maintainability
A
- using comments with # that explains what code will do
- using descriptive identifiers that make sense in the context
- indentation makes code neater and more readable and shows nesting very effectively