I want to live forever. I’ve always thought that not dying was a pretty
obvious thing to want. To my surprise, I’ve found that a lot of people
whom I usually agree with on most topics strongly disagree with me on
this one. Rather than write yet another piece extolling the virtues of
a far-future post-scarcity post-singularity world, I thought I’d just
document some of the objections to immortality I get and my
counterarguments.
April 30th 2011 | more »
This week: Facebook’s sophie
puzzle. This
one is “buffet” difficulty, which translates roughly to “the underlying
problem is NP-complete,” which explains why I have such a hard time
choosing food at sushi buffets. In any case, the problem is to find your
cat in your apartment, where you know where the cat is likely to be, as
well as the transit times between the various locations in your home.
I’ll document here the various bad solutions I came up with on my way to
a decent one, and as a bonus: an optimized-ish version in C++!
March 5th 2011 | more »
Last week I was working on Facebook’s peak traffic puzzle,
which was a pretty entertaining and informative exercise. The idea is
basically to parse a log file and generate an undirected graph that
represents mutual friendships between Facebook users. Then you are to
find every group of friends where each friend in the group is friends
with every other person in the group.
February 28th 2011 | more »
Toto is a great tiny blogging platform for
Ruby/Rack. However, it doesn’t expose much in the way of a MVC structure
and it can be just annoying enough when you want to add some feature
that isn’t there. In this case, I wanted to add some simple older/newer
pagination to the front page. To my chagrin, I couldn’t find a way to
pass variables to a Toto page without using the GET variable syntax
(i.e. ?page=1) and I still wanted to hold onto the rails RESTful
paradigm of /page/1, so I monkey patched the Toto::Site dispatcher, like
so:…
February 23rd 2011 | more »
Google’s take on
an interactive ball logo was interesting enough to me that I felt that I
needed to write something at least as fun. My take is
backed by HTML5, so you will need a suitably compliant browser to view
it.
February 14th 2011 | more »