<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Haeg.in</title>
 <link href="http://haeg.in/atom.xml" rel="self"/>
 <link href="http://haeg.in/"/>
 <updated>2011-11-28T15:47:27+00:00</updated>
 <id>http://haeg.in/</id>
 <author>
   <name>Harry Mills</name>
   <email>harry@haeg.in</email>
 </author>

 
 <entry>
   <title>Final Year Project</title>
   <link href="http://haeg.in/project/final-year-project/"/>
   <updated>2011-11-28T00:00:00+00:00</updated>
   <id>http://haeg.in/project/final-year-project</id>
   <content type="html">&lt;p&gt;I'm warning you all in advance, I'm using this category to post completely irrational rant posts about my final year project. Inevitably there are going to be times when I'm bashing at something for ages and then find it's just one simple thing I'd overlooked or one weirdness in how the code is done that I'd missed. For these times, this is the place I'm going to vent.&lt;/p&gt;

&lt;p&gt;Now having said all that, my first rant is at Java and the Eclipse team. One of the classes that was used by the Eclipse plugin I'm continuing the development on was using a deprecated class and this is what I found when I went to get more information about it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/java-obfuscated-documentation.png&quot; alt=&quot;Rather obfuscated documentation&quot; /&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Free CS Course Texts</title>
   <link href="http://haeg.in/comp-sci/free-cs-course-texts/"/>
   <updated>2011-02-21T00:00:00+00:00</updated>
   <id>http://haeg.in/comp-sci/free-cs-course-texts</id>
   <content type="html">&lt;p&gt;During my studies at the University of York I've found or been recommended various computer science textbooks that are available online. Since I got bored of looking through my history to find them again I've compiled them into a list here. I'll try to keep it up to date.&lt;/p&gt;

&lt;h2&gt;Programming&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://mitpress.mit.edu/sicp/&quot;&gt;Structure and Interpretation of Computer Programs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Concurrency&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.usingcsp.com/&quot;&gt;C. A. R Hoare - Communicating Sequential Processes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://web.comlab.ox.ac.uk/people/Bill.Roscoe/publications/68b.pdf&quot;&gt;A. W. Roscoe - The Theory and Practice of Concurrency&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Cryptography&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.cacr.math.uwaterloo.ca/hac/&quot;&gt;Handbook of Applied Cryptography&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>The Death of RSS?</title>
   <link href="http://haeg.in/web/the-death-of-rss%3F/"/>
   <updated>2011-01-04T00:00:00+00:00</updated>
   <id>http://haeg.in/web/the-death-of-rss?</id>
   <content type="html">&lt;p&gt;So I recently read an &lt;a href=&quot;http://camendesign.com/blog/rss_is_dying&quot; title=&quot;RSS Is [Being Ignored], and You Should Be Very Worried&quot;&gt;article about the death of RSS&lt;/a&gt; after &lt;a href=&quot;http://twitter.com/martinpickett&quot;&gt;Martin Pickett&lt;/a&gt; linked to it on &lt;a href=&quot;http://twitter.com&quot;&gt;Twitter&lt;/a&gt;. It's an interesting article and one I pretty much agree wholeheartedly with but a few things came to mind while reading it.&lt;/p&gt;

&lt;p&gt;Firstly the idea that Twitter or Facebook will replace RSS is, as the article says, certainly very worrying. As a big fan of RSS I'm fairly confident I won't ever be using Twitter or Facebook to follow the websites I currently follow in Google Reader but I'm not sure about other members of my family.&lt;/p&gt;

&lt;p&gt;Firstly there is my Mum. She is well out of the 3% - 7% of users that Mozilla claim use the RSS button on the toolbar. I'm pretty sure she doesn't have a clue about what RSS is and she isn't really that interested. She doesn't check enough websites to really have any benefit in using RSS, after all, all the important stuff is in newspapers and on the news at 10 right?&lt;/p&gt;

&lt;p&gt;Then there is my Dad. He is more clued up and I'm fairly certain he has heard about RSS though I'm not sure he actually uses it but that's more because he doesn't follow anything on it. Mainly due to lack of time - he ends up checking his emails last thing at night before he goes to sleep and that's about as much time as he spends on his computer when not at work on an average night. He may use RSS at work but I don't think so. His company only seems to like technology with a buzzword and RSS never got popular enough to really become a buzzword.&lt;/p&gt;

&lt;p&gt;Finally there are my sisters - both moderately tech savvy but certainly not power users. I'm also 95% sure neither of them use RSS either. One gets news from newspapers, one gets it by word of mouth from her friends and through the news.&lt;/p&gt;

&lt;p&gt;Now to come back to the idea of Twitter/Facebook replacing RSS. None of the other members of my family have any interest in getting a Twitter account. Despite me having explained it several times to them they still don't see the point and think it's largely full of people 'twitting' about what they are doing or eating every five minutes. I've given up on selling it to them - I'm certain that if they did understand it's raison d'être they still wouldn't use it.&lt;/p&gt;

&lt;p&gt;Facebook however is possibly more of a worry. Three of the four of them have Facebook accounts, though Dad has only just really started using his now he's found out how to upload photos to it. I still don't really see Facebook being somewhere any of them go to follow websites though. Granted this is largely because they don't seem to have a need for RSS at the moment but more because they all still see Facebook as it was two years ago - a website for socialising with your friends, not some sellout corporate whore of a site which just wants to farm as much information out of you as fast as possible so it can sell your life for a quick buck all while keeping you entertained running the lastest 'Ville game while your brain turns to goo and drips out of your ears.&lt;/p&gt;

&lt;p&gt;I think that while the article is right in that RSS isn't getting enough support from browser manufacturers (I wonder if this could be fixed using a Google Chrome extension - I've already added one to put the subscribe to RSS button back into my location bar) the idea of RSS being replaced by Facebook or Twitter isn't that worrying to me - techie people know RSS is there and will continue to use it even if they do have to delve into the source code of a page to get to the feed url and non-techie people don't (yet) see Facebook or Twitter as URL services - they are still social networking sites where you chat and share things with friends and as these sites don't want to change that.&lt;/p&gt;

&lt;p&gt;Despite Facebook adding Like buttons to absolutely everything they don't really want you Liking a website so you find out what new stuff they post on the web, they want you to use the rest of their service - if they only wanted to find out what websites you visit regularly they'd just build a social browser and harvest the data through that. No, to provide the complete profile of a user they need as much information as possible which means users have to 'like' things because they actually like them, not because that tells them when websites update otherwise the metaphor breaks and users won't know why they should like things that aren't websites, after all, ice cream flavours won't be posting new articles will they?&lt;/p&gt;

&lt;p&gt;In summary I guess I agree that RSS is massively underutilised by the browser manufacturers and deserves a much higher place in how we view the web and I expect that if anyone provides this then it'll be Mozilla with Firefox. Google want you to visit sites - then you see more adverts, and Microsoft are still too busy trying to make a browser that doesn't completely suck and might be vaguely competative. Safari isn't cross platform enough - it might run on Windows but even the Apple fans I know admit it's full of bloat on Windows and then that leaves Opera who seem to play their own game and come up with cool things every once in a while but can largely be ignored.&lt;/p&gt;

&lt;p&gt;It'll certainly be nice to see someone improve RSS and the replies from Asa Dotzler that are quoted in the original post seem to imply Mozilla are still thinking about it and talking about how to use it in the next version of Firefox which has to be better than nothing but who knows when it gets to the fully integrated dream scenario that is mentioned in the original post. We can dream...&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>What have Google done now?</title>
   <link href="http://haeg.in/Internet/what-have-google-done-now%3F/"/>
   <updated>2010-06-10T00:00:00+01:00</updated>
   <id>http://haeg.in/Internet/what-have-google-done-now?</id>
   <content type="html">&lt;p&gt;Gah. My eyes. They hurt! Seriously Google, get rid of it. Nobody likes it and it's hell for usability. How Marissa Mayer can post about being excited about this &amp;#145;feature&amp;#147; and still keep some claim to being responsible for user experience is beyond me.&lt;/p&gt;

&lt;p&gt;What makes this worse is the fact that the link to turn the background off that is mentioned in the help page doesn't seem to exist on my computer (using Google Chrome on Windows at the moment as I'm at work so it's not even a crazy browser setup or anything). Additionally when I try to change the background using the control panel thing (when I'm logged in), it opens the window which is just blank, loads for a short while then redirects to a page asking for my password again. Once entered it then sends me back to the home page with no changes to the background. Trying to change the background again just sends me thought the loop repeatedly. Google you are getting to be made of more suck.&lt;/p&gt;

&lt;p&gt;Edit: if you want to view the Google homepage without the &amp;#145;art&amp;#146; you can load up &lt;a href=&quot;http://google.com/webhp?pli=1&quot;&gt;http://google.com/webhp?pli=1&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>CLI Samba - Because I ALWAYS forget how</title>
   <link href="http://haeg.in/linux/cli-samba---because-i-always-forget-how/"/>
   <updated>2010-06-10T00:00:00+01:00</updated>
   <id>http://haeg.in/linux/cli-samba---because-i-always-forget-how</id>
   <content type="html">&lt;p&gt;I always forget how to copy files easily over the network using Samba so now I've just worked it out again for the umpteenth time I'll record it here.&lt;/p&gt;

&lt;p&gt;Firstly you need to know the share you want to access so run the following to get a list of the shares on your network.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;smbtree
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once you know what server and share you want to connect to you can connect using smbclient which works in a similar fashion to an ftp client.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;smbclient //SERVER/&quot;Share Name&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Notice I quoted the share name because it had a space in it, if you don't have spaces in your share names don't bother quoting it. It will prompt you for a password, if you are browsing as a guest and don't need a password you can just use -N on the command line to stop it asking you for one.&lt;/p&gt;

&lt;p&gt;Once you are connected you should be at the smbclient prompt. From here you can use commands like ls and cd on the remote share and use lls and lcd (local ls and local cd respectively) to work on your local PC.&lt;/p&gt;

&lt;p&gt;If you want to recursively grab a load of files from the remote machine without it asking you on every file you need to do the following.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;smb: \&amp;gt; recurse
smb: \&amp;gt; prompt
smb: \&amp;gt; mget &quot;directory you want to grab&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The recurse option toggles on recursing (it's off by default), the prompt option toggles off prompting when doing things to multiple files (it's on by default) and then you need to use mget to get the remote files.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>How much free space?</title>
   <link href="http://haeg.in/linux/how-much-free-space/"/>
   <updated>2010-06-08T00:00:00+01:00</updated>
   <id>http://haeg.in/linux/how-much-free-space</id>
   <content type="html">&lt;p&gt;I have several hard drives and when times are hard and space is scarce I often need to work out how much space I have left to stash random crap in. Now I could look at the output of df -h and do some fairly basic mental arithmetic and come to a reasonable conclusion. Alternatively I could use my super handy shell script I just wrote.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/usr/bin/zsh

NUMB=0

df | while read line; do
    thing=$( echo $line | awk '{ print $4 }' )
    if [ $thing -gt 0 ] 2&amp;gt; /dev/null; then
        NUMB=$(( $NUMB + $thing ))
    fi
done

echo $(( $NUMB / 1024 / 1024 )) MB
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For those who don't know shell scripting that well there are a few potentially odd constructs in there. Firstly the &quot;df | while read line&quot; bit lets me read the output of the df command line by line. Each iteration through the loop sets the value of $line to the next line.&lt;/p&gt;

&lt;p&gt;Secondly the &quot;[ $thing -gt 0 ] 2&gt; /dev/null&quot; part prevents any lines where the part we have grabbed isn't a positive number (this should just be the heading line) from causing problems when we try to add it to the running total of free space. The comparison to ensure it is greater than 0 returns true (a return code of 0) if the number is greater than zero, false (returning 1) if it's a number less than 0, and false again (returning 2 this time) if $thing wasn't even a number. The &quot;2&gt; /dev/null&quot; sends any error message (one is produced if $thing isn't a number) to the black hole device inside your computer.&lt;/p&gt;

&lt;p&gt;Finally the &quot;$(( ))&quot; construct is just one way to do maths in bash and zsh.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Baldur's Gate II installer error 0x80040707</title>
   <link href="http://haeg.in/gaming/baldurs-gate-II-installer-error-0x80040707/"/>
   <updated>2010-06-05T00:00:00+01:00</updated>
   <id>http://haeg.in/gaming/baldurs-gate-II-installer-error-0x80040707</id>
   <content type="html">&lt;p&gt;While installing Baldur's Gate II in Linux using WINE the installer threw error 0x80040707 right at the end of the InstallShield preparing to install step. It turned out it was being caused by one of the folders referenced in the registry not actually existing.&lt;/p&gt;

&lt;p&gt;The fix is detailed on the &lt;a href=&quot;http://consumerdocs.installshield.com/selfservice/viewContent.do?externalId=Q108167&amp;amp;sliceId=1&quot;&gt;InstallShield website here&lt;/a&gt;. To get to regedit in wine just run it as a normal command from the command line. The folder that was causing me problems was&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;~/.wine/drive_c/windows/profiles/All users/Start Menu/Programs/StartUp
&lt;/code&gt;&lt;/pre&gt;
</content>
 </entry>
 
 <entry>
   <title>Decrepit Drupal and Primeval PHP</title>
   <link href="http://haeg.in/webdev/decrepit-drupal-and-primeval-php/"/>
   <updated>2010-06-04T00:00:00+01:00</updated>
   <id>http://haeg.in/webdev/decrepit-drupal-and-primeval-php</id>
   <content type="html">&lt;p&gt;A few days ago I got a call from a charity I had done some web development work for in the past saying they couldn't log in to their &lt;a href=&quot;http://drupal.org&quot;&gt;Drupal&lt;/a&gt; powered website. After checking the permissions in the database and on the files I tracked the problem down with the help of the Drupal FAQs. Turns out an old version of Drupal on a new version of PHP was causing problems.&lt;/p&gt;

&lt;p&gt;The site was made back when PHP 4 was still all we had but since then my webhost, &lt;a href=&quot;http://www.dreamhost.com/r.cgi?433924&quot;&gt;Dreamhost&lt;/a&gt;, who I highly recommend for their great service, gave me the option of switching to PHP 5 and I took it but didn't check that the version of Drupal used by &lt;a href=&quot;http://shonda.org.uk&quot;&gt;the Shonda website&lt;/a&gt; worked on PHP 5. A quick visual check of the site seem to show it to be fine but as soon as anyone logged in they were logged out once they reached the next page, as if the session cookie wasn't being saved.&lt;/p&gt;

&lt;p&gt;The fix from the Drupal website was to add a line to the config file as a temporary solution with the advice to upgrade the site as soon as possible. As there are more changes for the site planned this summer the upgrade will probably wait until then but if anyone else is running a suitably old version of Drupal with PHP5 you might have problems.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Bonding wired and wireless interfaces</title>
   <link href="http://haeg.in/networking/bonding-wired-and-wireless-interfaces/"/>
   <updated>2010-03-19T00:00:00+00:00</updated>
   <id>http://haeg.in/networking/bonding-wired-and-wireless-interfaces</id>
   <content type="html">&lt;p&gt;A short while ago I was having some problems with certain housemates deciding to unplug my server (which I use for IRC, general tasks, file sharing, remote access and torrenting) from the network. This began to get slightly annoying as I was often using the server remotely at the time so I grabbed an old wireless USB stick I had lying around and set up bonding using my wired ethernet as the main connection and the wireless as the fallback.&lt;/p&gt;

&lt;p&gt;It took a while to get the configuration right as the various guides on the Internet all seem to be aimed at bonding two wired devices together for extra speed (a nice idea but gigabit is plenty fast enough and when I was trying this I didn't have a spare gigabit interface on both my desktop and my server). In the end I got it working with the configuration below. The wireless key has been changed for security reasons.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Bring up lo and bond0 on boot
auto lo bond0

# The loopback interface
iface lo inet loopback

iface bond0 inet dhcp
    bond_mode       active-backup
    bond_primary    eth0
    bond_miimon     100
    bond_downdelay  200
    bond_updelay    200
    slaves          eth0 wlan0
# You only need the lines below if you don't use DHCP
#   netmask         255.255.255.0
#   address         192.168.1.100
#   network         192.168.1.0
#   gateway         192.168.1.1
#   broadcast       192.168.1.255
    wpa-driver      wext
    wpa-ssid        &quot;my-wireless-network-name&quot;
    wpa-iface       wlan0
    wpa-key-mgmt    WPA-PSK
    wpa-psk         &quot;my-wireless-network-password&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This brings up the bond0 interface on startup which starts the eth0 and wlan0 interfaces. The bond_ entries control the bonding. &quot;bond_mode&quot; ensures we use the primary interface where possible and fall back to the slave when it isn't available. &quot;bond_primary&quot; sets eth0 as the primary interface leaving wlan0 as the slave. bond_miimon seems to be set to 100 in every guide I found and is apparently the MII monitor time interval, whatever that is. bond_downdelay sets how long to wait after a host is found to be down before confirming it is down and switching to a fallback host. bond_updelay works similarly when an interface comes back up. This stops a flakey network connection causing so many problems. All these time settings are measured in milliseconds.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Hello, World</title>
   <link href="http://haeg.in/meta/hello-world/"/>
   <updated>2010-02-26T00:00:00+00:00</updated>
   <id>http://haeg.in/meta/hello-world</id>
   <content type="html">&lt;p&gt;So yet another first post for yet another blog.&lt;/p&gt;

&lt;p&gt;After using Posterous since last April I finally got frustrated with issues when logging in to edit posts (it didn't recognise I had logged in), the poor support for inline code snippits (&lt;a href=&quot;http://jalada.co.uk/2009/11/16/using-jekyll-and-git-to-blog.html&quot;&gt;also mentioned by Jalada&lt;/a&gt;) and the odd theme problems such as text boxes stretching off the right hand side of the screen.&lt;/p&gt;

&lt;p&gt;I did some poking around and looking for a replacement. I glanced briefly at tumblr but it was far too Web 2.0 for what I wanted. It also potentially suffered from the same problems posterous had since it was all hosted elsewhere. I decided I wanted a solution hosted on my own webspace.&lt;/p&gt;

&lt;p&gt;I had already ruled out Wordpress as having used it in the past it is too bloated and hard to customise for my needs. I know (X)HTML and CSS fairly well and don't want to deal with a complex templating system or have to wade through large amounts of bad PHP code to change the design of my site.&lt;/p&gt;

&lt;p&gt;A &lt;a href=&quot;http://jens.raaby.co.uk&quot;&gt;colleague of mine&lt;/a&gt;, recommended I take a look at Habari as it strongly favoured open standards and it was written from the ground up to be a modern blog platform, learning from the mistakes others had made in the past. I installed it and poked around a bit and it looked pretty good at first until I found it was a pain in the neck to get it to do code snippits in posts. Habari was out. (Okay - I'll admit I'm picky!)&lt;/p&gt;

&lt;p&gt;I then went back to jekyll, the system Jalada had mentioned in his original post. At first I had discounted it as it seemed tied quite closely to git which I had used in the past and hadn't found it to be as wonderful as the rest of the world clamed it to be. Coming back to it though I figured that the rest of the jekyll philosophy did fit very well with my way of working, I use the terminal a lot (I'm writing this at work where I have to use a windows machine and still have a screen full of terminals open) and as a programmer the idea of keeping my website under version control and generating it as static files appealed greatly. It also gave me an excuse to check out git again to see if I could find out why everyone raved about it so much.&lt;/p&gt;

&lt;p&gt;So with this decision made I spent some time at my parents house playing around with jekyll on my laptop and it seemed to work well. I nabbed a copy of someone elses site to start me off and with a few pointers from Jalada was soon up and running. When I got back home the next day I decided it was the way I wanted to go so I set it up and started playing resulting in this, the first post. I'll hopefully be making a lot of changes as I customise the site for myself over this coming weekend but for now I have a site and have a post.&lt;/p&gt;
</content>
 </entry>
 
 
</feed>

