|
Re: Debuggers are a wasteful Timesink
|
Posted: Nov 30, 2003 9:55 AM
|
|
> All right, I'll knock down the straw man. I agree - > debuggers can be a timesink. On the other hand, they can > be a useful tool, in conjunction with tests, to develop > software. > > It's quite common for me to write a test to exercise a > requirement, write a high level method that will satisfy > the requirement, and then start implementing the methods > to which I've referred as the debugger pops up. In this > way, I'm implementing exactly the methods I need when I > need them. Of course, the tools I use (Smalltalk and VA > Assist Pro) lend themselves nicely to this approach. > > Used this way, the debugger is actually a development aid, > rather than a diagnostic tool. When a debugger pops up, I > know exactly which method is missing, and what kinds of > parameters I might reasonably expect to send to the > missing method. And, if those parameters aren't what I > expected, I can easily walk up the stack trace to see > where I went wrong. Of course, by following this > development pattern religiously, The unexpected doesn't > normally have a chance to happen.
In this particular case you are not really debugging. You are using the debugger in the same way that java programmers use the compiler to tell them when a method is missing, or what the arguments to that method are.
For example, when I write a unit test, my IDE (IntelliJ) tells me that the methods I am calling haven't been written yet. It even gives me buttons to push to automatically write create those methods, complete with arguments, etc.
My real beef is with depending on debuggers to debug code that could 1) be debugged more easily through inspection and 2) be debugged more easily using print statements.
As a Java programmer, I haven't used a debugger in several years. Nor have I spent a significant amount of time debugging. I attribute both to the disciplines of TDD, Refactoring, and Pair Programming. I also attribute them to a desire to avoid the debugger addiction.
|
|