Re: gnomecard problems



On Sat, 16 Jan 1999, Sri Ramkrishna wrote:

> It's generally good practice especially in WiP (work in progress) software
> to capture all return values from system calls (like fopen).  You should
> always check to see if you are about to deference a NULL pointer.  Worked
> for me anyways. :-)

Well, this is an age old dispute... Any routine that can legitimately
return NULL should be checked for return value, obviously. But I'm still
in the old fashioned camp who does not believe in defensive programming. 
I've seen trivial coding errors with a large potential for havoc been
ignored for ages because the routine calling the faulty routine would just
ignore the bad data, making tracking the issue down close to impossible. 

In the same vein, I'm quite unhappy about GDK and Enlightenment's habit of
catching segmentation violations. I always take them out of my builds,
because without smoking gun it's close to impossible to find out which
part of this sizeable piece of code blows up (not to mention that a
current build of Mozilla requires "kill -9" to bring down, because it
segfaults at exit and the gdk error handler catches it).

To add insult to injury, rumor has it that much of the stability
enhancements in Windows 3.11 over 3.0 came from just ignoring error
conditions. We all know where that landed the users eventually :-)

Cheers,

					-- Bert


Bert Driehuis, MIS -- bert_driehuis@nl.compuware.com -- +31-20-3116119
The grand leap of the whale up the Fall of Niagara is esteemed, by all
who have seen it, as one of the finest spectacles in nature.
                -- Benjamin Franklin.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]