I wrote this algorithm to solve a problem for myself one night about 10 years ago (agree - not a very tough problem, but very useful if you don't have enough memory). I told a client about it and he tried to patent it! I never checked to see if it went through...
You didn't need to; unix sort has been able to do this for way more than 10 years =).
GvR's Blog
11–15 of 15 posts
Re: GvR's Blog
#12So, what did ya'll think of Anathem?
Re: GvR's Blog
#13So, what did ya'll think of Anathem?
Re: GvR's Blog
#14It's not a terribly hard exercise, I'd expect that almost any programmer could do the math and figure out that a solution requires files. After that I'd expect a candidate to at least sketch out a logical solution. It's cool that it's Guido, though. And that it's a complete solution.
Re: GvR's Blog
#15This question seems to come up a lot at Google - didn't their CEO ask it of Obama and McCain when they visited?
I like that instead of going into a complicated solution to a tricky problem, GvR shows the very simple and general way to solve a slightly easier version more people are likely to encounter. Unfortunately I was sort of hoping he would take the Programming Pearls approach instead of treating it as a joke. Bently showed several ways to do this kind of constrained memory sorting given differing assumptions, but perhaps that kind of thing just isn't interesting for the places Python is used.