Sunday, April 19, 2009

Falsifying Murphy's Law

"Anything that can possibly go wrong, does." -- Murphy's Law
Murphy's Law was not propounded by Murphy, it was Jack Sack who did it. Murphy just explained that in more than so many words. I was informed of this trivia about this law by one of my friends, in a book shop. He was complaining how the corporate world followed the Murphy's Law, one corollary of which he deduced was "whatever you don't know, will go bad at the right time". Like, he started telling me about a legacy circuitry block connected to a buck converter, and how it was drawing a huge current, which was affecting the Oscillatory circuit. "I didn't know anything about this circuitry, and you know, it was that one which went wrong, and i had to go around changing everything and then i realised it was this black box circuit which was the main villain" he explained the whole thing to me. Though i hadn't designed or studied about the buck converter, i realised it wasn't the circuit which is problematic, it was the superstition. Murphy's Law is as good as superstition, i hold this opinion. Let us try to understand the problem statement first, and then we can solve it by the root. Problem Statement: Anything that can possibly go wrong, does. What is wrong with this statement is that it is right! Everything human made is destructible, so everything is liable to go wrong. Consider the opposite statement "Anything which can never go wrong, works always fine", which is also true. How is it that the inverse statement is so important to us? Because it is imperical that whenever we try to open the bolt, we accidentally tighten it. This leads us to a very good mathematical question: "Given two ways A and B to move, what is the probability that we choose A?" and the engineering guys will pat give the answer "50% or 0.5". The answer means that if we randomly, without using our intelligence, choose one path, for a huge number of times, say 1 gogol times, then 50% of the times it would be path A, and rest of the times, it would be path B.

Two things are important here. One that human brain tends towards idiocy when left to itself (that after 3 million years of evolution) and thus without thinking, it can be 50% accurate. The second thing is- there is an agent who performs the task. if there is no one to walk, then no path is taken! Returning back to the bolt- opening- problem, if the agent (or the opener or the mechanic) does not notice the direction of the thread (idiot agent- so he introduces probabilistic model into otherwise a simple work issue), he can screw the bolt in any direction as his sweet will. Now if he twists the bolt in the opposite direction, the thread gets cut, and the machine breaks. Murphy's law is in action, he might say. But what about the other half of the probability? No one would notice anything wrong, because the machine is working all right. So Murphy's Law is defied half of the times which no one pays attention to, they only venerate murphy for his extraordinarily annoying law when things break, and count it as a 100%, which i find is injustice towards their knowledge of Probability.
Let us take another example of Murphy's Law in action: The zip or chain or Handle of the luggage breaks whenever you are on journey. True, but how would it break if the suitcase is kept in some corner of your home? So naturally, it will break only when some agent works on it, and that happens only during journeys. Then why only during journeys, and why not when we are leaving or coming back, does the handles break? Again probability comes to the rescue. The total time of the journey is too long and hectic, if compared with the time spent leaving the home or coming back, so no one remembers Murphy uncle before the journey starts or it concludes. Having thought so much, the Donkey told his friend "Dude, i can not exemplify in terms of circuits, as i'm not trained in it, But since i'm adept at coding, i'll tell you my experience. Whenever I'm given a legacy code, i make sure there are no black box areas, so that i know what every line of the code is doing. Since i'm very clear in my working, so nothing goes wrong where it wasn't expected to, because i know where it will go wrong".

The Donkey never believed in Murphy and his pessimistic foolish law, and nor in probability, but he chose probability as a tool to defeat a bigger idiot, the Murphy's Law.