Ensure code runs
Have a set of expected results
Unit testing
Regression testing
Integration testing
defis_bigger(x, y):
""" Assumes x and y are ints Returns True if y is less than x, else False ""
defsqrt(x, eps):
""" Assumes x, eps floats, x >= 0, eps > 0
Returns res such that x-eps <= res*res <= x+eps"""
what are some drawbacks of this type of testing?
guidelines
once you have discovered that your code does not run properly, you want to:
Overt vs. covert:
Persistent vs. intermittent:
Overt and persistent
Overt and intermittent
Covert
tools
when to print
use bisection method
explain the code to
study program code
scientific method
Treat as a search problem: looking for explanation for incorrect behavior
Reference