CISC 121 Lecture 12: lecture 12
wunch and 39345 others unlocked
35
CISC 121 Full Course Notes
Verified Note
35 documents
Document Summary
Software bugs: an error flaw, failure, or fail in a computer program or system that causes it to produce an incorrect or unexpected result or for it to behave in unexpected ways. Code modularly: break tasks down (step, wise, decomposition refinement, work on one task at a time, test frequently, every small addition, slowly build up a function, testing as you go. Don"t care the entire program at once: creates more bugs and they are harder to trace and locate. Proper testing will help to avoid bugs, think carefully about test cases. Things to think about: for loops (not running at all, only running once, runs several times, while loops (exit the loop, doesn"t run at all, branching (if, elif) (test for each branch) Unit testing: thoroughly test each function as has been shown in class. Regression testing: re-running tests to ensure that bug fixes don"t create new bugs. Integration testing: test that the functions work together.