How do we choose our random pages?

Allpar’s home page shows two random pages every day, changing roughly three times an hour. You may wonder how we choose them.

We don’t. They’re random.

Sometimes they’re related. Sometimes they aren’t. It’s chance. The way it works used to be that we would grab a list of all the articles that have already been shown, then randomly pick a number from the total we get, and show that one. Then another random pick, and if it doesn’t match the first one, we show it.

random

That stopped working when our database program changed its parameters, and after a lot of false tries, we took someone else’s advice and did something goofy, which is taking the entire list, randomize the order (which seems wasteful to me), and pick the top two articles that bubbled up. The chosen articles are saved to a simple text file which calls the photos as well as the articles, to save processor time. It only happens every 20 minutes, and is a lot gentler on the processor and drive than showing random articles each time (which we did the first time we did random articles, using a simple text-based Perl script that drew from pretty much the entire site.)

The list comes from the featured articles list. When something is featured, it’s assigned the number “2.” The next week, it goes down to “1.” When it hits “0,” it can be randomly shown.

As for how the article base itself is chosen, that’s pretty simple: if we have it in the system, which requires manual entry of a headline, blurb, and photo, it’s there. We are slowly, slowly going through our 2,600 pages while adding new material, so most of the random articles are relatively recent, since we started using the new “automated features” system. (It’s not that automated, it still requires someone to manually go in, switch to the next week, and replace the cache file every week.)

I hope it will all survive a long time, because I don’t want to go back in and play with it for a while.