Murphy’s Law


You may remember how last year the Genesis spacecraft crashed in the desert. But you may have missed why it crashed. The short story is that the accelerometers were installed backwards. As it happens this is exactly the same failure that led Murphy to utter his famous phrase.

I have always though of Murphy’s law as negative. It instils me with a sense of hopelessness and defeat, but this is not its meaning. It is actually a principle of design. If there’s more than one way to do a job, and one of those ways will result in disaster, then somebody will do it that way. This phrasing makes the point clear. Since anything that can go wrong will eventually happen, one must strive to eliminate the possibility of things going wrong from your design. For example, if your code requires function A to be called before function B is called, engineer your code so that it is impossible to call function B before calling function A. For example, make function B a method of an object returned by function A.


, , ,

Russell O’Connor: contact me