Ovidrecently posed a puzzle about how to minimize the text in an HTML table. While many solutions had been posed, I kinda like the way I finally solved it while sitting in a recent meeting of the pdx.pm group when I should have been listening to chromatic give his talk.

You know that funny feeling you get when you realize that you (and others) have just wasted a tremendous amount of energy on slow, bad solutions when there is an easy but obviously correct way to do this out there?

You may be about to feel that. I certainly did when I realized the right way to tackle this problem.

Do you agree that if we but knew the right height, it would be easy to compute the answer? The problem is that we don't know the right height, so we go through huge contortions to calculate it without knowing the height. But what if we just try to find the right height? How? Well just get an upper and lower bound then walk them together. Obvious innit? But this is the kind of problem that isn't seen much outside of algorithms courses we never use again.