ENGIN 7 Chapter 9: Errors, Good Programming Practices, and Debugging
Document Summary
3 basic types of errors: syntax errors when programmer writes an instruction using incorrect syntax usually easily detectable, found, and fixed runtime errors only detectable when a program is run usually easy to find b/c matlab will stop and tell you where the problem is logic error one of most difficult runtime error to find when output you get is not what you expect easy to generate and notoriously difficult to find. 9. 2. 2 test everything often test each module for test cases for which you know the answer and enough cases that you"re confident the function is working properly (including corner cases) test often, even within a single module or function doing intermediate tests to make sure it is correct to the point you have completed will help you find errors that will probably be in the part of your code written since the last time you did test it.