Two months after I finished the class project in November, I finally got started reimplementing the backend in SQLite. This is pretty neat because SQLite is built into PHP 5, so no additional software is required. It's also a bit of a learning experience because I've never used PHP's sqlite functions before, but it doesn't appear that there's anything overly complicated there.
I was about to run the user stats script on the 10 Million Photos Flickr group this evening when I had an interesting idea. Instead of rescanning the whole group, why not just take the Top 100 users from the previous stats run and update their counts? The crucial insight here is that the flickr.groups.pools.getPhotos query can take a userid argument to return only photos in the group pool from that particular user. Once I noticed that was possible, then getting the user's photo count is only a matter of setting the page size to 1 and reading off the number of pages. This technique is much faster and more accurate than a full scan of the group pool. The downside is it could potentially miss newcomers to the top users list, but I don't think the list changes too often.
In chatting with the Quiznos manager this evening, I found out that there could be more former IT sector people who are now in the sandwich business than I thought. In this county alone, there are at least a few more Quiznos restaurants that were started by tech refugees! So now I'm wondering... what is it about the sandwich business that draws software people? Could it be that making a sandwich is a lot like writing software? Each sandwich starts with a design document or rather, a recipe. Then you construct the sandwich using off-the-shelf components, although you can make some of those in-house. Then, once the sandwich is ready, you use it for its intended purpose and get a core dump later.
Phone call from my parents. Now, even they are saying that I'm trying to do too much. Okay, well, I think I'd better go to sleep before 4am.