SHORT Re: Suggestion: "fix" assert(obj)

Martin Howe martinhowe at myprivacy.ca
Fri Jun 22 01:57:53 PDT 2007


"Jascha Wetzel" <firstname at mainia.de> wrote in message 
news:f5ecms$2ejq$1 at digitalmars.com...
> ........

I won't argue with the rest, but
> that surgery analogy doesn't quite work here
Well, FWIW, IMO it does -- the printf is endoscope surgery... your actions 
are targeted at the area you know is the likely source of the trouble and 
involve minimum trouble to implement; thus for simple cases, it's quicker 
than the alternative. I use a debugger whenever programs crash for **no 
obvious reason**, because a debugger is the ONLY way to avoid multiple 
edit/printf/run cycles in such cases.

I must admit, the *routine* use of debugger sounds like something that with 
a bit of discipline might be worth adopting; it still feels like overkill, 
but then I guess I just haven't worked in a sector where impenetrable errors 
are common daily occurences.

> and that's what memory dumps and post-mortem debugging is for.
> the client sends you the dump and you can debug the exact instance of the 
> crash.
Now that *is* scary; the sort of things one expects the top 5% of 
bleeding-edge expert programmers (which I freely admit to not being one of) 
to do; certainly wasn't covered by even 3rd-year undergrad stuff; any good 
web references you can point me to?





More information about the Digitalmars-d mailing list