Poor John.

John Foobar is a 26 year old semi-technical analyst living in Austin who’s sick and tired of Yelp. His favorite Mexican restaurant “Mi pato esta en fuego” has only received 2.4 stars! John wants to find food that he specifically will like, not just restaurants that are rated well. As luck may have it, John happens to have access to a massive amount of perfect data. So far, so good.

John does some Google searches and finds that a “k-nearest-neighbors algorithm” might be what he’s looking for. He happens to have scored a free SQL Server license from an old barfly in exchange for listening to his tales about how wonderful life was when the mafia controlled New York, so naturally John searches for ways to implement kNN algorithms in SQL.

John finds out that kNN can be implemented efficiently using a spatial index, but that only works for two dimensions. That doesn’t work because John really wants to judge places by location, price, and the ridiculousness of their dessert menu. So he spends a few hours trying to hack things together and finally posts an extremely specific question on StackOverflow about extending spatial indexes to 3 dimensions. He gets several answers that are technically correct but don’t quite solve his problem and finally gives up, resigned to eat at popular restaurants for the rest of his days.

But if John had asked about the general problem of implementing kNN algorithms in SQL, he would have found that spatial indexes aren’t the best method.

If he had asked about implementing kNN algorithms in general, he would have found that SQL isn’t the best language for it.

If he had asked about creating recommendations based on like/dislike data, he would have found that there are better algorithms than kNN, and that there are several existing GUIs/APIs for these algorithms.

And if he had asked about the general problem of finding good food, well, his friends might have told him that Yelp already has a “personal concierge” mode and he just has to click a different setting.

Poor John.

Computer scientist problems…

 
0
Kudos
 
0
Kudos

Now read this

What Working At Packback Has Been Like

On April 9th, 2014, just over 5 years ago at 18 years old, I set out on a journey of curiosity that has changed my life. That day I accepted an offer to join the fledgling startup Packback as a summer software engineering intern (back... Continue →