Edge cases

A few months ago, the parking garage at the San Jose airport ate my credit card. There was noone at the exit so I parked and went hunting for someone who could help me. When I finally found someone, they kindly ejected my card and explained that their machines use a light to detect when you insert your card. Since my card is made of clear plastic, the light shone right through causing the machine to think the slot was still empty.

It’s an obvious oversight, but who do you blame? American Express? The company that made the parking garage payment system? I’m not sure, but I don’t use that card in automated machines anymore.

That experience reminded me of the importance of thinking though edge cases. Most people don’t have clear credit cards, but for those that do, it’s important that they work everywhere. A good software developer can build an application that works 95% of the time. A great one will think of all the unique edge cases (like clear credit cards) and build systems that are smart enough to handle them. At Torbit, we automatically transform websites so they load faster. It’s a tricky process and there are hundreds of edge cases that could trip us up. I often get asked how we compare to various competitors. For us, the big differentator is that last 5%. It’s being smart enough to know what to do with broken CSS or how to handle JavaScript that’s missing a very important semi-colon. It means we do the right thing even when you send us a JPEG with a “text/html” content type.

The last 5% is the hardest part, but oftentimes, it’s the most important.