>Interesting comments. I think we're about to "branch" into a discussion of coding styles vs. using the debugger, per se.
>
>Call it massive hubris, call it what you will, but I simply don't run into many bugs caused by me.
>
>I started programming in an industrial environment where line time was $7,000 per hour. If what I did caused problems, I heard about it real fast. Subsequently, by habit I learned to "battle-harden" my code.
>
>Basically, my routines assume that nothing will work. I estimate I spend over 90% of my coding time stamping out possible error-causing conditions, usually before even starting on the code that actually does useful work!
>
That still doesn't account for logic errors or errors in your error checking ;-) Being able to step through the code and see what the computer is actually doing without having to add a ton of extra coding (ie. printing variables, "I'm Here!" messages, etc.) saves me a lot of time.
>Again, maybe it's hubris, but I find that with my own code (and even with a lot of other people's) I can simply read it, and understand what it's doing.
>
That's where I normally get into problems. I code things thinking I know what it's doing or going to do, but when/if it doesn't it's really helpful to be able to just step through the code and view all the variable changes as they take place. I don't have to rely just on my brain to make sure I'm not forgetting or overlooking something. Why waste 15 minutes analyzing the code when 2 minutes of stepping through it with the debugger will give me the same answer?