Subj : Re: Not debugging? To : comp.programming,comp.lang.java.programmer,comp.lang.lisp From : Peter Ammon Date : Thu Aug 25 2005 11:29 pm Phlip wrote: > Tim X wrote: > > >>I'm guessing he was referring to the irritating development of >>programmers who are not able to debug code without a high level IDE >>which includes a debugger which allows them to step/trace through the >>code one line at a time and watch what happens to variables in a watch >>window. > > > No. I'm talking about developers who don't write unit tests as they write > code. These provide the option of using Undo, instead of debugging, when the > tests fail unexpectedly. > > This leads to a development cycle with highly bug-resistant code, and > without proactive debugging to implement new functions. > > Yes, you still need the debugger - typically for legacy situations - and you > still need elaborate debugging skills. New code stays ahead of them. > > The idea that we can implement without debugging is incomprehensible to most > programmers. But that really is what I meant. I've been waiting for someone to make this claim about unit testing. Guess I'll pick on you :) I don't believe that unit testing eliminates debugging. I'll give a real life example. We had a bug where an update to our library disabled some features of a client program. After some investigating, it was determined that the client program was doing this: if (library_version == 3) instead of this: if (library_version >= 3) Our fix for this bug was to detect the client and report 3 for the version if the client was the offending program, and otherwise report the true version. This is the sort of bug that gets caught in integration testing. I can't think of any way that unit testing would have helped this situation. I'd be very interested in hearing how this sort of bug would be approached in the test-first "no debugging" philosophy. -Peter -- Pull out a splinter to reply. .