Numbers, English, and Lazy Programmers

While doing research for an episode you will likely see shortly, I went to YouTube and did a search. This is what I got back:
Screen Shot 2014-06-11 at 10.46.47 AM
Note that it says I got “About 1 results”. Obviously, “results” is incorrect. There’s only one result! And About? What’s the standard deviation on that result?

This from a company that was bought by Google for a billion dollars or so. You’d think they’d have someone who could spend five frickin’ minutes to put in

if (results.count == 1) {…

and to only include the word “About” when the code rounds off the number of results (which it does for very large result sets). Neither of those things should be difficult, and I’d be embarrassed if my program were so sloppy. Yet there it is on one of YouTube’s most oft-loaded pages.

MapMyRide.com made a bit more of an effort, but didn’t test all the cases:
Screen Shot 2014-06-08 at 5.13.22 PM

11st place! The rule that works for 1 and 21 doesn’t work for 11. Crazy English and the words we have for the low teens. I sent off a friendly report to MayMyRide letting them know; the bug was in a new feature, and MMR doesn’t have the resources that YouTube does. We’ll see if they fix it before I fall to 13rd place.

3

Leave a Reply

Your email address will not be published. Required fields are marked *