<?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>Square Goldfish</title>
	<atom:link href="http://www.squaregoldfish.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.squaregoldfish.co.uk</link>
	<description>The random jottings of a geometrically precise aquatic lifeform</description>
	<lastBuildDate>Fri, 12 Mar 2010 23:26:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Two bad marketing words joined in awful disharmony</title>
		<link>http://www.squaregoldfish.co.uk/2010/03/12/two-bad-marketing-words-joined-in-awful-disharmony/</link>
		<comments>http://www.squaregoldfish.co.uk/2010/03/12/two-bad-marketing-words-joined-in-awful-disharmony/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 23:26:59 +0000</pubDate>
		<dc:creator>squaregoldfish</dc:creator>
				<category><![CDATA[Marketing]]></category>

		<guid isPermaLink="false">http://www.squaregoldfish.co.uk/?p=288</guid>
		<description><![CDATA[Staedtler have been making excellent highlighters for years. There have been various incarnations, but the basic chunky model is the one that most people think of when the word is mentioned. So what possessed them to give this wonderful tool the godawful name of Textsurfer Classic?
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.squaregoldfish.co.uk/wp-content/uploads/2010/03/textsurfer.jpg"><img src="http://www.squaregoldfish.co.uk/wp-content/uploads/2010/03/textsurfer-300x63.jpg" alt="Textsurfer Classic" title="Textsurfer Classic" width="300" height="63" class="alignright size-medium wp-image-289" /></a>Staedtler have been making excellent highlighters for years. There have been various incarnations, but the basic chunky model is the one that most people think of when the word is mentioned. So what possessed them to give this wonderful tool the godawful name of Textsurfer Classic?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squaregoldfish.co.uk/2010/03/12/two-bad-marketing-words-joined-in-awful-disharmony/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A wireless, headless Linux box</title>
		<link>http://www.squaregoldfish.co.uk/2010/03/11/a-wireless-headless-linux-box/</link>
		<comments>http://www.squaregoldfish.co.uk/2010/03/11/a-wireless-headless-linux-box/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 19:57:07 +0000</pubDate>
		<dc:creator>squaregoldfish</dc:creator>
				<category><![CDATA[Linux/Ubuntu]]></category>

		<guid isPermaLink="false">http://www.squaregoldfish.co.uk/?p=281</guid>
		<description><![CDATA[If you&#8217;re using wireless networking in Ubuntu (or, presumably, most flavours of Linux), you may have noticed that your network doesn&#8217;t connect until you&#8217;ve logged in and the NetworkManager&#8217;s applet has done its thing. This doesn&#8217;t happen for wired networks, where you get a connection as soon as the machine has booted. This is all [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using wireless networking in Ubuntu (or, presumably, most flavours of Linux), you may have noticed that your network doesn&#8217;t connect until you&#8217;ve logged in and the NetworkManager&#8217;s applet has done its thing. This doesn&#8217;t happen for wired networks, where you get a connection as soon as the machine has booted. This is all to do with the extra security requirements of wireless networks, where the user has to select which of the visible networks to connect to, and enter any required passwords. Obviously this can&#8217;t be done before the user has logged in to enter these details.</p>
<p>For the most part this isn&#8217;t a problem, apart from an occasionally annoying delay while the networking is sorted out before you can get down to some serious work avoidance on the Internet. However, if you want to have a headless computer on your wireless network, for use as a server, MythTV box, or a grunt for distributed rendering, you don&#8217;t want to be logging into this machine to get the network going whenever you switch it on. Fortunately, it is possible to get your machine to connect to a wireless network on boot without having to log in. Note that you&#8217;ll have to hard-code which wireless network you&#8217;re connecting to, but since this is a headless server and presumably somewhere in a dusty corner, that shouldn&#8217;t be a problem. So how&#8217;s it done? Well, here goes&#8230;</p>
<p>Before we start, I&#8217;ve made a number of assumptions on your setup, so if your system isn&#8217;t covered here, you may need to do a little more research elsewhere. Sorry, about that, but I can only advise on what I&#8217;ve done with my system.</p>
<ul>
<li>You&#8217;ve already got a working wireless network card in your machine. If you need help setting up drivers for it, I&#8217;m afraid this isn&#8217;t the place. I used the stuff on <a href="http://www.linuxquestions.org/questions/linux-wireless-networking-41/success-netgear-wg311v3-400257/">this page</a> to get my Netgear WG311v3 working.</li>
<li>You&#8217;re using WPA security on your wireless network. I&#8217;m not getting into the arguments here.</li>
</ul>
<p>First off, make sure you have the wpasupplicant package installed, which will handle the security side of the wireless networking for us. (You are using WPA security, right?) It&#8217;s almost certain that this is installed, but we&#8217;d better check now before we cut the machine off from the Internet.</p>
<p>sudo apt-get install wpasupplicant</p>
<p>Now, as I&#8217;ve already mentioned all network connections are handled by the NetworkManager, so if we want to do our own thing we need to get rid of it. Note that once we&#8217;ve done this your machine won&#8217;t have any network access, so make sure you&#8217;ve got another machine close by in case of need. You can do this in two ways – either disable NetworkManager (something of an arcane process), or more simply (and the way I did it) remove the relevant packages:</p>
<p>sudo apt-get remove network-manager network-manager-gnome</p>
<p>OK, so now you have a machine with no networking capability at all. Never fear, though: your machine will soon be out of solitary confinement. Using your favourite text editor in sudo mode, edit the file /etc/network/interfaces and set it up as follows:</p>
<pre>
auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp

wpa-ap-scan 1
pre-up sudo /sbin/wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Dwext -B
pre-up sleep 5
post-down sudo killall -q wpa_supplicant
</pre>
<p>So, what has this done? Well, the first couple of lines set up the loopback network device, which is used for all sorts of things in Linux. Don&#8217;t ever get rid of this unless you like a lot of pain in your life. </p>
<p>The second two lines tell the system that we want the wlan0 interface (that&#8217;s the wireless one) to start get going automatically, and acquire and IP address through DHCP. The final chunk tells the system how to go about setting up the connection:</p>
<pre>wpa-ap-scan 1
</pre>
<p>This setting means that the ESSID of your wireless network is publicly visible. If your router hides the ESSID, set this to 2.</p>
<pre>
pre-up sudo /sbin/wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Dwext -B
pre-up sleep 5
</pre>
<p>This specifies the command to be used to set up the wireless connection. -i is the name of the interface, -c specifies the location of the configuration file (more on this in a moment), and -B runs wpa_supplicant in the background (very important!). The -D option sets the type of driver to be used. The wext driver is fine in most cases, even if you&#8217;ve set up your network card&#8217;s drivers through ndiswrapper.</p>
<p>The final stage is to configure wpa_supplicant so it knows about your wireless network. In the interfaces file, we specified that the configuration file is located at /etc/wpa_supplicant.conf, so edit that file. The contents of the configuration file should be as follows:</p>
<pre>
ctrl_interface=/var/run/wpa_supplicant

network={
        ssid="&lt;your SSID&gt;"
        psk="&lt;your wireless network's password&gt;"
        proto=RSN WPA
        key_mgmt=WPA-PSK
        pairwise=CCMP TKIP
}
</pre>
<p>The ctrl_interface line tells wpa_supplicant where to dump any information it needs while it&#8217;s running. The setting here is the default, and I see no reason to change it. Below that is simply the details of your wireless network. Note that the ssid and  psk value must be in quotes. The other values seem to work well for most wireless network situations.</p>
<p>That should be all you need to do. To see if it&#8217;s worked, reboot the machine. If you&#8217;ve set up an SSH server, you should be able to log in remotely straight away. Or, take a look at the list of devices connected to your wireless router, and you should see that it&#8217;s connected itself without your intervention. Now you can stick the machine in its dusty corner and let it do its thing.</p>
<p>The wireless network card in my machine unfortunately doesn&#8217;t support Wake-On-LAN. If it did, I could stick my server in the attic and never look at it again. Maybe I&#8217;ll try that one day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squaregoldfish.co.uk/2010/03/11/a-wireless-headless-linux-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When I die, think only this of me: Blimey, this is difficult!</title>
		<link>http://www.squaregoldfish.co.uk/2010/03/09/when-i-die-think-only-this-of-me-blimey-this-is-difficult/</link>
		<comments>http://www.squaregoldfish.co.uk/2010/03/09/when-i-die-think-only-this-of-me-blimey-this-is-difficult/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 10:15:26 +0000</pubDate>
		<dc:creator>squaregoldfish</dc:creator>
				<category><![CDATA[Ramblings]]></category>

		<guid isPermaLink="false">http://www.squaregoldfish.co.uk/?p=272</guid>
		<description><![CDATA[The tradition of observing a minute&#8217;s silence to commemorate the personal sacrifice of military personnel in past battles has undergone a certain evolution through time, transforming into the preferred method of marking the passing of any figure of public note. This is most noticeable in sports arenas, where the entire crowd is asked to remember [...]]]></description>
			<content:encoded><![CDATA[<p>The tradition of observing a minute&#8217;s silence to commemorate the personal sacrifice of military personnel in past battles has undergone a certain evolution through time, transforming into the preferred method of marking the passing of any figure of public note. This is most noticeable in sports arenas, where the entire crowd is asked to remember the person in question for a minute prior to the day&#8217;s match. This is an excellent approach: the ceremony, brief and relatively informal though it is, can be held in focus by those who feel most affected. (Note that I use the phrase &#8216;most affected&#8217; to differentiate the sports fans from the general population as a whole; the fans&#8217; feelings can in no way match those of the departed&#8217;s friends and family.)</p>
<p>In recent years, the minute&#8217;s silence at sports grounds has been replaced by the minute&#8217;s applause. Whether it&#8217;s thought that using the universal sound of appreciation is more appropriate to sporting and entertainment figures than the more sombre requirements of people killed in battle, or whether it&#8217;s to cover for the fact that a reasonable proportion of football fans are unable to focus on anything for a full minute (or at least stand still for that length of time) is unclear, but it certainly seems more fitting in its context.</p>
<p>I&#8217;ve been thinking about all this since listening to a program on commemorating the war dead on Radio 4 this morning, and wondering how I&#8217;d like my passing to be commemorated. I am reminded of the example of Jeremy Hardy, who once said:</p>
<p>“I would quite like to die in a way that causes maximum inconvenience to others – on an escalator, or while having my blood pressure taken. Or at somebody else&#8217;s funeral. Attention-seeking to the last.”</p>
<p>As a comedian, it&#8217;s understandable that Jeremy wants to get as much attention as possible, and it will certainly cause a few people to remember his passing. For myself, I prefer to cause as little consternation amongst large groups of people as I can, so lasting remembrance is unlikely to come my way through this route.</p>
<p>I believe I fit into that category of people who will never amount to much on the world stage, and will pass on with no corresponding outpouring of public emotion. However, should a large group of people feel that I&#8217;m worthy of being commemorated in a public act, I will at least want people to remember that. So neither a minute&#8217;s silence for me, nor a minute&#8217;s applause. I want a minute&#8217;s hopping on the spot. It would look ridiculous and unseemly, and most would fail in the attempt, but the thought amuses me and it should (if done properly) amuse everyone who&#8217;s trying to hop too. You may not wish to hop, and that&#8217;s your right, and I won&#8217;t be upset (I&#8217;ll be rotting). But you should be amused, and if you&#8217;re not I don&#8217;t want you commemorating me at all, you miserable sod.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squaregoldfish.co.uk/2010/03/09/when-i-die-think-only-this-of-me-blimey-this-is-difficult/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gnomine Icon</title>
		<link>http://www.squaregoldfish.co.uk/2010/02/06/gnomine-icon/</link>
		<comments>http://www.squaregoldfish.co.uk/2010/02/06/gnomine-icon/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 10:45:24 +0000</pubDate>
		<dc:creator>squaregoldfish</dc:creator>
				<category><![CDATA[Icons]]></category>

		<guid isPermaLink="false">http://www.squaregoldfish.co.uk/?p=266</guid>
		<description><![CDATA[A new icon for Gnomine, the GNOME Minsweeper clone. You can download it from the Icons page.
]]></description>
			<content:encoded><![CDATA[<p><img alt="Gnomine Icon" src="http://www.squaregoldfish.co.uk/linux_icons/gnomine.png" title="Gnomine icon" class="alignright" width="48" height="48" /><br />
A new icon for Gnomine, the GNOME Minsweeper clone. You can download it from the <a href="http://www.squaregoldfish.co.uk/software/linux-icons/">Icons page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squaregoldfish.co.uk/2010/02/06/gnomine-icon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your backup strategy</title>
		<link>http://www.squaregoldfish.co.uk/2010/02/04/your-backup-strategy/</link>
		<comments>http://www.squaregoldfish.co.uk/2010/02/04/your-backup-strategy/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 17:40:36 +0000</pubDate>
		<dc:creator>squaregoldfish</dc:creator>
				<category><![CDATA[Computing]]></category>

		<guid isPermaLink="false">http://www.squaregoldfish.co.uk/?p=255</guid>
		<description><![CDATA[Yes, there&#8217;s approximately 8,390,000 articles on this subject already, but it seems that people still don&#8217;t get it. In the vain hope of 8,390,001 articles doing the job instead, here goes:
BACK. UP. YOUR. FRICKIN&#8217;. DATA. If you don&#8217;t, you&#8217;ve got no-one to blame but yourself when it all goes Pete Tong and you lose it.
There [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, there&#8217;s approximately <a href=" http://www.google.co.uk/search?q=backup+strategy&#038;ie=utf-8&#038;oe=utf-8&#038;aq=t&#038;rls=com.ubuntu:en-US:offi" target=_blank>8,390,000</a> articles on this subject already, but it seems that people still don&#8217;t get it. In the vain hope of 8,390,001 articles doing the job instead, here goes:</p>
<p>BACK. UP. YOUR. FRICKIN&#8217;. DATA. If you don&#8217;t, you&#8217;ve got no-one to blame but yourself when it all goes <a href="http://img.dailymail.co.uk/i/pix/2007/07_02/PeteTong_468x474.jpg" target="_blank">Pete Tong</a> and you lose it.</p>
<p>There are numerous strategies for this, but here&#8217;s mine:</p>
<p>First, buy two external hard drives. Yes, two. Keeping one backup next to your computer is a waste of time. When the <a href="http://www.su.nottingham.ac.uk/asset/news/6001/Community-campaigns-033.jpg/?thumbnail_width=200&#038;thumbnail_height=160&#038;resize_type=fitall" target="_blank">nasty burglars</a> sneak in, or <a href="http://plus.maths.org/issue51/interview/monster.jpg" target="_blank">fire monster</a> comes calling, you&#8217;ll lose the backup with the computer, which kind of defeats the point. So, buy two external drives, and keep one outside the house &#8211; at the office, with a friend, wherever. But I precede myself.</p>
<p>When your backup drives arrive, take a moment to enjoy the <a href="http://www.channel4.com/4homes/images/mb/Channel4/4homes/christmas/christmas-wrapping-ideas/Shiny-Coloured-Presents-Lg--gt_full_width_landscape.jpg" target="_blank">shiny wrapping</a>. It&#8217;s always worth treasuring new stuff, however <a href="http://www.string-or-nothing.com/content/imgs/lionsox.jpg" target="_blank">mundane</a> the item.</p>
<p>Plug in your first drive, and back up the data you need (a word on how to do this in a moment). I don&#8217;t back up my whole hard drive, as I&#8217;m happy enough to reinstall stuff from scratch if I need to. I just back up my documents, photos, movies and that kind of thing &#8211; the stuff I can&#8217;t get from anywhere else, or would take too much time to find again. If you want to protect your entire hard drive, and copy absolutely everything, that&#8217;s fine too. Once the backup is complete, repeat the backup for the second drive.</p>
<p>You now have two backups of your data. Good. Take one of the hard drives away from the house, and leave it somewhere safe. This is your off-site backup, and will be handy if the fire, burglars, or burglars on fire come and destroy your home. Keep the other drive at home, and every few days, update the backup. This is your short-term fallback in case your computer dies, or you accidentally delete an important file.</p>
<p>Over time, your off-site backup will obviously become out of date, and be less and less useful. So every few weeks, swap the two backup drives. This way, if the worst comes to the worst, you won&#8217;t lose too much stuff. There&#8217;s a trade-off here between convenience and the security of your data, so come to a compromise to suit your circumstances. Never, let your off-site backup languish in a drawer for 6 months though &#8211; an out of date backup is almost as useless as none at all.</p>
<p>When it comes to backup software, there&#8217;s plenty of options out there that will do the job. Some specialise in copying entire hard drives if that&#8217;s your bag, and others are better at dealing with selected sets of files. As a massive geek, I only ever use the Linux rsync tool, so I can&#8217;t comment on any specific software package. There&#8217;s more options, reviews and opinions in the world than you&#8217;ll ever need, so find something that works for you. The real key is to find something that will make your backing up as simple as possible &#8211; the harder it is, the less likely you are to bother doing it. And that way lies <a href="http://msrb.files.wordpress.com/2007/12/mushroom-cloud-hb.jpg" target="_blank">disaster</a>.</p>
<p>That&#8217;s it. Simple. Now go and do it, unless your data is worthless to you, and <a href="http://www.jennibrownwrites.com/wp-content/uploads/2009/07/liar.gif" target="_blank">I doubt that very much</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squaregoldfish.co.uk/2010/02/04/your-backup-strategy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unfair parking fines and strange coins</title>
		<link>http://www.squaregoldfish.co.uk/2010/02/03/unfair-parking-fines-and-strange-coins/</link>
		<comments>http://www.squaregoldfish.co.uk/2010/02/03/unfair-parking-fines-and-strange-coins/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 00:47:06 +0000</pubDate>
		<dc:creator>squaregoldfish</dc:creator>
				<category><![CDATA[Dreams]]></category>

		<guid isPermaLink="false">http://www.squaregoldfish.co.uk/?p=248</guid>
		<description><![CDATA[A bunch of us arrived for Frisbee training by bicycle, and parked up in the local pay and display car park near John Bunyan&#8217;s cottage, next to the local pub (strangely not the John Bunyan). We chained our bikes along the fence to keep out of everyone&#8217;s way. For some reason, all but two of [...]]]></description>
			<content:encoded><![CDATA[<p>A bunch of us arrived for <a href="http://www.ukultimate.com/" target="_blank">Frisbee training</a> by bicycle, and parked up in the local pay and display car park near <a href="http://www.thetangiblepast.com/2008/08/john-bunyans-chimney-hertfordshire.html" target="_blank">John Bunyan&#8217;s cottage</a>, next to the local pub (strangely not the <a href="http://www.thegoodpubguide.co.uk/pub/view/John-Bunyan-AL4-8ES" target="_blank">John Bunyan</a>). We chained our bikes along the fence to keep out of everyone&#8217;s way. For some reason, all but two of us bought car park tickets and attached them to the bikes &#8211; I and one other didn&#8217;t, as it didn&#8217;t really seem necessary.</p>
<p>Just as we were heading to the pitches, the parking attendant arrived and began writing up fines for the two bikes that weren&#8217;t displaying tickets. I quickly tried to buy a ticket from the machine before my fine was completed, but failed. However, in trying to extract my ticket, the machine spat out a load of coins, which I pocketed. Having failed to prevent my fine being issued, I went to training.</p>
<p>On our return, we inspected the tickets we&#8217;d been given. I had a £50 fine for failing to display a valid parking ticket. The other non-ticket-holder had the same fine, plus and extra £100 fine for having his vehicle facing the wrong way. Since this isn&#8217;t an offence, and in any case a bike could be picked up and turned around by hand, we were understandably livid. Closer inspection also revealed that the parking attendant was getting kickbacks from the pub &#8211; in lieu of a discount for early payment, the fines would be waived if we agreed to spend at least 50% of the fine amount on food therein.</p>
<p>Back at my parents&#8217; house some time later, I looked at the selection of coins I&#8217;d received from the parking machine. They included:</p>
<ul>
<li>Two copper fifty pence pieces from 1941, with very sharp corners.</li>
<li>One two pence piece from 1870, depicting an incredibly fat, almost spherical <a href="http://www.royal.gov.uk/HistoryoftheMonarchy/KingsandQueensoftheUnitedKingdom/TheHanoverians/Victoria.aspx" target="_blank">Queen Victoria</a>.</li>
<li>One wildly impractical &#8216;coin&#8217;, a rectangle measuring some 6 inches by 4 inches, commemorating the feats of a famous quarterback in the NFL. The value of this coin was $14.</li>
</ul>
<p>At this point I remembered how utterly furious I was with the unfair parking fines, and woke up in a bad mood.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squaregoldfish.co.uk/2010/02/03/unfair-parking-fines-and-strange-coins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>R, the acf function and statistical significance</title>
		<link>http://www.squaregoldfish.co.uk/2010/01/20/r-the-acf-function-and-statistical-significance/</link>
		<comments>http://www.squaregoldfish.co.uk/2010/01/20/r-the-acf-function-and-statistical-significance/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 12:33:23 +0000</pubDate>
		<dc:creator>squaregoldfish</dc:creator>
				<category><![CDATA[R]]></category>

		<guid isPermaLink="false">http://www.squaregoldfish.co.uk/?p=236</guid>
		<description><![CDATA[The R language provides us with a useful method to calculate the autocorrelation function (ACF) of a time series. An example of an environmental time series with a seasonal cycle is shown below, with the resulting plot:

corr ]]></description>
			<content:encoded><![CDATA[<p>The R language provides us with a useful method to calculate the autocorrelation function (ACF) of a time series. An example of an environmental time series with a seasonal cycle is shown below, with the resulting plot:</p>
<pre>
corr <- acf(series, lag.max=288,type="correlation",plot=TRUE,na.action=na.pass)
</pre>
<p>(My data set has some missing values, hence the na.action=na.pass parameter.)<br />
<div id="attachment_237" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.squaregoldfish.co.uk/wp-content/uploads/2010/01/R-acf-sig.png"><img src="http://www.squaregoldfish.co.uk/wp-content/uploads/2010/01/R-acf-sig-300x300.png" alt="Plot from R&#039;s acf function" title="R-acf-sig" width="300" height="300" class="size-medium wp-image-237" /></a><p class="wp-caption-text">The output of the acf function (click to enlarge)</p></div></p>
<p>As well as the calculated ACF, we can see two blue dashed lines across the plot. These lines indicate the point of statistical significance - values between these lines and zero are not statistically significant, while those above and below the lines (towards one and minus one) are significant.</p>
<p>In some cases, it would be useful to know what this value is, so we can determine whether individual values from the ACF are significant or not. Unfortunately, the output of R's acf function doesn't make it available to us.</p>
<p>A hunt through the source code of the acf function gives us the information we need. We can calculate the significance level as follows:</p>
<pre>
corr <- acf(series, lag.max=288,type="correlation",plot=TRUE,na.action=na.pass)
significance_level <- qnorm((1 + 0.95)/2)/sqrt(corr$n.used)
</pre>
<p>The 0.95 parameter indicates that we calculate the correlation at which values are significant to the 95% level - you can change this as you see fit.</p>
<p>Note that the significance is a function of the number of data points you have - the more points, the closer to zero the significance level will be, and the more confidence you can have in your ACF.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squaregoldfish.co.uk/2010/01/20/r-the-acf-function-and-statistical-significance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated Songbird Icon</title>
		<link>http://www.squaregoldfish.co.uk/2010/01/09/updated-songbird-icon/</link>
		<comments>http://www.squaregoldfish.co.uk/2010/01/09/updated-songbird-icon/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 21:28:46 +0000</pubDate>
		<dc:creator>squaregoldfish</dc:creator>
				<category><![CDATA[Icons]]></category>

		<guid isPermaLink="false">http://www.squaregoldfish.co.uk/?p=227</guid>
		<description><![CDATA[The Songbird icon has been updated with the newest, none-more-black version of the application icon (from Songbird 1.4.1). You can download it from the Icons page.
Update 03/03/2010: Fixed the download link.
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.squaregoldfish.co.uk/wp-content/uploads/2010/01/songbird-256_inline.png" alt="Songbirdi icon" title="Songbird icon" width="100" height="100" class="alignright size-full wp-image-233" /><br />
The Songbird icon has been updated with the newest, none-more-black version of the application icon (from Songbird 1.4.1). You can download it from the <a href="http://www.squaregoldfish.co.uk/software/linux-icons/">Icons page</a>.</p>
<p><strong>Update 03/03/2010:</strong> Fixed the download link.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squaregoldfish.co.uk/2010/01/09/updated-songbird-icon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DVDs that won&#8217;t play in Linux, and how to make them behave</title>
		<link>http://www.squaregoldfish.co.uk/2010/01/08/dvds-that-wont-play-in-linux-and-how-to-make-them-behave/</link>
		<comments>http://www.squaregoldfish.co.uk/2010/01/08/dvds-that-wont-play-in-linux-and-how-to-make-them-behave/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 21:16:21 +0000</pubDate>
		<dc:creator>squaregoldfish</dc:creator>
				<category><![CDATA[Linux/Ubuntu]]></category>

		<guid isPermaLink="false">http://www.squaregoldfish.co.uk/?p=201</guid>
		<description><![CDATA[Playing DVDs in Linux is generally a pretty painless process. The libdvdcss library does a sterling job of allowing us to watch our DVDs on legitimate hardware using the operating system of our choice, legal machinations notwithstanding. It also manages to circumvent the region encoding of the DVD (an abitrary and legally dubious restriction), allowing [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_218" class="wp-caption alignright" style="width: 170px"><img src="http://www.squaregoldfish.co.uk/wp-content/uploads/2010/01/PeopleLikeUs.png" alt="People Like Us DVD" title="People Like Us DVD" width="160" height="225" class="size-full wp-image-218" /><p class="wp-caption-text">People Like Us. Except when we can't see them.</p></div><br />
Playing DVDs in Linux is generally a pretty painless process. The libdvdcss library does a sterling job of allowing us to watch our DVDs on legitimate hardware using the operating system of our choice, legal machinations notwithstanding. It also manages to circumvent the region encoding of the DVD (an abitrary and legally dubious restriction), allowing you to play DVDs from any region in your player without intervention. At least, most of the time it does; there are a few DVDs in the wild that libdvdcss can&#8217;t access unless the drive is set to the correct region.</p>
<p>I came across one example of this recently, when I bought People Like Us Season 2. It seems that this was only ever released in Australia, and as such is a region 4 disc. I&#8217;m in the UK, and so have (I assumed &#8211; more on this shortly) a region 2 DVD drive in my machine. Most of the time this isn&#8217;t a problem &#8211; I have DVDs from most regions in my collection, and so far they&#8217;ve all played just fine. This one, however, wouldn&#8217;t play ball. When I tried to play the DVD, mplayer took ten minutes to do anything, and then it couldn&#8217;t play all the tracks. A quick look at the libdvdread activity revealed the problem:</p>
<pre>
libdvdread: Using libdvdcss version 1.2.10 for DVD access
There are 8 titles on this DVD.
There are 1 angles in this DVD title.

libdvdread: Attempting to retrieve all CSS keys
libdvdread: This can take a _long_ time, please be patient

libdvdread: Get key for /VIDEO_TS/VIDEO_TS.VOB at 0x00000152
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_0.VOB at 0x000001c2
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x0000ac4a
libdvdread: Elapsed time 1
libdvdread: Get key for /VIDEO_TS/VTS_02_0.VOB at 0x0000dd3b
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_1.VOB at 0x0000dd92
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_0.VOB at 0x0000f04c
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_1.VOB at 0x0000f0a3
libdvdread: Elapsed time 46
libdvdread: Get key for /VIDEO_TS/VTS_04_0.VOB at 0x000a7da2
libdvdread: Elapsed time 1
libdvdread: Get key for /VIDEO_TS/VTS_04_1.VOB at 0x000a7df9
libdvdread: Error cracking CSS key for /VIDEO_TS/VTS_04_1.VOB (0x000a7df9)!!
libdvdread: Elapsed time 303
libdvdread: Get key for /VIDEO_TS/VTS_05_0.VOB at 0x001416de
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_05_1.VOB at 0x00141735
libdvdread: Error cracking CSS key for /VIDEO_TS/VTS_05_1.VOB (0x00141735)!!
libdvdread: Elapsed time 249
libdvdread: Get key for /VIDEO_TS/VTS_06_0.VOB at 0x001d8a51
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_06_1.VOB at 0x001d8aa8
libdvdread: Error cracking CSS key for /VIDEO_TS/VTS_06_1.VOB (0x001d8aa8)!!
libdvdread: Elapsed time 259
libdvdread: Get key for /VIDEO_TS/VTS_07_0.VOB at 0x002754ed
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_07_1.VOB at 0x00275544
libdvdread: Elapsed time 18
libdvdread: Get key for /VIDEO_TS/VTS_08_0.VOB at 0x0030a0a4
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_08_1.VOB at 0x0030a0fb
libdvdread: Elapsed time 1
libdvdread: Found 8 VTS's
libdvdread: Elapsed time 878
</pre>
<p>The CSS tracks for three of the titles on the disc couldn&#8217;t be extracted, and those titles wouldn&#8217;t play. This left me with a problem &#8211; a DVD that I couldn&#8217;t watch. Since I knew that I could watch all my other DVDs, I set about finding out how to change my DVD drive to region 4; I could then play my new Australian DVD, and still be able to play my current collection. This is important &#8211; most drives will only allow you to change the region a set number of times (usually five), so I couldn&#8217;t afford to keep chopping and changing the region.</p>
<p>The Linux utility regionset (available in the Universe repository in Ubuntu) allows you to view and change the region code of your DVD drive. Having installed regionset, I ran to it change my region:</p>
<pre>
$ regionset
regionset version 0.1 -- reads/sets region code on DVD drives
Current Region Code settings:
RPC Phase: II
type: NONE
vendor resets available: 4
user controlled changes resets available: 5
drive plays discs from region(s):, mask=0xFF

Would you like to change the region setting of your drive? [y/n]:
</pre>
<p>This is an interesting result &#8211; it seems that my DVD drive had no region set at all. I would have thought a drive sold in the UK would be pre-set to region 2, but perhaps the region is left to be set the first time you play a DVD. Who knows? For our purposes, it doesn&#8217;t matter. I decided that I would like to change my DVD&#8217;s region:</p>
<pre>
Would you like to change the region setting of your drive? [y/n]:y
Enter the new region number for your drive [1..8]:4
</pre>
<p>Once I&#8217;d entered that, my DVD region was changed:</p>
<pre>
$ regionset
regionset version 0.1 -- reads/sets region code on DVD drives
Current Region Code settings:
RPC Phase: II
type: SET
vendor resets available: 4
user controlled changes resets available: 3
drive plays discs from region(s): 4, mask=0xF7
</pre>
<p>So I now have an Australian DVD drive, which can play my Australian DVD. (My reset count has dropped by two because of my inability to type the number 4 on the first attempt.) I tried a few of my DVDs from other regions, and they still played just fine, so all is well. Or is it? As well as my main desktop machine, I sometimes watch DVDs on my laptop, as well as my work laptop when I&#8217;m travelling. Do I have to go through all this to play People Like Us on those machines too?</p>
<p>From previous encounters with libdvdcss, I knew that it kept its decrypted DVD keys cached in my home directory, ~/.dvdcss. I wondered if I could simply copy the cached key for the People Like Us DVD onto my other machines. I had a look in the cache directory, and found the sub-directory for People Like Us. Luckily, most DVDs are easily identifiable:</p>
<pre>
...
MY_NAME_IS_EARL_S1_DISC_4-2006090710551600-1bf2fbef18
MY_NAME_IS_EARL_SEASON2_DISC3
MY_NAME_IS_EARL_SEASON2_DISC4
PEOPLE_LIKE_US_SERIES2-2007081517503500-19deac38e6
PHOENIX_NIGHTS
POLICE_SQUAD
PORRIDGE
...
</pre>
<p>I copied the PEOPLE_LIKE_US directory to a thumb drive, and took it to my laptop. Having confirmed that this machine couldn&#8217;t play the DVD either, I installed the copied keys into the ~/.dvdcss directory and tried again. Voilà! Instant entertainment from Australia, and I still have all my region changes intact.</p>
<p>In summary, then: if you find a DVD that takes ages to start playing, and doesn&#8217;t fully work, the chances are that your DVD is set to the wrong (or no) region. Use the regionset tool to set your DVD drive&#8217;s region, or find someone who&#8217;s already watched the DVD, and ask them for a copy of the decryption keys.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squaregoldfish.co.uk/2010/01/08/dvds-that-wont-play-in-linux-and-how-to-make-them-behave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The ultimate get-rich-quick scheme</title>
		<link>http://www.squaregoldfish.co.uk/2010/01/01/the-ultimate-get-rich-quick-scheme/</link>
		<comments>http://www.squaregoldfish.co.uk/2010/01/01/the-ultimate-get-rich-quick-scheme/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 14:37:11 +0000</pubDate>
		<dc:creator>squaregoldfish</dc:creator>
				<category><![CDATA[Ramblings]]></category>

		<guid isPermaLink="false">http://82.21.147.247/?p=189</guid>
		<description><![CDATA[Since my email address is reasonably easily accessible on the Internet (I make no specific attempts to hide it), I get a fairly decent amount of spam. As an experiment, I thought I&#8217;d keep track of all the money I&#8217;m offered, just to see how rich I could be if only I bothered to respond [...]]]></description>
			<content:encoded><![CDATA[<p>Since my email address is reasonably easily accessible on the Internet (I make no specific attempts to hide it), I get a fairly decent amount of spam. As an experiment, I thought I&#8217;d keep track of all the money I&#8217;m offered, just to see how rich I could be if only I bothered to respond to all the generous people who contact me.</p>
<p>In the 31 days of December 2009, I was offered a grand total of £105,668,800. £3.4 million per day, £142,000 per hour, or £395 per second. Not bad.</p>
<p>This sum includes $5 million that Michael Jackson apparently left me in his will, for being a special fan. Now, since I only bought one of his albums way back in 1989, I wouldn&#8217;t have thought I&#8217;d have made it onto Michael&#8217;s fan radar, but clearly this was one extremely generous man.</p>
<p>There are several implications to this. First, exactly how much money did Mr Jackson give away in his will? Even if we take Wikipedia&#8217;s conservative estimate of <a href="http://en.wikipedia.org/wiki/Thriller_%28album%29">65 million copies of Thriller sold</a>, at $5 million per purchase, that&#8217;s $325 trillion straight away. And that&#8217;s just one album. No wonder there&#8217;s been a financial crisis &#8211; Michael Jackson had all the money in the world, plus a whole lot more that he wasn&#8217;t telling anyone about.</p>
<p>Second, someone must be doing some serious detective work. Just like several people I know, I wasn&#8217;t buying albums online in 1989. Tracking down the origin of a cash purchase to me (I was only 12, and credit card companies weren&#8217;t as generous then as they have been of late), tracing the various changes of address I&#8217;ve been through since then (eight, by my reckoning), and linking it all to my email address to let me know of this wonderful gift is a phenomenal achievement. The networks of collected information must be enormous. Big brother may well be watching us, but it&#8217;s OK &#8211; he&#8217;s only doing it so he can give us all lots of money.</p>
<p>The upshot of all this is that my money worries seem to be over. Except for where to keep it all. I&#8217;m not sure there&#8217;s a bank that I can trust at the moment, and if I want to keep it under my mattress, I&#8217;m going to have to raise the bedroom ceiling and buy a ladder.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.squaregoldfish.co.uk/2010/01/01/the-ultimate-get-rich-quick-scheme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
