Friday, January 6, 2017

A Tale of Two Bullets



The discovery of these two bullets is said to have been made close to Balaclava, site of the notorious Charge of the Light Brigade, one of the most notorious events in British military history.

Imagine the chances of one bullet exactly hitting another one as these two did. They must be vanishingly small. The article about this head-on collision between two bullets during the Crimean War puts the odds at a billion to one. Talk about an edge case!

But, despite the amazingly small odds, this did happen. It is a good lesson to all of us who must code for edge cases, the chances are really small, but not zero. We have to think about consequences and odds when doing our planning. The consequences of these two bullets colliding may have been saving the lives of two soldiers. Are the consequences of your edge cases that favorable? If not, better plan for them. After all, what are the odds?

No comments:

Post a Comment