LWN.net Logo

Quotes of the week

All these functions return error codes, and we're not checking them. We should. So there's a patch which marks all these things as __must_check, which causes around 1,500 new warnings.

These are all bugs and they all need to be fixed.

-- Andrew Morton releases 2.6.18-rc1-mm1

[Y]ou seem to be quite self-confident. That is a nice thing to have for say a pro boxer, but it can be a disadvantage when dealing with a complex OS.

-- Ingo Molnar


(Log in to post comments)

Quotes of the week

Posted Jul 14, 2006 19:27 UTC (Fri) by Wummel (subscriber, #7591) [Link]

Good quote from Andrew Morton about error checking. Some programs ignore it, even books about programming strip their examples of error handling code, usually to have less code.

I'd yet like to see a programming book that emphasizes on error checking and gets it right in their examples. Error handling requires tedious and hard work, but as Andrew said in his post, missing error checks result in crashes that are even harder to debug.

Quotes of the week

Posted Jul 15, 2006 0:51 UTC (Sat) by Tara_Li (subscriber, #26706) [Link]

Once upon a time, code documented what variables were expected to be set going in, what variables were going to be set upon return, and since this was in the era of mostly global variables, what variables would be trashed in between. (Ok, I'll admit this was in BASIC, FORTRAN, and Assembler.) But of course, with the rise of the Object-Oriented paradigm, where you're supposed to be able to put *ANYTHING* into the function, and get something sensible out, this was no longer supposed to make sense to do. All these insane levels of abstraction we've gotten into do is hide the bugs.

Quotes of the week

Posted Jul 20, 2006 12:23 UTC (Thu) by brantgurga (guest, #22667) [Link]

There is one book I have found that either shows good error handling or specifically says that it has been omitted to clarify the example. That book was Writing Secure Code coauthored by Michael Howard from Microsoft Press.

disconnect (so to speak)

Posted Jul 15, 2006 4:47 UTC (Sat) by roelofs (subscriber, #2599) [Link]

Is it just me, or did anyone else misread Ingo's quote as a response to Andrew's?

Greg

disconnect (so to speak)

Posted Jul 15, 2006 4:53 UTC (Sat) by amikins (subscriber, #451) [Link]

Yeah, I did the same thing. I had to squint for a few minutes before I realized they were independent.

disconnect (so to speak)

Posted Jul 21, 2006 4:06 UTC (Fri) by nevets (subscriber, #11875) [Link]

Having read both comments previously on LKML that didn't cross my mind. But after reading your comment I reread the quotes, and sure enough, it does look like Ingo's responding to Andrew! But it doesn't surprise me at who Ingo was really responding to ;)

Copyright © 2006, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.