This weekend I read an interesting post about Occam’s Razor but decided not to blog about it, until I came across someone misusing Occam’s Razor and couldn’t suppress the need to clear my throat. In a post about digital camera pricing, I read the following sentence:
Occam’s Razor tells us that the simplest answer is the most likely one.
This is not correct. Here’s how Wikipedia defines Occam’s razor:
Occam’s razor, often expressed in Latin as the lex parsimoniae, translating to law of parsimony, law of economy or law of succinctness, is a principle that generally recommends selecting the competing hypothesis that makes the fewest new assumptions, when the hypotheses are equal in other respects.
The important part of the sentence is not about simplicity, but about selecting a hypothesis. When you’re trying to figure out which explanation for something you’ve observed is correct, the best approach is to test the hypothesis that you can eliminate most quickly. This has nothing to do with the fact that the simplest answer is probably correct, but rather that it makes sense to start with the possibilities that are easiest to eliminate.
This is particularly relevant to scientific experimentation, but it applies to problem solving in general. When you find a bug in your application, Occam’s razor would suggest that it makes sense to start by examining the code you just wrote yourself rather than checking Google to see whether there’s a bug in MySQL that has suddenly manifested itself and caused the incorrect behavior.
Blaming your own code requires only one new assumption — that you made a mistake when you were writing code that has yet been tested. Blaming MySQL requires you to assume that there is a bug in MySQL that has not been fixed or perhaps even detected and that your code (which is theoretically correct) somehow causes this bug to manifest itself. Perhaps to you, looking at your own code first may seem blindingly obvious, but to many developers it is not.
The point here is that Occam’s razor is a tool for problem solving (or experiment design), not a short cut that lets us skip problem solving entirely. In many cases, the simplest explanation is not correct, but it’s hard to be sure until you’ve eliminated it as a possible explanation.