Subj : Re: Not debugging? To : comp.programming,comp.lang.java.programmer,comp.lang.lisp From : Russell Shaw Date : Thu Aug 25 2005 03:57 am 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. You can only write tests before the code if you are very familiar with what you want and have thought about it for hours/days/weeks. In the process of making the solution of a very tedious problem clear to me, i can do a *lot* of throwing away of code and refactoring for weeks at a time. The amount of extra churn from rewriting unit tests would be hopeless. Refactoring of code *is* my thought process. Write code that works, then write unit tests to make sure it keeps working. Gdb/ddd is indispensible. .