Debugging Windows Applications

Windows applications are the easiest to debug. You are working in the integrated environment, and Windows debugging tools are well developed. If you combine Debug , Trace , and Assert without breakpoints, you will find debugging Windows applications an almost enjoyable process.

Many of you have spent hundreds of hours debugging applications. Perhaps you have picked up books by Daniel Freedman and Gerald Weinberg [1990] or Dave Thielen [1992] for some advanced tips on debugging in general or worked as a tester when you were getting started. Thus I won't spend a lot of time talking to you about theory. (Besides, this isn't the best forum for that; a book on debugging would be better.)

I will tell you two secrets that work remarkably well for me, though, and you can make of them what you will. The first secret to minimizing bugs is to use objects. Even mediocre objects are better than structured code and global variables . The second secret, as I mentioned at the beginning of this chapter, is to keep your methods singular in nature and very short. A singular method is a method that does the one thing its name conveys, and a short method is short enough to comprehend at a glance. It is very hard to introduce bugs in short methods.



Visual Basic. NET Power Coding
Visual Basic(R) .NET Power Coding
ISBN: 0672324075
EAN: 2147483647
Year: 2005
Pages: 215
Authors: Paul Kimmel

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net