<?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>Craig Loftus &#187; 2007 &#187; April</title>
	<atom:link href="http://craigloftus.net/blog/2007/04/feed/" rel="self" type="application/rss+xml" />
	<link>http://craigloftus.net/blog</link>
	<description></description>
	<lastBuildDate>Tue, 25 Oct 2011 09:55:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Not so new look</title>
		<link>http://craigloftus.net/blog/2007/04/21/not-so-new-look/</link>
		<comments>http://craigloftus.net/blog/2007/04/21/not-so-new-look/#comments</comments>
		<pubDate>Sat, 21 Apr 2007 13:16:34 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://craigloftus.net/blog/2007/04/21/not-so-new-look/</guid>
		<description><![CDATA[I changed the look of the website a little while back, as you may have noticed. It is quite a significant departure from the previous style and layout. The two main changes are the new colour scheme and the inclusion of a number of feeds on the index page. Colour scheme I was inspired to [...]]]></description>
			<content:encoded><![CDATA[<p>I changed the look of the website a little while back, as you may have noticed.  It is quite a significant departure from the previous style and layout.  The two main changes are the new colour scheme and the inclusion of a number of feeds on the index page.</p>
<h4>Colour scheme</h4>
<p>I was inspired to change to a much darker scheme having read an article on <a href="http://ecoiron.blogspot.com/2007/01/emergy-c-low-wattage-palette.html">how the colours effect the energy required to display a website</a>.  Essentially, bright and light colours require more energy from your monitor.</p>
<h4>Feeds</h4>
<p>These feeds represent online content which I have created.  Although in the case of recommended posts and bookmarks this <em>creation</em> might be considered a bit abstract.  This was an idea I had a <a href="http://craigloftus.net/blog/2006/12/25/what-am-i-reading-2/" title="My post called What am I reading">long while ago</a>, and then not so long ago came across a way of quickly and crudely implementing it.</p>
<p>Up until today the feeds have been read, parse and output each time the page was called.  This was causing significant delays in the page loading times.   As of today a static file containing the parsed feeds is generated every 12 hours.  The index page then calls on the static file when a request is made which means that no time is wasted on parsing the feed and preparing the output.</p>
<p>For those interested I&#8217;ve done this quite simply by writing taking a php file that was parsing the feeds and having it write the output to a static file.  I then have a <a href="http://en.wikipedia.org/wiki/Cron">cron</a> job run the php file at 9am and 9pm everyday:</p>
<p><code>0 9,21 * * * /usr/bin/php -q /<var>PATH</var>/generate_static_feeds.php > /dev/null</code></p>
<p>The last bit of that command &#8220;/dev/null&#8221; sends the output into the ether.  Without it the server will e-mail the output of the script&hellip;  which for some purposes can be rather useful.</p>
<p>In time I&#8217;ll be working on a more complex way of displaying the recommended posts, which will allow me to write a little note to go with each explaining why I have recommended them.</p>
]]></content:encoded>
			<wfw:commentRss>http://craigloftus.net/blog/2007/04/21/not-so-new-look/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

