<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>David Herrera&#039;s blog &#187; Computers</title>
	<atom:link href="http://www.dherrera.org/blog/tag/computers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dherrera.org/blog</link>
	<description></description>
	<lastBuildDate>Thu, 01 Dec 2011 00:57:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Randomized home page: One solution to filter failure</title>
		<link>http://www.dherrera.org/blog/2010/randomized-home-page-one-solution-to-filter-failure/</link>
		<comments>http://www.dherrera.org/blog/2010/randomized-home-page-one-solution-to-filter-failure/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 04:12:56 +0000</pubDate>
		<dc:creator>David Herrera</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[al jazeera]]></category>
		<category><![CDATA[bbc]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[filter failure]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[new york times]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[reuters]]></category>

		<guid isPermaLink="false">http://www.dherrera.org/?p=241</guid>
		<description><![CDATA[I use mostly RSS for online updates &#8212; except for day-to-day, &#8220;what&#8217;s happening worldwide&#8221; 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&#8217;s river of [...]]]></description>
			<content:encoded><![CDATA[<p>I use mostly <a href="http://www.whatisrss.com/">RSS</a> for online updates &#8212; except for day-to-day, &#8220;what&#8217;s happening worldwide&#8221; hard news.</p>
<p>For my RSS reader to present me with 100+ unread stories from the <a href="http://news.bbc.co.uk/low">BBC</a>, <a href="http://english.aljazeera.net/">Al Jazeera</a>, <a href="http://reuters.com/">Reuters</a>, and <a href="http://nytimes.com">The New York Times</a>, two or three times a day, simply overwhelms. </p>
<p>I tried, unsuccessfully, to adopt Dave Winer&#8217;s <a href="http://www.reallysimplesyndication.com/riverOfNews">river of news</a> mentality.  I can&#8217;t shake the pressure to try each story when I see the list of unreads, however irrational a task it is to try.</p>
<p>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.</p>
<p>My solution: A random page home page generator, created using a mix of HTML and Javascript.</p>
<p>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&#8217;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.</p>
<p>I&#8217;ve unsubscribed from the four news sites in my RSS reader, and I&#8217;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.</p>
<ol>
<li>
<p>Create a new plain text document (Mac users, open TextEdit and, from the Format menu, select &#8220;Make Plain Text.&#8221; Windows users, try Notepad).</p>
</li>
<li>
<p>Paste the following: </p>
<pre><code>&lt;script&gt;
    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];
&lt;/script&gt;
&lt;body onload="homepage();"&gt;&lt;/body&gt;
</code></pre>
<p>Unless you&#8217;re interested in the code itself, the only lines you have to worry about are the ones in square brackets, and the one with &#8220;Math.floor.&#8221;</p>
<p>(If you <em>are</em> interested, the code says: When the browser opens this page, run the function called &#8216;homepage.&#8217; &#8216;homepage&#8217;, in turn, chooses a number at random between 0 and 3, then opens the URL associated with that number in the &#8216;pages&#8217; array, where the BBC is 0, Al Jazeera is 1, etc.)</p>
</li>
<li>
<p>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.</p>
</li>
<li>
<p>In the line below the URLs, change the number in <code>var page = Math.floor(Math.random()*4);</code> to equal the number of URLs you included above. I have four URLs, so my number is &#8220;4&#8243;. Be sure to write the numeral, not &#8220;four.&#8221;</p>
</li>
<li>
<p>Save the file as &#8220;home-page.html&#8221;. Ignore any warnings about saving your file as .html.</p>
</li>
<li>
<p>Place the file wherever you want on your hard drive. Remember where you stored it.</p>
</li>
<li>
<p>This is the tricky step, if you&#8217;re unfamiliar with how your Web browser can also navigate folders on your hard drive. </p>
<p>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 <code>file:///Users/dave/Documents/home-page.html</code>.  Perhaps a Windows user could post where one might find the file if you put it somewhere in your user folder.</p>
</li>
<li>
<p>Open your home page. Hopefully, you&#8217;ll be spirited away to one of your chosen sites.</p>
<p>Alternatively, you could save yourself a few minutes and download my home-page file, which I&#8217;ve posted as a zip file <a href="/files/home-page.zip">here</a>.</p>
</li>
</ol>
<p>Questions or improvements? What do you think?</p>
<p>Short URL for this post: http://wp.me/pDmIJ-3T</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dherrera.org/blog/2010/randomized-home-page-one-solution-to-filter-failure/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

