Randomized home page: One solution to filter failure

I use mostly RSS for online updates — except for day-to-day, “what’s happening worldwide” hard news.

For my RSS reader to present me with 100+ unread stories from the BBC, Al Jazeera, Reuters, and The New York Times, two or three times a day, simply overwhelms.

I tried, unsuccessfully, to adopt Dave Winer’s river of news mentality. I can’t shake the pressure to try each story when I see the list of unreads, however irrational a task it is to try.

So, the problem: Wanting the variety of those four sources (and whatever ones I fall into later) without having to confront everything they offer each time I check in. In short, I wanted a better filter.

My solution: A random page home page generator, created using a mix of HTML and Javascript.

Each time I open a new browser window, or click to my home page, I see one of my four sites. The amount of news with which I’m confronted is decreased by 75% of what it was with the RSS firehose. Yet, I keep source diversity through encountering a different news site every time.

I’ve unsubscribed from the four news sites in my RSS reader, and I’m enjoying the results so far. I wanted to share the code so that you could create a similar page if you wanted to. Here are the steps.

  1. Create a new plain text document (Mac users, open TextEdit and, from the Format menu, select “Make Plain Text.” Windows users, try Notepad).

  2. Paste the following:

    <script>
        function homepage () {
            var pages = ['http://news.bbc.co.uk/low',
    	'http://english.aljazeera.net/',
    	'http://reuters.com/',
    	'http://nytimes.com'];
            var page = Math.floor(Math.random()*4);
            window.location = pages[page];
    </script>
    <body onload="homepage();"></body>
    

    Unless you’re interested in the code itself, the only lines you have to worry about are the ones in square brackets, and the one with “Math.floor.”

    (If you are interested, the code says: When the browser opens this page, run the function called ‘homepage.’ ‘homepage’, in turn, chooses a number at random between 0 and 3, then opens the URL associated with that number in the ‘pages’ array, where the BBC is 0, Al Jazeera is 1, etc.)

  3. In the square brackets, paste the URLs of the sites you want included in your random site generator. Be sure to follow correct syntax: Enclose the URL in quotes, and separate each URL with a comma.

  4. In the line below the URLs, change the number in var page = Math.floor(Math.random()*4); to equal the number of URLs you included above. I have four URLs, so my number is “4″. Be sure to write the numeral, not “four.”

  5. Save the file as “home-page.html”. Ignore any warnings about saving your file as .html.

  6. Place the file wherever you want on your hard drive. Remember where you stored it.

  7. This is the tricky step, if you’re unfamiliar with how your Web browser can also navigate folders on your hard drive.

    In your Web browser preferences, set your home page to the file you stored on your hard drive. This is different on different computers; on my Mac, the address is file:///Users/dave/Documents/home-page.html. Perhaps a Windows user could post where one might find the file if you put it somewhere in your user folder.

  8. Open your home page. Hopefully, you’ll be spirited away to one of your chosen sites.

    Alternatively, you could save yourself a few minutes and download my home-page file, which I’ve posted as a zip file here.

Questions or improvements? What do you think?

Short URL for this post: http://wp.me/pDmIJ-3T