Monday, 16 March 2009

Unfazed by randomness

About a month ago, after having my hair cut, I met Fran in the Waterstones in Fulham with the intention of buying the memoirs of Sherlock Holmes.   To cut what was originally a long story short, I ended up buying 'The Black Swan'  by Nassim Nicholas Taleb.  

The book's central tenet is that in many situations we are both not very good at predicting future events and these situations do not lend themselves to accurate prediction.  We ignore the lessons of history and are left at the mercy of 'Black Swans': rare but often devastating events.  To use his phraseology: traders are (often) picking up pennies from in front of an oncoming stream roller.  My summary was written rather tentatively since the author is quick to chastise those who claim, but fail, to fully comprehend and act upon his ideas.

The Black Swan analogy should be appealing to Computing Students.   Imagine you're on a train passing through a country prone to large populations of swans.  On the trip you pass by thousands of swans, all of whom are white.  What statements can be made about the swan population of our fictitious county?  Given a 'reasonable' distribution of swans and a taking into account or large sample we might (wrongly) reason that there exist only white swans.   At this juncture the author reiterates a distinction probably made in many undergraduate logic courses: having no evidence to support the existence of black swans is distinct from having evidence that rules out the existence of black swans.   Our earlier train trip offered no evidence for the existence of black swans (we didn't see any), but did not find evidence to discredit existence of black swans (like an anthropological argument such as 'swans have trouble producing pigments' might do).  In real life it's very easy to miss the distinction between the two: the sever has never crashed - we don't need a backup.

Computing has its own softer variant of the Black Swan: the shaved yak.   Imagine you have some marking to do, but you've lost your red pen.  You find yourself skipping down to the stationary shop to buy a red pen.  On the way you meet a friend who has a bug he'd like you to look at.  You take a look at it, but can solve it without a copy of an authoritative reference.  The library has a copy, however you have overdue books (that you lost years ago) so can't get the book out.  So you ring your friend to ask him to get the book for you, but he's stuck in the queue for a coffee... (continues).  This chaotic diversion is called 'yak shaving' because the original story ends with the author shaving a yak (a problem usually unrelated to programming).  

This post doesn't really have a point, and is going to end abruptly.  But it has a moral, don't expect your completion estimates for software to be even within 90% of the original, make sure when you're programming a swan class you allow for some perturbations in the problem domain (Black Swans) and read 'The Black Swan' (but don't also read Fooled by Randomness, because they are very similar).

0 comments:

Post a Comment