One of Dr. Welborn's best pieces of advice to novice programmers. :) It takes real skill, no matter what testing method you use, to test (and by extension, debug) effectively!
Many of you have the wrong idea of what testing is. Many of you mistakenly believe testing is the process of proving your code is correct. If you approach testing with the mindset that you're going to prove your code is correct, you most likely will. No matter how many bugs you have. Testing is based on the Scientific Method. Forgotten the Scientific Method, here is a recap:
- Observe a System
- Build a theory or model that explains the System
- Use the theory/model to make predictions about the System
- Verify the theory/model is correct by comparing predicted results with actual results