An interesting point has been raised in
life_warrior's recent post, about the frequency of debugging.
Personally, over years of experience, I've found a useful part of testing any new code written is to step through that code in a standard usage scenario. By which I mean, I compile up the software, put a break point on entry, then run the programme and step through on the first entry. If I can't do this in the real code for some reason, then a test harness is normally constructed and put to similar use!
The effect of this is that it allows me to spot very simple logical errors within functions. Typo's, effectively. The functions are normally designed perfectly, and the flow is fine and readable, but that still doesn't stop stray ! symbols on function returns messing things up. Or the occasional "comparison is the wrong way around" typing error.
What do other people use debuggers for? Is everyone else free from typing errors? I find them a lot easier to spot when thinking the function through whilst stepping.
Personally, over years of experience, I've found a useful part of testing any new code written is to step through that code in a standard usage scenario. By which I mean, I compile up the software, put a break point on entry, then run the programme and step through on the first entry. If I can't do this in the real code for some reason, then a test harness is normally constructed and put to similar use!
The effect of this is that it allows me to spot very simple logical errors within functions. Typo's, effectively. The functions are normally designed perfectly, and the flow is fine and readable, but that still doesn't stop stray ! symbols on function returns messing things up. Or the occasional "comparison is the wrong way around" typing error.
What do other people use debuggers for? Is everyone else free from typing errors? I find them a lot easier to spot when thinking the function through whilst stepping.
