Swimming with the Razorfishes

Sunday, December 07, 2003

So Rob Martin writes an article titled "Debuggers are a wasteful Timesink." Rob, being an über developer God and generally brilliant person, people pay attention and react.

Debuggers, my friends, are tools. Tools aren't good or bad. They just are.

I suspect that Rob was being intentionally provocative. In a more measured moment, he might have tried to make the distinction between a debugger used as a code construction tool and one used as a code inspection tool.

But that kind of subtlety is often lost on people, particularly in the ADD-infused combination of software developers and the web.

Developers who use debuggers as tools during code construction are using them as crutches. Used while writing code, debuggers encourage a "code first, think later," "hmmm it seems to be working" style of development. Rob is correct, that sucks. As a construction tool, pair programming, thoughtful unit tests, and walkthroughs promote far better code.

But one sign of a good developer is mastery of a debugger. The ability to inspect the runtime behavior of code, to stop its execution, halt one thread while others execute, to see the value of variables; this is invaluable when inspecting a system.

Looking at code in an editor gives you a static understanding of the system; looking at code in a debugger gives you a dynamic view of the system. An excellent developer masters both views of the code, and knows when each is appropriate.

0 Comments:

Post a Comment

<< Home