<?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>Life of Andrew</title>
	<atom:link href="http://sandfly.net.nz/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://sandfly.net.nz/blog</link>
	<description>Blog, blog, blog, blog</description>
	<lastBuildDate>Wed, 03 Feb 2010 00:31:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The Aliens Rap</title>
		<link>http://sandfly.net.nz/blog/2010/02/the-aliens-rap/</link>
		<comments>http://sandfly.net.nz/blog/2010/02/the-aliens-rap/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 00:25:09 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Culture]]></category>
		<category><![CDATA[film]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[movie]]></category>
		<category><![CDATA[scifi]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://sandfly.net.nz/blog/?p=693</guid>
		<description><![CDATA[Following up on the epic 10 minute rap summary of Robocop, the same team has released Aliens: 
open at youtube.com
Watching this reminds me what a great film Aliens turned out to be and how Avatar (by the same director) pales in comparison. It&#8217;s not that Avatar was terrible but nobody is going to be making [...]


Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2010/01/film-review-avatar/' rel='bookmark' title='Permanent Link: Film Review : Avatar'>Film Review : Avatar</a> <small>James Cameron has always been an interesting film maker. Although...</small></li><li><a href='http://sandfly.net.nz/blog/2009/05/film-review-star-trek/' rel='bookmark' title='Permanent Link: Film Review : Star Trek'>Film Review : Star Trek</a> <small>Once again Hollywood dredges up the corpse of a much-loved...</small></li><li><a href='http://sandfly.net.nz/blog/2009/10/500-impressions-in-2-minutes/' rel='bookmark' title='Permanent Link: 500 Impressions in 2 Minutes'>500 Impressions in 2 Minutes</a> <small>View at YouTube This guy is incredible, how does he...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Following up on the <a href="/blog/2008/12/the-robocop-rap/">epic 10 minute rap summary of Robocop</a>, the same team has released Aliens: </p>
<p><center><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/xcLTaMpRl2o&#038;hl=en_GB&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/xcLTaMpRl2o&#038;hl=en_GB&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br /><a href="http://www.youtube.com/watch?v=xcLTaMpRl2o">open at youtube.com</a></center></p>
<p>Watching this reminds me what a great film Aliens turned out to be and how Avatar (by the same director) pales in comparison. It&#8217;s not that Avatar was terrible but nobody is going to be making 10 minute rap songs about it in 25 years.</p>
<p><strong>quick update:</strong> Hey, <a href="http://www.youtube.com/watch?v=BdpngMC5TKM&#038;feature=related">they&#8217;ve done Terminator 2</a> as well!</p>


<p>Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2010/01/film-review-avatar/' rel='bookmark' title='Permanent Link: Film Review : Avatar'>Film Review : Avatar</a> <small>James Cameron has always been an interesting film maker. Although...</small></li><li><a href='http://sandfly.net.nz/blog/2009/05/film-review-star-trek/' rel='bookmark' title='Permanent Link: Film Review : Star Trek'>Film Review : Star Trek</a> <small>Once again Hollywood dredges up the corpse of a much-loved...</small></li><li><a href='http://sandfly.net.nz/blog/2009/10/500-impressions-in-2-minutes/' rel='bookmark' title='Permanent Link: 500 Impressions in 2 Minutes'>500 Impressions in 2 Minutes</a> <small>View at YouTube This guy is incredible, how does he...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://sandfly.net.nz/blog/2010/02/the-aliens-rap/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Film Review : Avatar</title>
		<link>http://sandfly.net.nz/blog/2010/01/film-review-avatar/</link>
		<comments>http://sandfly.net.nz/blog/2010/01/film-review-avatar/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 09:03:13 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Culture]]></category>
		<category><![CDATA[fantasy]]></category>
		<category><![CDATA[film]]></category>
		<category><![CDATA[movie]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[scifi]]></category>

		<guid isPermaLink="false">http://sandfly.net.nz/blog/?p=688</guid>
		<description><![CDATA[James Cameron has always been an interesting film maker. Although on one level most of his films could be classified as pulpy genre-related fare, they usually have a more interesting subtext lurking below the explosions. Previous Cameron films have investigated such themes as mother/daughter relationships, humanity&#8217;s fear of the unknown, musings on fate and predestination, [...]


Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2009/05/film-review-star-trek/' rel='bookmark' title='Permanent Link: Film Review : Star Trek'>Film Review : Star Trek</a> <small>Once again Hollywood dredges up the corpse of a much-loved...</small></li><li><a href='http://sandfly.net.nz/blog/2009/07/film-review-paper-solder-bumazhnyy-soldat/' rel='bookmark' title='Permanent Link: Film Review : Paper Solder (Bumazhnyy Soldat)'>Film Review : Paper Solder (Bumazhnyy Soldat)</a> <small>The New Zealand Film Festival is on at the moment,...</small></li><li><a href='http://sandfly.net.nz/blog/2009/03/movie-review-watchmen/' rel='bookmark' title='Permanent Link: Movie Review : Watchmen'>Movie Review : Watchmen</a> <small>Watchmen is a difficult movie to categorize. As an adaption...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>James Cameron has always been an interesting film maker. Although on one level most of his films could be classified as pulpy genre-related fare, they usually have a more interesting subtext lurking below the explosions. Previous Cameron films have investigated such themes as mother/daughter relationships, humanity&#8217;s fear of the unknown, musings on fate and predestination, and whether it is morally acceptable (and perhaps even admirable) to slum it with a good looking lower class boy for a few weeks before you get married even though an ocean liner might not be the best place to do so. So it is with a heavy heart that I have to say Avatar is a slight disappointment.</p>
<p><img src="http://sandfly.net.nz/blog/wp-content/uploads/2010/01/avatar.jpg" alt="avatar" title="avatar" width="300" height="169" class="alignleft size-full wp-image-690" />The planet of Pandora (Who names these planets? What were they thinking?) has some stuff that humans want to mine. Unfortunately, the best place to get it is right on top of where the indigenous population (8 foot tall skinny blue people called the Navi) live in harmony with their world. The Navi are distrustful of the humans, so in order to investigate the Navi a bit more, the humans create the titular avatars &#8211; mindless Navi bodies that certain individuals can &#8220;drive around&#8221; remotely. The main character is just such an individual, and he (or his avatar) quickly becomes involved in the local tribe. Although the humans would prefer that the Navi move on without violence, it is clear that a military solution, led by a crazed marine, might be more expedient&#8230;</p>
<p>It is almost impossible to spoil anything about Avatar&#8217;s plot, no doubt you have already guessed the direction it which it unfolds. It is a shame that for all the risks involved in making what is apparently the most expensive movie ever made (it certainly looks like it), the story is as safe as an after-school special. The film could have made some interesting points about colonialism, or environmentalism, the military, or even feminism, but instead chooses to unspool a conventional yarn where the good guys are selfless and the bad guys are crazy and evil. It is not that is it a bad story per say, just something we have all seen many times before.</p>
<p>I saw Avatar in 3D, it is by far the best 3D experience so far. The lush jungles and mist-shrouded peaks of Pandora look amazing &#8211; Avatar is simply the greatest visual treat I have ever seen. The contrast between the sharp grey lines of the human base with the colourful, glowing environment outside is very well rendered. James Cameron has always been interested in portraying technology and Avatar is no exception &#8211; a nice touch is that all of the displays that the humans use during the movie are also in 3D. There are a thousand little details like that I loved about Avatar, it is just a shame that the whole thing isn&#8217;t as great as the sum of its parts. However, anyone who shares Cameron&#8217;s love for helicopters and giant robots and things being blown up by helicopters and giant robots will be thrilled. </p>
<p>Highly recommended if you can see it on the big screen in 3D. Otherwise only recommended if you like this sort of thing (but who doesn&#8217;t?)</p>


<p>Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2009/05/film-review-star-trek/' rel='bookmark' title='Permanent Link: Film Review : Star Trek'>Film Review : Star Trek</a> <small>Once again Hollywood dredges up the corpse of a much-loved...</small></li><li><a href='http://sandfly.net.nz/blog/2009/07/film-review-paper-solder-bumazhnyy-soldat/' rel='bookmark' title='Permanent Link: Film Review : Paper Solder (Bumazhnyy Soldat)'>Film Review : Paper Solder (Bumazhnyy Soldat)</a> <small>The New Zealand Film Festival is on at the moment,...</small></li><li><a href='http://sandfly.net.nz/blog/2009/03/movie-review-watchmen/' rel='bookmark' title='Permanent Link: Movie Review : Watchmen'>Movie Review : Watchmen</a> <small>Watchmen is a difficult movie to categorize. As an adaption...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://sandfly.net.nz/blog/2010/01/film-review-avatar/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Phantom Menace Was Not a Very Good Movie</title>
		<link>http://sandfly.net.nz/blog/2009/12/the-phantom-menace-was-not-a-very-good-movie/</link>
		<comments>http://sandfly.net.nz/blog/2009/12/the-phantom-menace-was-not-a-very-good-movie/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 05:40:20 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Culture]]></category>
		<category><![CDATA[film]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[movie]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[scifi]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://sandfly.net.nz/blog/?p=684</guid>
		<description><![CDATA[I own all of the Star Wars DVDs except for one &#8211; The Phantom Menace. Even the weakest of the others have a certain charm, but TPM was stupid through and through. Even the title is stupid! I have yet to work out exactly what the titular menace actually was. Although the story includes several [...]


Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2009/03/movie-review-watchmen/' rel='bookmark' title='Permanent Link: Movie Review : Watchmen'>Movie Review : Watchmen</a> <small>Watchmen is a difficult movie to categorize. As an adaption...</small></li><li><a href='http://sandfly.net.nz/blog/2009/05/film-review-star-trek/' rel='bookmark' title='Permanent Link: Film Review : Star Trek'>Film Review : Star Trek</a> <small>Once again Hollywood dredges up the corpse of a much-loved...</small></li><li><a href='http://sandfly.net.nz/blog/2010/02/the-aliens-rap/' rel='bookmark' title='Permanent Link: The Aliens Rap'>The Aliens Rap</a> <small>Following up on the epic 10 minute rap summary of...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I own all of the Star Wars DVDs except for one &#8211; The Phantom Menace. Even the weakest of the others have a certain charm, but TPM was stupid through and through. Even the title is stupid! I have yet to work out exactly what the titular menace actually was. Although the story includes several menaces, none of them seem particularly phantomastical. Unless the menace was supposed to be Palpatine&#8217;s amazingly convoluted plan, but that plot point doesn&#8217;t really bear fruit until the second film. </p>
<p>Anyway, I haven&#8217;t given The Phantom Menace much thought since it first came out but this guy certainly has:</p>
<p><center><br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/FxKtZmQgxrI&#038;hl=en_GB&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/FxKtZmQgxrI&#038;hl=en_GB&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br />
</center><br />
<a href="http://www.youtube.com/watch?v=FxKtZmQgxrI">Part 1</a><br />
<a href="http://www.youtube.com/watch?v=ZG1AWVLnl48">Part 2</a><br />
<a href="http://www.youtube.com/watch?v=IdQwKPVGQsY">Part 3</a><br />
<a href="http://www.youtube.com/watch?v=SOlG4T1S2lU">Part 4</a><br />
<a href="http://www.youtube.com/watch?v=TBvp1r2UpiQ">Part 5</a><br />
<a href="http://www.youtube.com/watch?v=ORWPCCzSgu0">Part 6</a><br />
<a href="http://www.youtube.com/watch?v=fIWKMgJs_Gs">Part 7</a></p>
<p>Even if you ignore the affectations of the reviewer, he has some pretty insightful points about how TPM fails as a movie.</p>


<p>Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2009/03/movie-review-watchmen/' rel='bookmark' title='Permanent Link: Movie Review : Watchmen'>Movie Review : Watchmen</a> <small>Watchmen is a difficult movie to categorize. As an adaption...</small></li><li><a href='http://sandfly.net.nz/blog/2009/05/film-review-star-trek/' rel='bookmark' title='Permanent Link: Film Review : Star Trek'>Film Review : Star Trek</a> <small>Once again Hollywood dredges up the corpse of a much-loved...</small></li><li><a href='http://sandfly.net.nz/blog/2010/02/the-aliens-rap/' rel='bookmark' title='Permanent Link: The Aliens Rap'>The Aliens Rap</a> <small>Following up on the epic 10 minute rap summary of...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://sandfly.net.nz/blog/2009/12/the-phantom-menace-was-not-a-very-good-movie/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The C++ Boost Libraries Part 6 &#8211; boost::any</title>
		<link>http://sandfly.net.nz/blog/2009/12/the-c-boost-libraries-part-6-boostany/</link>
		<comments>http://sandfly.net.nz/blog/2009/12/the-c-boost-libraries-part-6-boostany/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 03:41:54 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[boost]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://sandfly.net.nz/blog/?p=680</guid>
		<description><![CDATA[In C++ if you have a variable that you say is of type &#8220;Person&#8221; (for instance), you can be fairly certain (more or less) that it always actually contains a Person (or perhaps a subclass of Person. If you have a container of Persons, then you know (more or less) that every member is also [...]


Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2009/03/the-c-boost-libraries-part-5-boostfilesystem/' rel='bookmark' title='Permanent Link: The C++ Boost Libraries Part 5 &#8211; boost::filesystem'>The C++ Boost Libraries Part 5 &#8211; boost::filesystem</a> <small>The standard C++ iostreams library is very good (well, some...</small></li><li><a href='http://sandfly.net.nz/blog/2009/02/the-boost-c-libraries-intermission-getting-boost-used/' rel='bookmark' title='Permanent Link: The Boost C++ Libraries Intermission &#8211; Getting Boost Used'>The Boost C++ Libraries Intermission &#8211; Getting Boost Used</a> <small>A former colleage of mine (Hi Nigel!) frequently wore the...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>In C++ if you have a variable that you say is of type &#8220;Person&#8221; (for instance), you can be fairly certain (more or less) that it always actually contains a Person (or perhaps a subclass of Person. If you have a container of Persons, then you know (more or less) that every member is also a Person (or a subclass).</p>
<p>This is all very good, prevents a lot of runtime errors, and generally makes C++ a great language if you care about correctness. But sometimes, very rarely, you actually want to store a whole bunch of messy, unrelated types in a container without trying to ram them into some sort of class hierarchy. Parsers are a good example of this. It is often convenient just to chuck tokens of various types into a data structure for later processing without worrying too much about the specific type (string, int, float, etc). </p>
<p><strong>boost::any</strong> is a small class that can hold values from almost any type, designed for just such messy applications. Using <strong>boost::any</strong> is very simple:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;">boost<span style="color: #008080;">::</span><span style="color: #007788;">any</span> a1 <span style="color: #000080;">=</span> std<span style="color: #008080;">::</span><span style="color: #007788;">string</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;Moose&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
boost<span style="color: #008080;">::</span><span style="color: #007788;">any</span> a2 <span style="color: #000080;">=</span> <span style="color: #0000dd;">6</span><span style="color: #008080;">;</span></pre></td></tr></table></div>

<p>Of course, getting the values back again is a little harder.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">try</span>
<span style="color: #008000;">&#123;</span>
	std<span style="color: #008080;">::</span><span style="color: #007788;">string</span> v1 <span style="color: #000080;">=</span> boost<span style="color: #008080;">::</span><span style="color: #007788;">any_cast</span><span style="color: #000080;">&lt;</span> std<span style="color: #008080;">::</span><span style="color: #007788;">string</span> <span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span>a1<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// this works, a1 is a string</span>
	std<span style="color: #008080;">::</span><span style="color: #007788;">string</span> v2 <span style="color: #000080;">=</span> boost<span style="color: #008080;">::</span><span style="color: #007788;">any_cast</span><span style="color: #000080;">&lt;</span> std<span style="color: #008080;">::</span><span style="color: #007788;">string</span> <span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span>a2<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// nope, will throw an exception at runtime</span>
<span style="color: #008000;">&#125;</span>
<span style="color: #0000ff;">catch</span> <span style="color: #008000;">&#40;</span> <span style="color: #0000ff;">const</span> boost<span style="color: #008080;">::</span><span style="color: #007788;">bad_any_cast</span><span style="color: #000040;">&amp;</span> e <span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	<span style="color: #666666;">// tried to any_cast into something that wouldn't go</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>Of course, you can query a <strong>boost::any</strong> for the typeid of the stored object. Just don&#8217;t do it when Scott Meyers is in the vicinity.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;">std<span style="color: #008080;">::</span><span style="color: #007788;">string</span> v<span style="color: #008080;">;</span>
<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span> a1.<span style="color: #007788;">type</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">==</span> <span style="color: #0000ff;">typeid</span><span style="color: #008000;">&#40;</span>std<span style="color: #008080;">::</span><span style="color: #007788;">string</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	v <span style="color: #000080;">=</span> boost<span style="color: #008080;">::</span><span style="color: #007788;">any_cast</span><span style="color: #000080;">&lt;</span> std<span style="color: #008080;">::</span><span style="color: #007788;">string</span> <span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span> a1 <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// this should never throw, since we checked first</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>A single <strong>boost::any</strong> is perhaps not that useful, but a container of them can store almost anything we want:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">typedef</span> std<span style="color: #008080;">::</span><span style="color: #007788;">vector</span><span style="color: #000080;">&lt;</span> boost<span style="color: #008080;">::</span><span style="color: #007788;">any</span> <span style="color: #000080;">&gt;</span> AnyVector<span style="color: #008080;">;</span>
AnyVector values<span style="color: #008080;">;</span>
&nbsp;
values.<span style="color: #007788;">push_back</span><span style="color: #008000;">&#40;</span> <span style="color: #0000dd;">5</span> <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
values.<span style="color: #007788;">push_back</span><span style="color: #008000;">&#40;</span> std<span style="color: #008080;">::</span><span style="color: #007788;">string</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;Hello&quot;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
values.<span style="color: #007788;">push_back</span><span style="color: #008000;">&#40;</span> <span style="color:#800080;">5.3</span> <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #0000ff;">try</span> 
<span style="color: #008000;">&#123;</span>
	<span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span> AnyVector<span style="color: #008080;">::</span><span style="color: #007788;">const_iterator</span> p <span style="color: #000080;">=</span> values.<span style="color: #007788;">begin</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			p <span style="color: #000040;">!</span><span style="color: #000080;">=</span> values.<span style="color: #007788;">end</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
			<span style="color: #000040;">++</span>p <span style="color: #008000;">&#41;</span>
	<span style="color: #008000;">&#123;</span>
		<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span> p<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>type<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">==</span> <span style="color: #0000ff;">typeid</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span>
			<span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;Int = &quot;</span> <span style="color: #000080;">&lt;&lt;</span> any_cast<span style="color: #000080;">&lt;</span><span style="color: #0000ff;">int</span><span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #000040;">*</span>p<span style="color: #008000;">&#41;</span> <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span>
		<span style="color: #0000ff;">else</span> <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span> p<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>type<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">==</span> <span style="color: #0000ff;">typeid</span><span style="color: #008000;">&#40;</span>std<span style="color: #008080;">::</span><span style="color: #007788;">string</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span>
			<span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;String = &quot;</span> <span style="color: #000080;">&lt;&lt;</span> any_cast<span style="color: #000080;">&lt;</span>string<span style="color: #000080;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #000040;">*</span>p<span style="color: #008000;">&#41;</span> <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span>
		<span style="color: #0000ff;">else</span> 
		<span style="color: #008000;">&#123;</span>
			<span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;Unhandled type: &quot;</span> <span style="color: #000080;">&lt;&lt;</span> p<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>type<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>.<span style="color: #007788;">name</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span>
		<span style="color: #008000;">&#125;</span>
	<span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span> 
<span style="color: #0000ff;">catch</span> <span style="color: #008000;">&#40;</span> <span style="color: #0000ff;">const</span> boost<span style="color: #008080;">::</span><span style="color: #007788;">bad_any_cast</span> <span style="color: #000040;">&amp;</span>e <span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	<span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;Bad any_cast&lt;&gt;&quot;</span> <span style="color: #000080;">&lt;&lt;</span> e.<span style="color: #007788;">what</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>Any type that you put into a <strong>boost::any</strong> must be copy constructable (the any makes a copy, not a reference). You also have to make sure that its destructor doesn&#8217;t throw (but of course you do that anyway!)</p>
<p>Although I wouldn&#8217;t recommend <strong>boost::any</strong> for everyday use, it does come into its own when the only alternative is a huge class structure or (even worse) void *s. </p>


<p>Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2009/03/the-c-boost-libraries-part-5-boostfilesystem/' rel='bookmark' title='Permanent Link: The C++ Boost Libraries Part 5 &#8211; boost::filesystem'>The C++ Boost Libraries Part 5 &#8211; boost::filesystem</a> <small>The standard C++ iostreams library is very good (well, some...</small></li><li><a href='http://sandfly.net.nz/blog/2009/02/the-boost-c-libraries-intermission-getting-boost-used/' rel='bookmark' title='Permanent Link: The Boost C++ Libraries Intermission &#8211; Getting Boost Used'>The Boost C++ Libraries Intermission &#8211; Getting Boost Used</a> <small>A former colleage of mine (Hi Nigel!) frequently wore the...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://sandfly.net.nz/blog/2009/12/the-c-boost-libraries-part-6-boostany/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Python and The Very Slow Server</title>
		<link>http://sandfly.net.nz/blog/2009/11/python-and-the-very-slow-server/</link>
		<comments>http://sandfly.net.nz/blog/2009/11/python-and-the-very-slow-server/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 02:23:00 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://sandfly.net.nz/blog/?p=670</guid>
		<description><![CDATA[I don&#8217;t usually do a lot of Python programming, but I always enjoy it when the opportunity arises. Python is in no way a &#8220;clean&#8221; language, it has all sorts of warts and limitations that mean that it tends to not get used for big projects. Despite this (or maybe because of it), Python remains [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t usually do a lot of Python programming, but I always enjoy it when the opportunity arises. Python is in no way a &#8220;clean&#8221; language, it has all sorts of warts and limitations that mean that it tends to not get used for big projects. Despite this (or maybe because of it), Python remains my go-to language for Getting Small Things Done Quickly. It is impossible to overstate the utility of just being able to start coding a function by bashing away at the python console &#8211; nothing else has given me the same sense of instant gratification since I started programming in BASIC back in the 80s.</p>
<p>The other big advantage of Python is the useful utility libraries that come with it as standard. Want to send twenty thousand emails? Just import <strong>smtplib</strong>. Want to generate code based on data from a spreadsheet? Import <strong>csv</strong> and away you go. Need a file that is exactly 32Mb is size? No problem. These are real examples from my job where Python has saved me many hours.</p>
<p>The most recent use I have put Python to is a slow server. For various murky and uninteresting reasons I need a rate-limiting HTTP server, one that I can easily control the speed at which it sends data. Enter Python&#8217;s very handy <strong>BaseHTTPServer</strong> module, which allows you to create custom HTTP servers with only a few lines of code by subclassing a request handler. Although the <strong>BaseHTTPServer</strong> is fairly useless for serving real files, it is perfect for this type of thing since it does all the boring work of parsing headers and returning status codes.</p>
<p>I don&#8217;t care about the contents of the data, just its size and how long it takes to serve. Since I will be varying these parameters a lot, I decided to make them part of each request so that each request could take a different amount of time &#8211; this means I don&#8217;t have to restart the server between each test run. Modifying the code to serve actual file data would be very simple.</p>
<p>I enjoyed writing this server so much that I regret that it didn&#8217;t take longer. Now I actually have to use it for its intended purpose, which I can assure you is not going to be as pleasant.</p>
<p>Here is the complete Python source:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># A very simple HTTP server designed to for testing situations where the data returned</span>
<span style="color: #808080; font-style: italic;"># is not important but the rate at which it comes down is. This server can be started</span>
<span style="color: #808080; font-style: italic;"># using the command: python delayserver.py</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># Once started, it will listen for requests on port 8000</span>
<span style="color: #808080; font-style: italic;"># Requests should be of the form http://&lt;address&gt;:8000/size=&lt;bytes&gt;,duration=&lt;seconds&gt;</span>
<span style="color: #808080; font-style: italic;"># where: &lt;bytes&gt; is the size of the response data</span>
<span style="color: #808080; font-style: italic;"># and    &lt;seconds&gt; is how long you want it to take (at minimum, it may take longer)</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># Notes:</span>
<span style="color: #808080; font-style: italic;"># * The timing is pretty inaccurate for small byte sizes, this isn't a problem for</span>
<span style="color: #808080; font-style: italic;">#   what I need it for</span>
<span style="color: #808080; font-style: italic;"># * Press ctrl-c to stop serving</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">time</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">BaseHTTPServer</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> MyHTTPRequestHandler<span style="color: black;">&#40;</span><span style="color: #dc143c;">BaseHTTPServer</span>.<span style="color: black;">BaseHTTPRequestHandler</span><span style="color: black;">&#41;</span>:
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> do_GET<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
		request = <span style="color: #008000;">self</span>.<span style="color: black;">path</span>.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;/&quot;</span><span style="color: black;">&#41;</span>
		duration = <span style="color: #ff4500;">1</span>
		size = <span style="color: #ff4500;">1024</span>
&nbsp;
        	validRequest = <span style="color: #008000;">False</span>
		params = request.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;,&quot;</span><span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">for</span> p <span style="color: #ff7700;font-weight:bold;">in</span> params:
                    temp = p.<span style="color: black;">partition</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;=&quot;</span><span style="color: black;">&#41;</span>
                    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>temp<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span> == <span style="color: #483d8b;">&quot;size&quot;</span><span style="color: black;">&#41;</span>:
                        size = <span style="color: #008000;">int</span><span style="color: black;">&#40;</span>temp<span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
                        validRequest = <span style="color: #008000;">True</span>
                    <span style="color: #ff7700;font-weight:bold;">elif</span> <span style="color: black;">&#40;</span>temp<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span> == <span style="color: #483d8b;">&quot;duration&quot;</span><span style="color: black;">&#41;</span>:
                        duration = <span style="color: #008000;">int</span><span style="color: black;">&#40;</span>temp<span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
                        validRequest = <span style="color: #008000;">True</span>
&nbsp;
                <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>validRequest == <span style="color: #008000;">False</span><span style="color: black;">&#41;</span>:
                   <span style="color: #008000;">self</span>.<span style="color: black;">send_error</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">404</span><span style="color: black;">&#41;</span>
                   <span style="color: #ff7700;font-weight:bold;">return</span>
&nbsp;
                <span style="color: #008000;">self</span>.<span style="color: black;">send_response</span><span style="color: black;">&#40;</span> <span style="color: #ff4500;">200</span> <span style="color: black;">&#41;</span>
                <span style="color: #008000;">self</span>.<span style="color: black;">send_header</span><span style="color: black;">&#40;</span> <span style="color: #483d8b;">&quot;Content-Length&quot;</span>, <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>size<span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>
                <span style="color: #008000;">self</span>.<span style="color: black;">send_header</span><span style="color: black;">&#40;</span> <span style="color: #483d8b;">&quot;Pragma&quot;</span>, <span style="color: #483d8b;">&quot;no-cache&quot;</span> <span style="color: black;">&#41;</span>
                <span style="color: #008000;">self</span>.<span style="color: black;">end_headers</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
                <span style="color: #008000;">self</span>.<span style="color: black;">slowWrite</span><span style="color: black;">&#40;</span> <span style="color: #008000;">self</span>.<span style="color: black;">wfile</span>, size, duration <span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
        <span style="color: #ff7700;font-weight:bold;">def</span> slowWrite<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, output, size, duration<span style="color: black;">&#41;</span>:
                bytesWritten = <span style="color: #ff4500;">0</span>
                startTime = <span style="color: #dc143c;">time</span>.<span style="color: #dc143c;">time</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
                <span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: black;">&#40;</span> bytesWritten <span style="color: #66cc66;">&lt;</span> size <span style="color: black;">&#41;</span>:
                        now = <span style="color: #dc143c;">time</span>.<span style="color: #dc143c;">time</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
                        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>duration <span style="color: #66cc66;">!</span>= <span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>:
                                desiredBytes = <span style="color: black;">&#40;</span> <span style="color: black;">&#40;</span>now - startTime<span style="color: black;">&#41;</span> / duration <span style="color: black;">&#41;</span> <span style="color: #66cc66;">*</span> size
                        <span style="color: #ff7700;font-weight:bold;">else</span>:
                                desiredBytes = size
                        desiredBytes = <span style="color: #008000;">min</span><span style="color: black;">&#40;</span> size, desiredBytes <span style="color: black;">&#41;</span>
                        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>desiredBytes <span style="color: #66cc66;">&lt;</span> bytesWritten <span style="color: black;">&#41;</span>:
                                <span style="color: #dc143c;">time</span>.<span style="color: black;">sleep</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0.2</span><span style="color: black;">&#41;</span>
                        <span style="color: #ff7700;font-weight:bold;">else</span>:
                                <span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: black;">&#40;</span>bytesWritten <span style="color: #66cc66;">&lt;</span> desiredBytes<span style="color: black;">&#41;</span>:
                                        output.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'A'</span><span style="color: black;">&#41;</span>
                                        bytesWritten = bytesWritten + <span style="color: #ff4500;">1</span>
                                output.<span style="color: black;">flush</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
                now = <span style="color: #dc143c;">time</span>.<span style="color: #dc143c;">time</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
                <span style="color: #008000;">self</span>.<span style="color: black;">log_message</span><span style="color: black;">&#40;</span> <span style="color: #483d8b;">&quot;Request took %f seconds&quot;</span>,   now - startTime  <span style="color: black;">&#41;</span>	
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">&quot;__main__&quot;</span>:
    http = <span style="color: #dc143c;">BaseHTTPServer</span>.<span style="color: black;">HTTPServer</span><span style="color: black;">&#40;</span> <span style="color: black;">&#40;</span><span style="color: #483d8b;">''</span>, <span style="color: #ff4500;">8000</span><span style="color: black;">&#41;</span>, MyHTTPRequestHandler <span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Listening on 8000 - press ctrl-c to stop&quot;</span>
    http.<span style="color: black;">serve_forever</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>I should point out that I am by no means an expert at Python, so take this code with a pinch of salt.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://sandfly.net.nz/blog/2009/11/python-and-the-very-slow-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pacman</title>
		<link>http://sandfly.net.nz/blog/2009/11/pacman/</link>
		<comments>http://sandfly.net.nz/blog/2009/11/pacman/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 23:00:34 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Culture]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://sandfly.net.nz/blog/?p=665</guid>
		<description><![CDATA[
Remember kids &#8211; winners don&#8217;t do drugs.


No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><center><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/pIrvpn3k9A4&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en_US&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/pIrvpn3k9A4&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en_US&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object></center></p>
<p>Remember kids &#8211; winners don&#8217;t do drugs.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://sandfly.net.nz/blog/2009/11/pacman/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Catan &#8211; The First Island</title>
		<link>http://sandfly.net.nz/blog/2009/11/catan-the-first-island/</link>
		<comments>http://sandfly.net.nz/blog/2009/11/catan-the-first-island/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 09:38:04 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[boardgame]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://sandfly.net.nz/blog/?p=659</guid>
		<description><![CDATA[I love the Settlers of Catan board game, so when an iPod version appeared in the App Store for $6.49 I grabbed it straight away. Dubbed &#8220;Catan &#8211; The First Island&#8220;, the app includes everything in the core game, I assume more games based on the Catan expansions are on the way.
The app plays a [...]


Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2009/06/a-game-rated-arrrr-monkey-island-returns/' rel='bookmark' title='Permanent Link: A game rated arrrr! Monkey Island Returns (updated)'>A game rated arrrr! Monkey Island Returns (updated)</a> <small>The Secret of Monkey Island consumed a lot of my...</small></li><li><a href='http://sandfly.net.nz/blog/2009/07/space-ace/' rel='bookmark' title='Permanent Link: Space Ace'>Space Ace</a> <small>Remember Space Ace? The massive machine at the back of...</small></li><li><a href='http://sandfly.net.nz/blog/2009/03/462/' rel='bookmark' title='Permanent Link: iTunes DJ'>iTunes DJ</a> <small>Apple has a new iPod out and that means a...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><img src="http://sandfly.net.nz/blog/wp-content/uploads/2009/11/catan1.jpg" alt="Catan Screenshot" title="Catan Screenshot" width="320" height="480" class="alignleft size-full wp-image-660" />I love the Settlers of Catan board game, so when an iPod version appeared in the App Store for $6.49 I grabbed it straight away. Dubbed &#8220;<a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=335029050&#038;mt=8">Catan &#8211; The First Island</a>&#8220;, the app includes everything in the core game, I assume more games based on the Catan expansions are on the way.</p>
<p>The app plays a pretty good game, the interface is fairly straight forward and trading between players is handled well. Some rule variants are supported, like starting with a city instead of a settlement or different point targets. There are even different ways of distributing the resources for wusses who can&#8217;t take random chance. The computer players put up a fair challenge, and you can play hot-seat multiplayer but there is no internet play &#8211; an obvious omission.</p>
<p>Unfortunately, Catan also has some fairly annoying flaws. Firstly, the game is buggy. On both my first two games the computer player refused to finish its turn, leaving aborting the game the only option. The other 3 games I have had have worked smoothly so I still don&#8217;t know what I did to trigger that bug. Loading a saved game also sets some of the options back to the default, which is a pain but not game breaking.</p>
<p>Speaking of saved games, Catan does not automatically save your progress when you dismiss the app to go back to the iPod main menu. When you re-enter Catan it pops you back at the title screen with no way to resume unless you manually saved the game, something you can only do during your turn. This is intensely annoying, not to mention against Apple&#8217;s App guidelines and I hope the fix this if nothing else in an update.</p>
<p>The graphics are just OK, they get the job done without being very attractive and the board animation looks terrible. The whole package seems just a little unpolished &#8211; it works but needs just a little more attention to detail. The only thing that really saves Catan as an App is the mechanics of the game itself, which still shine. Perhaps after an update or two &#8220;Catan &#8211; The First Island&#8221; will reach its potential, but right now it is only for die-hard Catan fans.</p>
<p>A disappointment, only recommended if you like this sort of thing.</p>


<p>Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2009/06/a-game-rated-arrrr-monkey-island-returns/' rel='bookmark' title='Permanent Link: A game rated arrrr! Monkey Island Returns (updated)'>A game rated arrrr! Monkey Island Returns (updated)</a> <small>The Secret of Monkey Island consumed a lot of my...</small></li><li><a href='http://sandfly.net.nz/blog/2009/07/space-ace/' rel='bookmark' title='Permanent Link: Space Ace'>Space Ace</a> <small>Remember Space Ace? The massive machine at the back of...</small></li><li><a href='http://sandfly.net.nz/blog/2009/03/462/' rel='bookmark' title='Permanent Link: iTunes DJ'>iTunes DJ</a> <small>Apple has a new iPod out and that means a...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://sandfly.net.nz/blog/2009/11/catan-the-first-island/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Wellington Podcast</title>
		<link>http://sandfly.net.nz/blog/2009/10/the-wellington-podcast/</link>
		<comments>http://sandfly.net.nz/blog/2009/10/the-wellington-podcast/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 00:16:48 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Blogroll]]></category>
		<category><![CDATA[Culture]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Places]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[Wellington]]></category>

		<guid isPermaLink="false">http://sandfly.net.nz/blog/?p=656</guid>
		<description><![CDATA[Bevan McCabe, raconteur and man-about-town, is producing a podcast about this fair city. The first episode has just been released and it turned out rather well.
There is more information at the associated Wellington Podcast Blog, but the daring amongst you can just downloaded it directly (16Mb mp3), or subscribe to the Wellington Podcast using iTunes.


Related [...]


Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2009/05/wellington/' rel='bookmark' title='Permanent Link: Wellington'>Wellington</a> <small>For a blog called &#8220;Life of Andrew&#8221;, this site doesn&#8217;t...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Bevan McCabe, raconteur and man-about-town, is producing a podcast about this fair city. The first episode has just been released and it turned out rather well.</p>
<p>There is more information at the associated <a href="http://wellingtonpodcast.blogspot.com/">Wellington Podcast Blog</a>, but the daring amongst you can just <a href="http://wellingtonpodcast.podbean.com/mf/web/sr8i68/WellingtonPodcastEpisodeIOctober2009.mp3">downloaded it directly</a> (16Mb mp3), or <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=337012915">subscribe to the Wellington Podcast using iTunes</a>.</p>


<p>Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2009/05/wellington/' rel='bookmark' title='Permanent Link: Wellington'>Wellington</a> <small>For a blog called &#8220;Life of Andrew&#8221;, this site doesn&#8217;t...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://sandfly.net.nz/blog/2009/10/the-wellington-podcast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>500 Impressions in 2 Minutes</title>
		<link>http://sandfly.net.nz/blog/2009/10/500-impressions-in-2-minutes/</link>
		<comments>http://sandfly.net.nz/blog/2009/10/500-impressions-in-2-minutes/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 11:01:46 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Culture]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[scifi]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://sandfly.net.nz/blog/?p=652</guid>
		<description><![CDATA[View at YouTube
This guy is incredible, how does he do that?
Also worth watching, from the same guy:
Wolverine in 30 Seconds
Unemployed Hitman
Terminator Salvation in 60 Seconds
StarTrek in 47 Seconds


Related posts:The Aliens Rap Following up on the epic 10 minute rap summary of...The Phantom Menace Was Not a Very Good Movie I own all of the Star [...]


Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2010/02/the-aliens-rap/' rel='bookmark' title='Permanent Link: The Aliens Rap'>The Aliens Rap</a> <small>Following up on the epic 10 minute rap summary of...</small></li><li><a href='http://sandfly.net.nz/blog/2009/12/the-phantom-menace-was-not-a-very-good-movie/' rel='bookmark' title='Permanent Link: The Phantom Menace Was Not a Very Good Movie'>The Phantom Menace Was Not a Very Good Movie</a> <small>I own all of the Star Wars DVDs except for...</small></li><li><a href='http://sandfly.net.nz/blog/2009/05/film-review-star-trek/' rel='bookmark' title='Permanent Link: Film Review : Star Trek'>Film Review : Star Trek</a> <small>Once again Hollywood dredges up the corpse of a much-loved...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><center><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/xpsfDTbzKwM&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/xpsfDTbzKwM&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br/><a href="http://www.youtube.com/watch?v=xpsfDTbzKwM&#038;feature=related">View at YouTube</a></center></p>
<p>This guy is incredible, how does he do that?</p>
<p>Also worth watching, from the same guy:<br />
<a href="http://www.youtube.com/watch?v=iYSyvIbTAJA">Wolverine in 30 Seconds</a><br />
<a href="http://www.youtube.com/watch?v=vYW1ylAXBTs">Unemployed Hitman</a><br />
<a href="http://www.youtube.com/watch?v=2P7yx3q3m8k">Terminator Salvation in 60 Seconds</a><br />
<a href="http://www.youtube.com/watch?v=RKOGnV2Iasc">StarTrek in 47 Seconds</a></p>


<p>Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2010/02/the-aliens-rap/' rel='bookmark' title='Permanent Link: The Aliens Rap'>The Aliens Rap</a> <small>Following up on the epic 10 minute rap summary of...</small></li><li><a href='http://sandfly.net.nz/blog/2009/12/the-phantom-menace-was-not-a-very-good-movie/' rel='bookmark' title='Permanent Link: The Phantom Menace Was Not a Very Good Movie'>The Phantom Menace Was Not a Very Good Movie</a> <small>I own all of the Star Wars DVDs except for...</small></li><li><a href='http://sandfly.net.nz/blog/2009/05/film-review-star-trek/' rel='bookmark' title='Permanent Link: Film Review : Star Trek'>Film Review : Star Trek</a> <small>Once again Hollywood dredges up the corpse of a much-loved...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://sandfly.net.nz/blog/2009/10/500-impressions-in-2-minutes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Film Review : Moon</title>
		<link>http://sandfly.net.nz/blog/2009/10/film-review-moon/</link>
		<comments>http://sandfly.net.nz/blog/2009/10/film-review-moon/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 10:04:11 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Culture]]></category>

		<guid isPermaLink="false">http://sandfly.net.nz/blog/?p=649</guid>
		<description><![CDATA[Think your job is monotonous? Spare a thought for Sam Bell who comprises the entire crew of the lunar base that supplies the Earth with Helium3. Sam looks after the giant automatic mining machines that rove the Moon&#8217;s surface, sending back the recovered fuel to a world he hasn&#8217;t seen in years. The only thing [...]


Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2009/07/film-review-paper-solder-bumazhnyy-soldat/' rel='bookmark' title='Permanent Link: Film Review : Paper Solder (Bumazhnyy Soldat)'>Film Review : Paper Solder (Bumazhnyy Soldat)</a> <small>The New Zealand Film Festival is on at the moment,...</small></li><li><a href='http://sandfly.net.nz/blog/2009/05/film-review-star-trek/' rel='bookmark' title='Permanent Link: Film Review : Star Trek'>Film Review : Star Trek</a> <small>Once again Hollywood dredges up the corpse of a much-loved...</small></li><li><a href='http://sandfly.net.nz/blog/2010/01/film-review-avatar/' rel='bookmark' title='Permanent Link: Film Review : Avatar'>Film Review : Avatar</a> <small>James Cameron has always been an interesting film maker. Although...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Think your job is monotonous? Spare a thought for Sam Bell who comprises the entire crew of the lunar base that supplies the Earth with Helium3. Sam looks after the giant automatic mining machines that rove the Moon&#8217;s surface, sending back the recovered fuel to a world he hasn&#8217;t seen in years. The only thing to talk to is GERTY &#8211; a banal robot that helps to keep the base functional. </p>
<p>Hardly ideal working conditions, but if that wasn&#8217;t enough real-time communications with home have been cut off. Sam is only able to exchange short, recorded messages with his wife and mining company superiors, and the isolation is beginning to get to him. The good news is that he only has a few more weeks to go before his three year contract is up and he can return to his family. But even a week can be a long time for a man in such a fragile mental state&#8230;</p>
<p>For a low budget sci-fi film, Moon holds up very well. The tone is more reminiscent of more thoughtful films such as 2001 A Space Odyssey rather than the more usual alien infested fare. The plot moves at a fairly slow pace, but the lead actor (Sam Rockwell) and spectacular effects (the outdoor lunar surface looks particularly good) go a long way to make up for it. The one thing I thought was a little grating was that Sam was a fairly unlikable character to watch at times, stubborn and a little dim, but that can be explained by the tense situation &#8211; the film does a good job of putting you inside his one-note life.</p>
<p>Apparently Moon cost only 5 million dollars to make, but manages to both look more impressive and tell a better story than its blockbuster siblings. Highly recommended if you like this sort of thing.</p>


<p>Related posts:<ol><li><a href='http://sandfly.net.nz/blog/2009/07/film-review-paper-solder-bumazhnyy-soldat/' rel='bookmark' title='Permanent Link: Film Review : Paper Solder (Bumazhnyy Soldat)'>Film Review : Paper Solder (Bumazhnyy Soldat)</a> <small>The New Zealand Film Festival is on at the moment,...</small></li><li><a href='http://sandfly.net.nz/blog/2009/05/film-review-star-trek/' rel='bookmark' title='Permanent Link: Film Review : Star Trek'>Film Review : Star Trek</a> <small>Once again Hollywood dredges up the corpse of a much-loved...</small></li><li><a href='http://sandfly.net.nz/blog/2010/01/film-review-avatar/' rel='bookmark' title='Permanent Link: Film Review : Avatar'>Film Review : Avatar</a> <small>James Cameron has always been an interesting film maker. Although...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://sandfly.net.nz/blog/2009/10/film-review-moon/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
