Error Handling

“The general rule of thumb is that it takes $10 to fix the bug during development; $100 to fix the bug in QA; a $1,000 to fix the bug during beta testing; and $10,000 or more to fix the bug post-deployment.”

I pretty much agree with that. Not to those specific numbers, just to the fact that it’s a pain to fix stuff after the fact. So when developing you should take your time and double-check your code when you’re finished. Then have a peer review it and make sure it’s perfect.

But there’s no way you’re going to catch all the bugs. So to make debugging easier you should always have really good error handling and error logging. Check for and log every error possible. That means looking at the return value for every system call. If an error can happen then assume it will happen.

Edit from 2023-12-28: I don’t know where I got that top quote from. I remember Jim Goodnight of SAS saying something along those lines during an internal engineering-wide presentation when I worked there sometime between 2003 and 2006. Here are two random posts I just found that present similar info: one and two. They don’t do a good job of giving attribution for their sources. One of them uses an image that says it’s from the IBM System Science Institute, but this other post says that’s not a thing. This article discusses the whole situation a bit more.

This entry was posted in All, Computers and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *