1.4 Identifying and Correcting Errors
My notes from the college board videos.
Video 1
- a logic error is a mistake in the algortithm or program that causes it to behave incorrectly or unexpectedly
- syntax error: mistake in the program where rules of language aren’t followed
- run-time error: mistake in the program that occurs during execution,
- workflow error: occurs when a computer attempts to handle number outside of defined values
Video 2
- effective ways to test errors:
- test cases
- hand tracing
- visualizations
- debuggers
- adding extra output statements
- syntax error: this information is stated, the particular line is given
- logic errors: the program runs, but is behaving unexpectedly, not immediately noticed, use test cases to find logic errors.
- hand tracing: writing out the values of the variables within the loop as it iterates to determine if the output is correct
- use visualizations and debuggers if other stratagies don’t work
Video 3
- testing uses defined inputs to ensure that program is producing expected outcomes
- results can be used for testing
- defined inputs used to test a program should demonstrate expected outcomes
- program requirments are needed to identify defined inputs for testing
- think about program specifications (list events, behaviors, respondings)