Thinking in if statements

What an amazing piece of work from Joel Spolsky. This post seems to encapsulate what Microsoft are about very neatly, and without being hysterical:

If Microsoft doesn’t shed this habit of “thinking in if statements” they’re only going to fall further behind.

» Read more…


  1. Exactly. They should think in case. ;)Brian Benz#
  2. Ben,

    I don't want to make a big deal out of this but someone has to call Joel's bluff every so often. As someone says in his discussion forum regarding an earlier claim that he made about Bayesian filtering: "Joel with all due respect is some times… statistically… full of shit… "

    The comment that ""Google uses Bayesian filtering the way Microsoft uses the if statement," may be a good "sound bite" but Joel is agreeing with a nonsensical statement. Bayesian filtering is so problem-space specific that the comparison doesn’t make sense.

    "Hey, we need to replace all of our if statements with Bayesian fltering" is the kind of statement that I'd expect an architectural astronaut to make. (And I've met a few of those in my career ;-)

    Also, Joel claims that Google does spell checking based on word usage statistics. Does he know this for a fact or is he speculating? This approach may be good for names like Spolsky but that doesn't mean that Google never relies on dictionaries to correct misspelled words in searches.Bob#
  3. Point taken Bob. But the way I read it, the tale isn’t literally about Bayesian filtering vs. the if statement. Surely it’s about tackling problems in a unique way rather than settling for simplistic / old approaches?

    Where Joel is being deliberately provocative is in mentioning Google: we all know how that can raise hackles with MS ;-) Ben Poole#
  4. Yeah, I realize that it's just a way to say that "Gosh those Google folks are so smart" but that's no excuse for sloppy comparisons.

    I like a lot of what Google has done. They've done amazing things with search. But not everyone is happy with Google making their information available. For example, a lawsuit was filed today by five large publishers seeking to block Google's plans to scan copyrighted works without permission:

    It sometimes sucks to get too much attention.Bob#
  5. Bob @2,

    I've been in a meeting with Google when they were trying to sell us their search appliances. They were very proud of the fact that the spell-checker requires no language files - it works in the way Joel describes it.

    Now, salespeople do lie. But in this case, I don't see much benefit in them doing so. Especially as they knew they'd get called on that lie - we needed support for the Welsh language, and very few products in the search arena do that properly.
    Philip Storry#
  6. Philip,

    I could see how that might work over time but you would have to seed it with something. I don't speak Welsh but I would imagine that at the very least you'd need to seed the indexer with words that you didn't want to index such as articles of speech. How do you do stemming and the other tricks of indexing and search without knowing some language rules? There may be some truth to what the salesman said but I think the answer is more complicated than "we don't need language files". Bob#

Comments on this post are now closed.


I’m a software architect / developer / general IT wrangler specialising in web, mobile web and middleware using things like node.js, Java, C#, PHP, HTML5 and more.

Best described as a simpleton, but kindly. You can read more here.