What if you could give Christmas gifts to yourself but actually be surprised when you open them up? That’s exactly what Darius Kazemi did when he wrote a bot that buys him random crap off of Amazon. And he never has any idea what he’s going to get.
He explains how it works on Random Shopper, a Tumblr where he chronicles his surprise shipments:
Every time I run it, I give it a set budget, say $US50. It grabs a random word from the Wordnik API, then runs an Amazon search based on that word. It then looks for every paperback book, CD, and DVD in the results list, and buys the first thing that’s under budget. If it found a CD for $US10, then the new budget is $US40, and it does another random word search and starts all over, continuing until it runs out of money, or it searches a set number of times.
Among the two gifts he’s given to himself so far are Noam Chomsky’s Cartesian Linguistics and a CD from a random Swedish band. The whole thing seems a little frivolous, but it’s nice to have hobbies. And who doesn’t like presents? [Random Shopper]