Exception handling

Submitted by Caleb Brown on Fri, 11/05/2007 - 12:25am.

The digital age, with its intanets, computamigies and webs is now truly apart of our lives and we seem to be dealing alright with it. We do our homework on computers, we talk to friends on our mobile phones, and we cook our bread in computerised toasters.

But despite our hard work digital doesn't really fit with humans. I think this comes down to two facts:

  1. the digital age is inherently discrete (mathematically) in its representation of things - it doesn't deal very well with fuzzy areas. e.g. when describing the weather at what temperature does it go from being 'warm' to being 'cold'?
  2. it depends on software to be written thoroughly, with every possible exceptional circumstance taken into account, or failing nicely when something goes wrong - something rarely acheived. Every crash, or lost Word document is proof that this is the case

Because there is this disharmony between man and machine, there exist points where things can go wrong. As the digital machines are pushed to fit into a human world, all the exceptional circumstances that we happily tolerate need to be precisely defined and programmed into the machines. But there are many exceptions, and programmers really aren't that smart, so quite often these exceptions aren't handled correctly everywhere. These bugs usually sit dormant, waiting for an unsuspecting person to come along and enter the piece of information that causes the beast to fail.

These exceptions are fairly common. For example some years have more days than other years, some months have more days than others. Midnight in Greenwich, England is not the same time as Midnight in Sydney, Australia. Some postcodes have letters in them. Entering a zero into a form can often mean the same thing as entering nothing. They are everywhere.

For the mischievous amongst us this disharmony can be exploited. One simple thing to do is to only ever subscribe to a service on the 31st day of any month that has one. The good companies will process your bill sensibly, the bad companies might behave like the monthly recurring events in iCal where they don't appear at all in months with fewer than 31 days. You could also have fun at work and after having a meeting on the 31st of May say that you'll have another exactly a month from today.

The challenge is to find the everyday exceptions and start messing around with them. Test the boundary values. Try and break systems by feeding them seemingly normal data they cannot cope with. Stuff around a bit and break it. In the end the machines that deal with your mischief may cope as well as humans do, but every now and then you'll hit the jackpot and make someone a little red faced.

I'm wondering what died on

I'm wondering what died on you such that you were prompted to blog this post?

Nothing in particular

Nothing in particular really.

I was just looking through the source code to some billing software when the thought dawned on me. I then wondered what iCal did - which led me to stumble upon the curious bug there (which has been logged with Apple). Some discussion of this around the office motivated the blog post further.

Actually I eventually discovered a bug in the billing software that works to the advantage of the biller. Basically it treats a month as 30 days, which means it essentially charges an extra 1/5 to 1/6 of a month every year (30*12 + 30*1/6 = 365).

I read your post . it was

I read your post . it was amazing.Your thought process is wonderful.The way you tell about things is awesome.

latest mobile phones

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.