kcw | journal | 2000 << Previous Page | Next Page >>

...Continued from the last entry.

Note the way he phrased the first sentence. It implies that I said that serious coders don't use debuggers, with the accompaning implication that if you use debuggers, you're not a serious coder. People do this all the time, and so do I. You partially quote someone and add your own opinions or say you agree with someone and then state something a little different. This brought several replies. Most of which were of the vein "real programmers use debuggers, kiddie programmers use print statements". Joseph McConnell has the most cogent reply:

I love that line - real programmers dont use source level debuggers. Actually real programmers, good ones,those who have to ship large (n * 100K'lines of source) commercial shrink wrap apps, dont use printf unless there is no other alternative. A good stable source level debugger, and the experience to use it correctly, make a good programmer at least an order of magnitude more productive while debugging than some kiddie coder playing with printf's.

I recently ported a 1.3Mb byte code Java web server from win32 to macos 8x. It took me about a month or two to work out what was going on and what I had to do to get it to repond they way I needed, mostly by single stepping using the CW Debugger. No docs for the codebase, as usual. I'd still be working on it if I had to dig around only armed with printf's.

The Mac CW Java dev system is a dog. The debugger is painfully slow and the environment still has not stabilised yet since the db was integrated with the ide in Pro3, but as it is the only game in town on the Mac, you have no choice but to use it. I was also running CW Win32 in parallel with the Win32 java code base on a PIII 500 and the contrast was amazing. The CW Win32 was increadably fast and responsive compared with CW Mac running on a G3 450. My guess is that, for starters, the CW Mac tcp/ip socket code needs to ripped out and done properly. Of course, trying to get socket code working on Open Transport/XTI is horrible, so the CW people have an excuse...

CW is a very flakey environment. When it works it is very good but a lot of time releases leave a lot to be desired. Dont get me started on the CW for the Sony PlayStation...

You only use printfs when there is absolutely no other choice. Like my current project where I have to modify a mpeg encoder running under vxWorks on a StongARM embedded system. I cant get Insight/GDB remote debugging to work properly yet so I'm reduced to printfs to a log file and packet sniffers. Once I get gdb up and running debugging is going to be a hell of a lot faster. Try printf'ing your way through a meg and half obj embedded system and see how quickly you can add, debug and verify new transport protocols.

Real programmers know how to use source level debuggers effectively, kiddie coders play with printfs. And really serious programmers know how to debug large applications only using Macsbug or SoftICE. Printfs wont get you far when tracking down compiler, timing, or memory corruption bugs. A good source level debugger will get you 95%+ of the way there, quickly. For the last few percent you will have to go down to the bare iron if you want to find that kind of bug. That's the way serious, very productive, coders work.

At this point, I was getting annoyed. Especially because some of the replies were getting a bit personal. There were some other peripheral arguments that I consider rather inflammatory, and for some reason those were also lumped into my camp (and how did this turn into armed camps in just a few messages?). Not leaving well enough alone, I had to reply again:

I can't really agree with your comments, based on my experience. We have 800 developers in our division, and I'm sure lots of our dev groups use debuggers. Still, our group of a dozen doesn't use debuggers (we do use profilers) and our group develops faster and with smaller bug counts than almost every other group in the division. This is done by doing good design up front, knowing your code, knowing other people's code, and knowing how the modules are supposed to interact.

Design, document, communicate. Reduce the bug count up front and you don't have to depend as much on a debugger. I'm sure a good debugger is invaluable in many situations. But I find that my group has gotten along fine without turning to a debugger to debug code. Once again, my point is that you can write large, commercial projects with CodeWarrior (or really, any other IDE, even just a text editor) without having to have a debugger. James made it sound that without a debugger, there is no point in programming. I disagreed.

Once again, I was probably a bit too adversarial. I do think I'm being more adult about this than the other people, although without printing what they said there is no proof, and I'm not in the habit of repeating personal attacks.

So, what's the point of this, other than the fact that I wanted to use up a journal entry or two? Be careful of what you write, try to be clear. Don't even appear to insult people, for they will see the insult and respond accordingly. Most important of all, stay out of these arguments in the first place.

Copyright (c) 2000 Kevin C. Wong
Page Created: August 18, 2004
Page Last Updated: August 18, 2004