Debugging (Introduction to Statistical Computing)
Three-Toed Sloth 2013-09-25
Summary:
Lecture 8, Debugging: Debugging as differential diagnosis: characterize the bug, localize it in the code, try corrections. Tactics for characterizing the bug. Tactics for localizing the bug: traceback, print, warning, stopifnot. Test cases and dummy input generators. Interactive debuggers. Programming with an eye to debugging: writing code with comments and meaningful names; designing the code in a top-down, modular, functional manner; writing and using tests. A hint at the exception-handling system.