• Africa's quiet solar revolution

    An agent for a new electrical company called M-POWER said that, for a sign-up fee of only 10,000 shillings ($6), he could install a fully functioning solar home system in their house – enough to power several LED lights and a radio. The payoff was immediate. While Noah used to spend $18 a month on kerosene, she now pays a monthly average of $11 for her solar lighting, and she no longer has to go into town to charge her cellphone.

    CS Monitor

  • Mammalian Dive Reflex

    Scholander told the volunteers to hold their breath, dive down, strap themselves into an array of fitness equipment submerged at the bottom of the tank, and do a short, vigorous workout. In all cases, no matter how hard the volunteers exercised, their heart rates still plummeted.

  • Today's Random Thought

    When you've completed signing up for a new company or service, ask if they have a 'Customer Retention Team'. If they do, ask to speak with them and tell them you're thinking of moving to a competitior. With luck, they'll give you a discount now, rather than offer it to you when you're leaving.

  • Today's Random Thought

    Public Transport stops / platforms should have iBeacons.
    An iBeacon is a Bluetooth Low Energy transmitter - they work with any device which supports BLE. Here's how it could work: As you approach the stop, your phone picks up the ID from the iBeacon and passes it to your Public Transport app. The app then looks up the stop ID and the timetable for that stop. Next departures could then be displayed on your home screen.

  • Daddy Daughter Cookie Time
  • Lunch with dad.
  • Milk mocktail.
  • "Hey Dad Look! Bubble vision!"
  • Pulled pork!
  • 581
  • 577
  • 575
  • Hair cut.
  • 570
  • Clever! Ceramic looking silicon cup.
  • Morning Balloons
  • 526
  • 520
  • America's Real Criminal Element: Lead | Mother Jones
  • 516
  • Melbourne
  • "I want dessert now, it won't make me full, it'll make room in me."

    via Facebook

  • Yum
  • Niko sings, "Two multiplayers jumping on the bed, one fell off and bumped his head, mumma called the doctor and the doctor said, no more players bouncing on the bed!"

    via Facebook

  • What''s your favorite thing about Day Care?

    Niko: "Going Home."'

    via Facebook

  • Smoked salmon, capers and sour cream crepes for lunch. Yum!
  • Kirby Ferguson: Embrace the remix | Video on

    A better way to conceive of creativity
    Kirby Ferguson: Embrace the remix : Video on

    I wonder how long it will be until we're able to track elements (melody, lyrics etc) in one song to other songs. And by "we" I mean, computers, automatically and without help.  There are already sites  displaying the make up of actual remixes by artists like Girl Talk - all manually built.

    When someone builds an automated version, it'll be interesting to see what happens to copyright law.  I imagine we'll be awash in this kind of case for a while.  With luck, copyright laws will be softened, rather than strengthened, else creativity become the exclusive domain of companies with large IP portfolios.

  • Interview with a malicious hacker making over $10,000 a week

    I've often wondered how people managed to get cash from stolen credit cards.

    So finally, the last question I had was how they manage to get actual, physical goods using that stolen credit, without having to divulge their address. The way I was explained is that all he has to do is post ads on eBay for popular items that he doesn't actually have. Then, when someone buys it, he turns around and buys that same item from some online store with the bought CC numbers, and puts the eBay buyer's address as the shipping location. He makes those stores send the products directly to his buyers, and gets clean cash for them, which he can spend any way he wants. It's a type of online money laundering.

    Interview with a malicious hacker making over $10,000 a week

  • Finland and the euro crisis: Northern gripes | The Economist
  • Lemon Cordial
  • WD TV Live Streaming Media Player |

    This looks like a great little media centre - complete with ABC's iView support. For around $119 this might be a good recommendation for parents or friends looking to play media on their telly.

  • Much Loved

    via Instagram

  • Why would I use social media to communicate with a business?

    With the response being public, it's likely I'll get something better than "Thanks for your inquiry, we'll respond to you within 48 hours.".

  • MySQL's handling of GROUP BY

    In the year 2000, I was working on migrating a web application from MySQL to Oracle. One of the issues we had was a number of queries which took advantage of slackness in MySQLs handling of the GROUP BY clause. Oracle took exception to our poor SQL and forced the developers to rewrite queries to be a higher standard. To illustrate the issue, have a look at the following example.

    mysql> create table `test1` (`a` int(11), `b` int(11) );  
    Query OK, 0 rows affected (0.14 sec)
    mysql> insert into test1 values (1,2), (1,3);  
    Query OK, 2 rows affected (0.09 sec)  
    Records: 2 Duplicates: 0 Warnings: 0
    mysql> select \* from test1;  
    | a | b |  
    | 1 | 2 |  
    | 1 | 3 |  
    2 rows in set (0.00 sec)
    mysql> select \* from test1 group by a;  
    | a | b |  
    | 1 | 2 |  
    1 row in set (0.00 sec)  

    The issue at hand, is the value for the b column. You'll note that we've grouped by a, so we correctly have a single row result. If you're not sure what the issue is, let's repopulate the table in a different order and retry.

    [sourcecode language="sql"]
    mysql> truncate test1;
    Query OK, 0 rows affected (0.10 sec)

    mysql> insert into test1 values (1,3), (1,2);
    Query OK, 2 rows affected (0.00 sec)
    Records: 2 Duplicates: 0 Warnings: 0

    mysql> select * from test1;
    | a | b |
    | 1 | 3 |
    | 1 | 2 |
    2 rows in set (0.00 sec)

    mysql> select * from test1 group by a;
    | a | b |
    | 1 | 3 |
    1 row in set (0.00 sec)

    So, the value for b was 2 in the first example, and is now 3, with the same data in the table and the same SQL. The problem is that there is no aggregation or GROUP BY clause for b. There's only one possible value for a, but b is not aggregated - there are two possible values: 2 or 3. MySQL just picks one of the two possible values. Let's see what PostgreSQL does.

    [sourcecode language="sql"]
    database=# create temporary table test1 (a integer, b integer);
    database=# insert into test1 values (1,2), (1,3);
    INSERT 0 2
    database=# select * from test1;
    a | b
    1 | 2
    1 | 3
    (2 rows)

    database=# select * from test1 group by a;
    ERROR: column "test1.b" must appear in the GROUP BY clause or be used in an aggregate function
    LINE 1: select * from test1 group by a;

    PostgreSQL decides you don't want undefined / random data in your result set and lets you know. If you're using GROUP BY queries in MySQL, and rely on the result being, you know, correct, it may be time for a quick audit of your SQL.

    A quick search of Stack Overflow questions shows many solutions which include this flaw. The solutions work fine on MySQL, but fail on PostgreSQL.

    I'm surprised that 11 years after first learning of MySQL's handling of the GROUP BY clause, it has the same behaviour enabled by default. MySQL's behaviour can be modified to behave in a stricter manner. Worth doing if you want to ensure you receive results without including randomly selected data.

  • On Daemons

    New post on Daemons over on the Booko blog.

  • It's not just Books.
  • Google gets some numbers numbers from the world bank
  • Playing on the Master branch
  • Fun with git post-commit
  • Need a MacBook Pro?
  • Making Booko work better with Google
  • Sysadmin triage

    Back when I was a professional sysadmin (now I just do it for fun) I came up with a few simple tests to perform on misbehaving hosts. These tests are very obvious and easy to check, but they're worth remembering because too often we're tempted to look for complex solutions to problems that, initially, look complex. It's humbling just how often what looks like a complex software issue, really isn't complex at all.

    So when things go wrong, before reverting the last change, before breaking out gdb and strace and before tweaking your software on your production host, spend 5 minutes and run through these quick, simple tests - there's a high likelihood that you'll solve your problem quickly. (I'm sure there's other tests you can do - these are the ones burnt into my mind)

    #1 - Disk space

    Don't laugh - running out of disk space can cause you pain in so many ways it'll spin your head.   Check all partitions, including /tmp, /var/tmp and /var. Running out of tmp means applications won't be able to write temporary files which, depending on the app, may make it behave very strangely. /var is used for many things including logging in /var/log - not being able to log will make some software cry like a baby - i.e. it may crash and you'll have no idea why - it certainly won't be in the log file.  Databases like MySQL don't like having no room to write in /var/lib/mysql - Don't be surprised if you get some db corruption. With MySQL, you may be able to start the database and even connect to it with the mysql client, leading you to look elsewhere - but checking disk space will take you seconds.

    dkam@vihko:~$ df -h
    Filesystem            Size  Used Avail Use% Mounted on  
    /dev/sda1             9.4G  7.1G  1.8G  80% /  
    udev                   10M  116K  9.9M   2% /dev  
    shm                   128M     0  128M   0% /dev/shm  

    Don't forget to check iNodes too - running out of inodes can cause the same issues as diskspace but is less obvious - checking for it is just as easy though:

    dkam@vihko:~$ df -ih  
    Filesystem Inodes IUsed IFree IUse% Mounted on  
    /dev/sda1 1.2M 445K 772K 37% /  
    udev 32K 1.1K 31K 4% /dev  
    shm 32K 1 32K 1% /dev/shm  

    #2 - DNS resolution

    DNS resolution problems can cause your system and application to hang or timeout in very strange ways.

    Some applications will log the name of inbound network connections, performing reverse lookups. If no NS is available, these connections may start to take a long time to connect, as the software waits for the resolver to timeout. If only the first listed NS has failed, this timeout may be variable in length, but probably around 15 seconds. If you see weird lags or delays, check your name servers. This can happen when you're trying to ssh into the host - if you're getting delays connecting via ssh, check DNS.  If your software makes connections to external databases for example, and is configured to address them by name, you'll see these timeouts.

    This one can be tricky because some software will cache the name resolution and some local resolvers may cache - meaning you'll see delays or timeouts sometimes, but not consistently.

    Name lookups should be under a second, preferably in the low 100's of milliseconds.

    dkam@vihko:~$ time host is an alias for has address
    dkam@vihko:~$ time host is an alias for has address

    You can see that in the second run, the name server had cached the value and returned much faster.

    It also pays to check each nameserver listed in /etc/reslov.conf:
    shell dig @

    Naturally replace with your name server's IP.

    Check "man resolv.conf" for more information.

    #3 - Ulimits

    The most common ulimit's that I've come across is max number of open files, but you may see others including max user processes.  This one is generally obvious if the software is running as a regular user - when you try to connect as that user you will see error messages about being unable to allocate resources. Editing a file or trying to read a man page will error out if you're at the maximum number of open files.  Network connections fall into this category also - so you may not be able to open network connections either.

    The more likely scenario is that the software is running as a different user - one that people don't log in as.  Try logging in as, or su -'ing to the user - if you can't or you can but the user can't open files, check the ulimits.  In Bash, try "ulimit -a" to view your limits. Different OSs limit these values in different ways - check your OS doco for details.

    #4 - /dev/random

    This is a little esoteric and is pretty unlikely, but /dev/random is used for lots of reasons - the most common use that you may have problems with is login with software that uses stuff like  [CRAM-MD5. Random data is used as part of the authentication process and when there's not enough random data, logging in will be slow or may timeout completely.  Most software should probably fall back to using /dev/urandom.  You can time how long it takes to read 1kb of random data like this:

    dkam@vihko:~$ dd if=/dev/urandom of=/dev/null bs=1K count=10  
    10+0 records in  
    10+0 records out  
    10240 bytes (10 kB) copied, 0.002011 s, 5.1 MB/s  

    #5 - permissions

    Generally this will only bite you when you've made changes or updated software - check that config files are readable, data directories are read/writable and that executables are executable. ](

  • Weekend racing.

    Went out to race my RC car on the weekend. It broke inside two laps. See Marshall Banana's posts for pics / details.

  • Flying Fun

    If you're ever looking for a fun flying toy, I can confidently recommend the Syma S026. Flies around for about 5 minutes before needing a charge. With two sets of dual blades, you can rotate it left and right and fly forwards and backwards. Up and down too naturally.  It's tough enough that multiple crashes didn't hurt it at all and it's small enough that it doesn't actually damage anything if you run into stuff. Well, avoid flowers and stuff precariously balanced. Candles also are best put away. You understand.

    Update: Try eBay for even better prices! ( oh wait - $19.95 shipping!?!)

  • Virus detection. Awesome.

    This is from 2006 - wonder what they've done since.

  • Twitter + Jabber = Jitter?

    I've been playing with Twitter lately - I created a Booko Twitter account to reserve the account name while I consider using it. I've got my own Twitter account and I had a bit of a play around with it, but honestly using Twitter via the web seems like a drag. Yet another page to watch. Plus, I subscribed to the MelbTransport guy's page and all I could think was "Can't I filter this to show me only the updates I'm interested in?" - apparently no, you can't. 

    I had a look at the applications out there to manage your tweets but all I could think was "Man, another app to run, another distraction.". I've already got email and IM, I don't really want another app bouncing in the Dock to tell me someone's posted a message. So, I got to thinking, maybe there's a way to get Twitter messages to be sent to me via IM?  Had a brief look around but didn't immediately find anything suitable. A quick Google however netted two interesting Ruby Gems - twitter and xmpp4r-simple, which give you a nice Ruby interface to Twitter and Jabber. So, after a couple of hours of hacking around, getting my Twitter account temporarily rate limited and creating Jabber accounts, I've got a very simple Twitter Jabber gateway going.

    It will post tweets to your Jabber account & you can reply! Your reply will get posted to Twitter.  As an added bonus I added filtering so I can see only what I want from MelbTransport guy's updates.  You can easily add your own filters in there - hopefully it's pretty straight forward. 

    Now, I know this isn't beautiful, elegant Ruby code - feel free to leave constructive criticism in the comments.

    #!/usr/bin/env ruby
    require 'rubygems'  
    require 'twitter'  
    require 'xmpp4r-simple'  
    require 'benchmark'
    $receiving\_jabber = ""
    jabber = twitter = nil
    cj = Benchmark.realtime {jabber =\_user, jabber\_pass)}  
    puts "Connecting to Jabber: #{cj}"
    ct = Benchmark.realtime {twitter =\_user, twitter\_pass) }  
    puts "Connecting to Twitter: #{ct}"
    def filters(status)  
     if == "MelbTransport"  
     yield if status.text =~ /Craigieburn|Broadmeadows|Upfield/  
    def get\_tweets(twitter, tweets, jabber)  
     twitter.timeline.reverse.each do |s|  
     if tweets[].nil?  
     filters(s) { jabber.deliver($receiving\_jabber, "#{} says: #{s.text}") }  
     tweets[] = "Sent"  
     rescue Twitter::CantConnect  
     puts "Can't connect. Sleeping."  
     sleep 120  
    def post\_tweets(twitter, jabber)  
     jabber.received\_messages { |msg| if msg.type == :chat }  
    def main(twitter, jabber)  
     tweets = {}  
     while true  
     puts "Action!"  
     get\_tweets(twitter, tweets, jabber)  
     post\_tweets(twitter, jabber)  
     sleep 60  
    main(twitter, jabber)

    Edits:Reversed the order of the timeline to match how they should show up in IM (IE - oldest at the top, newest at the bottom.

  • Science & Morality discussed by Sam Haris
  • Truism of the day

    “Broken gets fixed. Shoddy lasts forever”.  I've heard this phrased differently in different places and it's too often true.  

    via DesignAday - Truism.

  • Storm by Tim Minchin
  • 1981 Internet story
  • OCR and Neural Nets in JavaScript

    Javascript is becoming more and more useful as CPUs get faster and Javascript engines get better - John Resig - OCR and Neural Nets in JavaScript. Solving captcha with neural networks in Javascript. It sounds like a pretty small  neural net, but that's pretty amazing.

  • Automating host provisioning

    When testing new stuff for Booko, I sometimes create a new slicehost and build myself a test box. In the past I've done this manually, which really isn't very difficult, but it turns out that  Slicehost have an API to allow you to automate this stuff.  With the API you can create, destroy, rebuild and reboot your VPS which is pretty cool.  It also lets you manipulate all your DNS settings. Check out the  API for complete details. 

    Here's a script I put together to build a new dev host for me and set it up so it's ready to use.  It performs the following steps:

    1. Check the Domain name I've selected for the host is managed by Slicehost.
    2. Create a new 256MB VPS with Ubuntu 8.04 installed.
    3. Create the domain names for the host (including on the internal interface if required)
    4. Wait for host to build and for Networking and SSH to startup.
    5. Add my SSH key to the root user's account for passwordless login.
    6. Update and upgrade the host.
    7. Install Puppet  

    I plan on having a puppet server setup soon which will take over the rest of the setup, so I've installed that. I'll probably use the Net::SSH stuff to get the host added to puppet (signing certificates and such.)

    #!/usr/bin/env ruby
    require 'rubygems'  
    require 'activeresource'  
    require 'net/ssh'  
    require 'net/scp'
    DEFAULT\_TTL = 300
    fqdn = host\_name + "." + domain\_name  
    origin = domain\_name + "."
    # Required definitions to access the Slicehost stuff  
    class Slice = SITE  
    # Address class is required for Slice class  
    class Address
    class Zone = SITE  
    class Record = SITE  
    # Create or update a DNS record  
    def create\_host\_record(zone\_id, host\_name, ip\_address, ttl = DEFAULT\_TTL)  
    host\_record = Record.find(:first, :params => { :name => host\_name, :zone\_id => zone\_id } )  
    unless host\_record.nil?  
    host\ = ip\_address  
    host\_record.record\_type = "A"  
    host\_record = => ttl, :record\_type => 'A', :zone\_id => zone\_id, :name => host\_name, :data => ip\_address)  
    puts "Getting Zone data for \"#{domain\_name}\"."  
    dom = Zone.find(:first, :params => { :origin => origin } )
    raise "Domain \"#{domain\_name}\" not found. Won't be able to create host record." if dom.nil?
    puts "Domain exists. Creating slice."
    slice =\_id => 10, :flavor\_id => 1, :name => host\_name)
    puts "Slice created. Creating DNS records while it builds."
    create\_host\_record(, host\_name, slice.addresses[0])  
    create\_host\_record(, int\_host\_name, slice.addresses[1]) unless int\_host\_name.nil?
    puts "DNS created. Waiting for host to build and become active."
    while slice.progress != 100 && slice.status != "active"  
    puts "Host is #{slice.progress}% complete - host status: #{slice.status}"  
    sleep 10  
    puts "Host built. Waiting for host to startup."
    Net::SSH.start(slice.ip\_address, 'root', {:auth\_methods => ["password"], :password => slice.root\_password}) do |ssh|  
    puts "Connected to new host. Bootstrapping."
    puts "Creating .ssh directory and uploading public key."  
    ssh.exec "/bin/mkdir -p /root/.ssh/"  
    ssh.scp.upload!("/Users/dkam/.ssh/id\_dsa\", "/root/.ssh/authorized\_keys")  
    puts "Done!"
    puts "Updating apt and upgrading system."  
    ssh.exec!("/usr/bin/aptitude update")  
    ssh.exec!("/usr/bin/aptitude dist-upgrade -y")  
    puts "Host has been upgraded and updated."
     puts "Installing puppet."  
    ssh.exec!("/usr/bin/aptitude install puppet -y")  
    puts "Puppet Installed."  
    rescue Errno::ENETUNREACH  
    puts "Host network not up. Waiting 10 seconds, then retrying"  
    sleep 10  
    rescue Errno::ECONNREFUSED  
    puts "SSH not ready. Waiting 10 seconds, then retrying"  
    sleep 10  
    puts "Done! Enjoy your new host #{fqdn}. You can now ssh root@#{slice.ip\_address}"
  • LiPo

    Testing my new LiPo battery.  Watch those tyres balloon!  The battery can do 96Amp continuous with 160Amp bursts. It's a 5350 mAH battery  but at 7.4V, it won't push those sorts of currents for long.

  • Flying people
  • YouTube picks

    From the YouTube

    They sell Beached As stuff at CafePress.

  • Installing Ruby Enterprise Edition + Phusion Passenger (mod_rails) on Ubuntu in a VPS

    I've tried quite a few ways to deploy Ruby on Rails apps for Booko. Here's how to do it with Passenger.

    Methods tried so far:

    • Apache with mod_proxy and mongrel cluster
    • Apache with mod_proxy and thin
    • Nginx with thin

    I only gave nginx a small run - I needed PHP for the blog (I've since moved Booko to it's own host, so this wouldn't be a problem) and it seemed great - but so far, I think REE + mod_rails is the best. It's the most convenient to install/setup, it seems to be very fast, and it is quite nice to manage.  You can restart your Rails application with a _touch tmp/restart.txt - you know it's restarted because the file disappears - that's pretty nice. Naturally, you can restart Apache too.

    So, this is a post on how to install Ruby Enterprise Edition and Phusion Passenger (aka: mod_rails) on Ubuntu 8.04 LTS in a VPS, specifically, Slicehost. It's not hard, but this should make it even faster.  You can read all about Ruby Enterprise Edition, but basically it's a version of Ruby tuned to be fast and lean. It's made by the guys who've created Phusion Passenger, or mod_rails and they work well together.  I'll be assuming that you want to use this version of Ruby for everything (ie - command line work as well as for mod_rails). IE, when you call irb or ruby or rake from the command line, you want to use REE. 

    Create a local user
    If you've just built your slice, create yourself a user account and set up ssh. Login:

    ssh root@

    Use vi as your command line editor because you're a real man:

    echo "set -o vi" >> .bashrc

    Create your user account:

    useradd -c "Dan Milne" -d "/home/dkam/" -m -s "/bin/bash" -G sudo dkam

    We're going to add your user to the sudo group so you can work without being root.

    mkdir /home/dkam/.ssh  chown -R user /home/dkam passwd dkam

    Set the password for your user. Next, we'll let anyone in the sudo group use sudo. I'm actually from a world where wheel was the admin group - I'm presuming sudo can fulfil this role in Ubuntu.

    echo "%sudo   ALL=(ALL)ALL" >> /etc/sudoers

    Now, you can log out and reconnect as your user and if you wish.

    Getting the software installed

    This section will assume you're the root user (for easy of cut and pasting commands).
    Get your Ubuntu distro up-to-date, then we'll install the required software:

    aptitude update
    aptitude dist-upgrade -y
    aptitude install vim git-core screen build-essential apache2-prefork-dev \
    apache2-mpm-prefork mysql-server mysql-client libmysqlclient15-dev libreadline5-dev -y

    You'll need the build-essentials for compiling stuff, apache2 to serve your site, mysql because REE builds the mysql gem for you, and readline stuff so that your irb and script/console stuff will work nicely. vim, git-core and screen aren't strictly required, but part of my bag of tricks. 

    mkdir source && cd source
    tar xfvz ruby-enterprise-1.8.6-20081205.tar.gz

    Accept all the defaults. Once that's installed, add it to your path and re-read your bashrc file:

    echo "export PATH=/opt/ruby-enterprise-1.8.6-20081205/bin:\$PATH" >> ~/.bashrc
    . ~/.bashrc

    Make sure you're using the correct ruby binaries:

    root@demo:~/source# which gem

    If that says "/usr/bin/gem" you need to make user your PATH variable includes your new Ruby install at the beginning. Make sure your gems are up-to-date:

    gem update
    gem update --system

    Then, install passenger (that's mod_rails for those not following along):


    Once again, accept the defaults. Now, we'll set up the Apache config - rather than tacking it on the end of an Apache config file, we'll do this the nice way. We'll create a module file, then symlink it into the mods-enabled directory.

    cd /etc/apache2/mods-available/
    echo "LoadModule passenger_module /opt/ruby-enterprise-1.8.6-20081205/lib/ruby/gems/1.8/gems/passenger-2.0.5/ext/apache2/
    PassengerRoot /opt/ruby-enterprise-1.8.6-20081205/lib/ruby/gems/1.8/gems/passenger-2.0.5
    PassengerRuby /opt/ruby-enterprise-1.8.6-20081205/bin/ruby
    PassengerMaxPoolSize 3
    PassengerDefaultUser www-data" > passenger.load

    Now that file is created, we'll link it into the mods-enabled directory:
    cd ../mods-enabled/ ln -s ../mods-available/passenger.load Next, we'll make a small ruby site: cd /var/www/ rails htdocs

    Next, edit vim /etc/apache2/sites-enabled/000-default , changing the DocumentRoot to

    DocumentRoot /var/www/htdocs/public

    Restart Apache and navigate to your host's IP address - you should see a Welcome Aboard message. And we're done! Have fun.

  • Creationism with Ricky Gervais


    (Old link no longer works - enjoy this one: )

  • Stopthecleanfeed protest

    I'm at the protest of the clean feed system at the library in central Melbourne. I don't think I've seen a weirder mix of people. Nerds, gamers and civil rights type groups like the EFA with left wing Socialists Party sprukers everwhere. And Raelians! 
    The Greens and Amnesty International both had speakers which were pretty good.  Melbourne Wireless are here also - not a bad talk either.

  • Installing Piwik on Gentoo?

    Piwik advertises itself as Open Source Web Analytics - and it seems to be on the right track.  It even has an advantage over Google Analytics - live stats! Because having to wait until the end of the day until Google updates Analytics is such a drag ;-)

    I just got it running on Gentoo to have a look, tracking stats on Booko.  There's a zip file you can down load and install, but I like the convenience of upgrading in place with SCM:

    svn co  /var/www/

    In Gentoo, you'll need to add the following to your /etc/portage/package.use file:

    dev-lang/php pdo ctype xml

    Then rebuild and give it a day in court.

  • New Handbrake converts from *

    Just the other day I was trying to figure out how to get a video converted into the right format so I could chuck it onto my iPhone.
    "If only Handbrake would read normal video files as well as DVDs" I was thinking.
    Well turns out, it does with the latest version. Just point it at the video file (I'm trying it with an MP4), select the iPhone preset and away you go.

    Works on Windoze and Linux too - check it out:

  • 8 Years later

    True, true.

  • Stripped screw

    I managed to strip one of the four 1.5mm titanium screws used to hold down the cover for the transmission cover.  I know, I know. But I did. I tried super gluing an Allen key into the screw’s head, but it was no good. Actually, it just didn’t dry completely I think. 

     It’s hard to see it in there. Should have used a macro lens. I headed down to Bunnings to browse the tool section, searching  for some likely looking tools. I got myself a 2mm screw extractor, a 1mm drill bit and a triangle file. I had a couple of ideas about how to get the sucka out.  I started with the simplest.

    The screw head poked out slightly from the side of the housing, so I used the triangle file and carved a slot into the side of the screw head. Then a got the screwdriver, located the flathead in the slot, then tapped it with the hammer. Once it had moved around far enough, I cut another groove into the side and tapped it again with the screwdriver and hammer. 

    It worked out quite well. Above you can see the number of slots cut into the side. It’s actually quite a small screw:

  • An example of why not to buy DRM protected content

    If you’ve ever wondered why you shouldn’t buy music or video protected by DRM, the following email from JB HiFi Music is a cogent example.  JB HiFi previously sold music in both MP3 and DRM "protected" WMA format.  This email is about the DRM music you may have "purchased".

    Dear JB HiFi Music customer,

    You may have received a copy of this email previously if you held multiple accounts with Destra.

    Songs and albums that were purchased through are protected by a digital rights management system managed by Destra that requires a valid license key before they can be played on your computer.

    From 31 October 2008, Destra will no longer be able to support the retrieval of license keys for music purchased from and Destra will no longer be able to authorize song playback on additional computers.

    After 31 October 2008, you will not be able to transfer songs to unauthorized computers or re-license these songs after changing operating systems. Please note that your purchased tracks will generally continue to play on your existing authorized computers unless there is a change to the computer’s operating system.

    For any user who purchased tracks through, we highly recommend that you back up the purchased tracks to an audio CD before 31 October 2008. Backing up your music to an audio CD will allow you to copy the music back to your computer again if the license keys for your original music files cannot be retrieved.

    Thank you for using

    I like that they expect you to burn your DRM music to audio CD, then reimport it into your computer. Naturally they don’t mention the subsequent loss of quality.  I wonder if anybody who’s purchased music from them will ever trust DRM again? Lets hope not eh?

  • Sarah Palin on her Foreign Policy experience.

    This is so embarrassing to watch. It’s like an episode of The Office or maybe Peep Show.

  • Electrafun is dead, Long live the Electrafun

    I’ve been having stacks of fun with the Electrafun lately. I got it at Christmas but hadn’t really used it too much until recently. Bought some better batteries for it which made it fly at least twice or three times as long as the original batteries, plus I found that I could fly it around behind the Royal Children’s Hospital. Nice big area with very few people. It’s taken an amazing amount of punishment. Full speed into the ground, trees and even a fence. I recently had to replace the elevator as it broke in half. The kit actually comes with a spare so, no problem there. During the previous flight, I nose dived into the ground hard enough to split the nose down the centre. I duct taped it up and we were good to go. This last crash split the duct tape & the nose even further open. 

    Kensington, 07/09/2008

    The killer blow however, came when the tail broke. I don’t know if it’s going to be reparable – it can’t be duct taped because it cracked where the tubing has a slot cut in it for the control rods to pop out. The control rods are bent too.

    Kensington, 07/09/2008 

    More examination might be required.  Here’s how it looked when I first set it up: DSC_0166

  • The Paris end of Barnett St

    There I was, sound asleep when into my dreams intruded a sound – the sound of a large gas bottle being tipped over and rolled. It’s a large, metallic, hollow, ringing sound and not really the type of sound you can sleep through. It woke us both up, but the sound of it rolling stopped pretty quickly. “Didn’t hit our car.” my sleepy mind tells me, “Might as well go back to sleep.”. Riina’s far more civic minded brain however, told her to get up and have a look. As she pulled back the curtain to look through the window, I could see a flickering orange light playing off one of the large walls I could see from bed. Apparently, there was a fire outside.

    We both got up and went to the front door. Riina ran and grabbed the phone – there was a car on fire on our street! Parked across the road no less! What’s more, it had a large gas cylinder lying against the burning tyre. Triple Zero was called, Fire was requested and address was given. I took a couple of photos – didn’t get any of the car on fire though:

    I must admit, it’s a first for me – seeing a car being burnt out. I was thinking “How Beirut!”, but in the last few years, burning out cars is suddenly very Paris. Before the Police & Fire-fighters arrived, it was oddly calm and quite quiet – you could hear the crackle and popping of various bits of Hyundai. When you see this on TV there’s rioters and looters running about. In Barnett St, there was just a guy moving his car to a park further away from the burning one.

    The Police arrived shortly afterward and Riina & I told them what we knew – which wasn’t much accept when the unsubs ( That’s Unknown Subject for all you non-criminal minds watchers) moved the gas bottles next to the car (Riina had checked her phone – 04:24). There were more police the following morning. The car that burnt belongs to a local panel beater and, according to the Police, there’s some tension between the some local residents about them using up parking spaces. The rest of the panel beater’s cars had sticky notes claiming that parking on our street is for residents only – not sure how they reached that conclusion – there’s no parking signs anywhere to be seen.

    Placing a large gas cylinder next to a burning car is amping up the danger level – I’m not sure how hot it would have to be for it to burst, but the damage would be massive – the sound would be immense.

    So, Random Drunk idiots? Mis-guided local parking crusader? Panel Beater competition? I guess we’ll never know.

  • Apathy Overload

    There I was, examining the banana I’d bought for breakfast while waiting patiently for Gumby to say “Go!” at an intersection this morning on my way to work. Corner of Collins and Elizabeth – on the Optus shop corner. I look up to see if there’s any traffic – maybe I can beat the mob and scoot across while nobody is coming. No good. Two bikes are coming. The leader is a chick on a nice single speed trying to beat the Red, the second guy doesn’t bother and starts slowing up. As the girl flies past and I step out behind her, the light has just flicked over to Red. I mentally chastise her for breaking the rules, while examining the feeling of internal hypocrisy for that same feeling – I used to think nothing at all at going through a red – provided it was all clear. I’m sure she knows what she’s doing.

    I hear a familiar sound – the sound of a body hitting the side of a car. I look over and see the girl partially underneath a stationary 4WD – about the size of a Subaru, bike lying beside her. The driver had been waiting to do a hook turn and had turned out in front of the girl. She looked pretty dazed, but was able to lift her head and the car hadn’t driven over her – there was only the impact of her into the car. I didn’t even break stride until I’d crossed the intersection, but I was watching most of the way across.

    By the time I’d crossed the street, there were 3 or 4 people standing around helping her. Some guy had dropped his bike at the red light and ran across to help her. I was surprised by the massively different reactions. The guy who dropped his bike, blocking traffic with it at the red and running across an intersection was at one extreme – my reaction was the opposite, almost apathetic – at best an interested bystander watching for 30 seconds, then continues on his way.

    My feeling on the matter went something like this:

    “Silly girl! She shouldn’t have shot the Red – and if she wants to ride like that, then ride behind cars doing hook turns or at least be ready for them to turn out in front of you!”

    Then, because my brain has trouble when it’s not conflicted,

    “Stupid car driver! He was in the wrong because it’s his responsibility when turning into oncoming traffic. He’s certainly in the wrong legally – he could have looked a bit harder before turning out. If it was another vehicle, he’d have been in much more danger”.

    Finally, I questioned my own apathy to the whole situation – why didn’t I run over to help – I was certainly one of the closest people to her. But what do to then? Say nice things to her? Help her up I guess? Or maybe call an Ambulance? She didn’t look badly hurt – very dazed, but in one piece. What if I ran over and helped her stand up, only to discover she’s got a spinal injury and I should have called an Ambulance? How do you know if someone should stay in one place until Medics arrive? What if cars are tooting to get through the intersection? But just walking away seems so callous.

    Ultimately, I’ll soothe my guilt by claiming I did the pragmatic thing – there were plenty of other people rushing in to help – I’m no expert in the situation and she didn’t look badly hurt. Perhaps I’d have rushed to help if nobody else had. Hmmmm.

  • American Cars

    Read an article by Jay Leno on what American car manufacturers should do to get back in the game. The first paragraph made me laugh:

    The type of vehicles America makes best are, unfortunately, not the type of vehicles that people really want anymore. Nobody builds better trucks than the Americans do. Not even the Japanese build as good a truck as the Ford F-150 or the Chevy Silverado.

    Which made me think of this clip from TopGear:

    It’s funny that he then goes on to talk about Harley Davidson. They have definitely improved and they are certainly popular and may even be high quality. But, to my mind, they’re style over substance. They sound like they’re not running properly to my ear. They sound like an old Massey Ferguson to my ear. Which is fine if you’re pulling a trailer full of orange bins, but so annoying when I’m out having breakfast.

    Apologies to those of you who ride Harleys and don’t open them up in town – the sound of an idling Harley can be quite nice. Reminds me of my childhood on the farm.

    Leno goes on:

    The problem with what’s happened over the past few decades is that you have a whole generation of kids who have no brand loyalty. They’ve grown up on Honda, Hyundai, Kia, and Toyota.

    That’s a problem? Brand loyalty is not a good reason for buying a product. Buy a product because it’s well designed, or somehow meets your needs. Brand loyalty is how Ford is still building rubbish F-150s. If the only way to rebuild the American car industry is to expect people to suddenly exhibit brand loyalty… well they won’t be doing much exporting.

  • Last Booko post here
  • Looking for a mobile phone plan with data?

    Virgin will apparently be releasing the iPhone on Friday 1st of August. According to the article previously linked, they’ll be offering the 16GB iPhone for $4 a month on the $70 a month plan which includes 1GB of data. Not too shabby at all! Apparently, these plans have driven Telstra to increase it’s plans by including up to 7.5x the data of the previous plans! Which is still $10 for 150MB (up from 20MB) or $29 for 300MB (up from 80MB). It’s hard to believe that an improvement of that magnitude still sucks. Naturally they haven’t sold out of the iPhone.

    Three, who still don’t have the iPhone, will apparently be looking to steal other carriers customers with some new plans for those who migrate to them with a 3G phone. The plans will be released on the 4th, but the tubez tell us that $49 gets you $350 worth of calls and 1GB of data. Excess data is a moderate 10c/MB. Not great, but not $15/MB like Virgin.

    It’s great to see some serious improvement in data allowances from Australia’s carriers. Even Telstra is being dragged along. The iPhone apparently has carriers excited that Australians may finally be making use of those shiny 3G networks that they’ve invested in. No doubt this will spur other phone manufacturers to get their buts into gear – people actually like using the internetz on their phones – if it’s easy enough. Should be exciting to see how things grow.

  • Virgin Reply

    Well, I got a response from Virgin. I wasn’t going to post it – it was a bit…. flaccid. But people were asking….

    Hi Dan,

    Thanks for your email.

    At this stage, we have do not have any updates to our data subscription
    plans as we believe that our prices are competitive against our
    competitors. This is for mobile data browsing and cannot be compared to
    the mobile broadband services of other competitors. We do offer a
    wireless broadband service which is $39 for 5GB of usage with no excess
    fees if you do require more data.

    If you have any further questions or feedback, please feel free to call
    us on 1300 555 100 between 7am and 11pm EST, 7 days a week.
    Alternatively, you can contact us at -

    Kind Regards,


    The Virgin Mobile Team
    Hmmm – didn’t really answer my questions.

    Hi ########
    You misunderstand – I believe 1GB for $15 is excellent value. What I’m complaining about is 1.5c / KB for excess usage, with no effective method of managing your usage. Virgin throttles their mobile broadband users – it would be great to see the same system for mobile data browsing. Other carriers charge ( for mobile data browsing – not mobile broadband) 10c / MB for excess usage. Virgin charges $15 / MB.

    Apparently the ACCC is also looking at this issue:

    Does Virgin have any plans to allow users to monitor or manage their mobile data browsing usage or reduce the excess fee to a reasonable level?


    PS: I’m using your expression “Mobile data browsing” to mean broadband on your phone and “Mobile Broadband” to mean a 3G modem in your laptop.
    Got a reply quick smart:

    Hi Dan,

    Thanks for your email.

    We are always looking to improve our prices to remain competitive. I can
    assure you that we are constantly looking into our charges but as such I
    cannot give you an idea as to what our management are looking in to.

    Mobile browsing usage is fairly up to date as I use it myself and we do
    have that clause in case our servers take some time to update. It
    probably would be best to keep monitoring your usage daily so as to not
    exceed the limit.

    If you have any further questions or feedback, please feel free to call
    us on 1300 555 100 between 7am and 11pm EST, 7 days a week.
    Alternatively, you can contact us at -

    Kind Regards,


    The Virgin Mobile Team
    Well, what did I expect?

    Tonight when I checked my online usage, for the first time since I got the iPhone, there was something to see! That’s right – in a week I’ve used… 8MB. Presumably that doesn’t include the last two days of surfing. I’d say my 1GB Quota is going to be just fine.

  • Shazam + iPhone is really, really cool.

    I found an amazing bit of free software on the iTunes App store called Shazam. The idea of the software is that you send them a sample of some music, and they’ll figure out the Artist, Album, Trackname and so on. On the iPhone, what you do is fireup the Shazam App, click “Tag Now” button which starts the program recording music. It records between 8 – 15 seconds ( depending on how you configure it ) then sends that sample ( or maybe just a fingerprint of the sample ) off to the Shazam service on the internetz. A few seconds later, the program displays the artist, album, track and coverart. It it has any, it’ll also send links to listen to/buy the song on iTunes and links to YouTube to watch the filmclip.

    In the few times I’ve used it, the hit rate has been very high. It has missed some tracks ( mostly Finnish tracks ) but overall it’s been quite amazing. I gave it a road test today standing in a café wondering what the music playing was. Fired up Shazam, and less than 30 seconds later, I’ve got all the track details, artist and album art. This track had no links to iTunes or YouTube unfortunately. Really quite a remarkable service.

  • Booko for the iPhone

    Got myself an iPhone and so naturally it’s time to get the iPhone interface working. It’s a bit simpler – specifically the cart functionality has been disabled.

    Additionally, I did a bit of refactoring which should speed things up.


  • More tilting at windmills


    Hi Guys,

    I’ll preface this email by saying I’m a long time Virgin mobile user and I’ve always been very happy with the value and service I’ve received. However, I just got myself an iPhone to connect to the Virgin network. I’ve added the $15 / 1GB browsing option (again, excellent value), but after talking to your help line, I’m surprised to learn the cost of exceeding my quota. It’s beyond excessive: it’s ludicrous. 1.5 cents per KB works out to $15.36 for 1 MB and $15,728.64 for 1 GB.

    15 bucks for the first GB, over 15 thousand bucks for the second GB. Crazy!

    As outrageous as that is, it gets worse. When looking to see how I could manage my usage, I see that the online “Mobile Browsing Usage” claims “Amounts shown are estimates only, and may not include last 2 days usage”. So, watching a few too many YouTube Videos will likely end up costing hundreds or thousands of dollars. Your helpdesk people told me there is no way to be automatically alerted to my impending exhaustion of quota / bankruptcy.

    My Three mobile broadband modem costs 10c / MB for excess usage. Compared to Virgin’s $15 / MB, Virgin is 150x more expensive.

    Before I start researching my move to Three, Optus or Vodafone, does Virgin have any plans to fix this problem? For example, your mobile broadband package is brilliant – throttled web access! Hit your quota and be throttled down to dial up speeds is an great idea. Why can’t we have this with our mobile phone broadband plans?

    Hope to hear from you,


  • Flying RC planes with wireless Video.

    Ian introduced me to this concept. I have to say it looks like fun. These guys are flying their planes via a wireless camera and a set of video googles. They also have gyros on their heads, such that when they move their head right, the camera pans right.

    Apologies in advance for the terrible music.

    This is the first video I saw – so cool.

  • Saturday Drive

    Went out driving our RC cars today with Josh. Took a bunch of photos. Here’s a selection.

    First up we have Josh about to nose dive into the ground:


    Next, we have Josh jumping my Baldre off the track.


    I should add that jumping off the track was a very common occurrence. After the race track we headed back to the BMX track & half pipe. I really enjoy driving on gravel surface – very slippery and you’re often sideways. It could also be that it seems to be the only surface that I manage to beat Josh on. Josh has an edge over me on packed dirt and asphalt.


    The Half-Pipes are so much fun, but a breakage is likely. Here’s Josh getting his car off the ground:


    Not to be out done:


    And lastly, I had to break my car. Again. Luckily I guessed this might happen and had replacement parts on the ready.


    What I didn’t expect was the pin which holds that part to the car bending. After much straining with a Leatherman, we got the pin straight enough to put everything back together.

  • No more onload="javascript..." for Booko

    I’ve taken Phil’s advice and removed the Javascript from the body’s onload event handler, replacing it with Prototype’s event handler.

    <br />
        Event.observe(<br />
                 window,<br />
                 "load",<br />
             <%= remote_function :url => { :action => "get_prices", :isbn13 => @book.isbn13 },:method => :get %><br />
            );<br />
  • Extreme police powers introduced to protect Catholic feelings

    Judging by the actions of the NSW government, Catholics are so thin skinned that they need extra police protection. Police have been granted special powers to deal with people who confront attendees of the WYD with ideas the Pope doesn’t agree with. According to some observers, wearing slogans or handing out condoms at WYD could get you in trouble. Group Think will probably be OK.

    Thank God the media is on the case.

    From the Age :

    Powers approved by the NSW government allow for people who continually annoy or inconvenience pilgrims during the event, to be staged in Sydney from July 15 to 20, to be arrested and possibly fined $5,500.

    From the ABC :

    Draconian, repugnant and unnecessary. These are just a few of the criticisms of special regulations coming into force for the upcoming Catholic World Youth Day event in Sydney.

    Civil libertarians and legal experts say the regulations could see situations such as someone deemed to be wearing an offensive T-shirt being arrested and given a hefty fine.

    New South Wales Police say the measures are designed simply to ensure that World Youth Day is a peaceful and happy event.

    From the BBC:

    Lawyers in Australia say that police powers introduced for a major gathering of young Roman Catholics later this month will undermine free speech. Under the powers, police will be able to arrest and fine people for “causing annoyance or inconvenience” to participants in World Youth Day.


    NSW POLICE have been given extraordinary new powers for World Youth Day, including being able to arrest and fine people for “causing annoyance” to participants and conduct partial strip searches.


    Critics say the new powers have the potential to make wearing a T-shirt with a slogan, a protest like handing out condoms or a Chaser-style stunt a crime, while civil libertarians believe the powers are more extreme and than those used during last year’s APEC summit.

  • Finished. For the moment.

    Well, I’ve painted the shell and put the stickers on. Looks finished now.



    Added an extra sticker. I’ve had so many of them lying about – this is the first time I’ve ever used one.

  • Another shop for Booko

    Guys at the Ruby meeting tonight mentioned another online bookstore – Boomerang Books. I’ve added them to the roster. Let me know if there’s any issues.

  • New Girl Talk album

    Girl Talk have released a new album “Feed the Animals”. They’ve released it in a similar fashion to Nine Inch Nails most resent release. You can pay any amount you think is fair. If you download for free, I understand they ask some questions about why you’re not paying. If you pay at least $5 you can get the FLAC version + a single track of the whole album. Over $10 and you can get a physical CD when they’re available. If you’re in Australia ( and you know, who isn’t? ) you’ll need to pay another $7 USD to get it shipped over here.

    I’m up to track 4 of 14 and I’m enjoying it. I loved the previous album – Night Ripper. Well worth downloading.

  • USB2 Vs FW400 Vs FW800

    Had access to a 1TB WD drive recently. Comes with USB2, FireWire 400 & FireWire 800. Thought I’d check out the performance of the various connection methods. It had two internal 500GB drives arranged in RAID 0 (striped). I tested it by running:

    $ time cp Movies/Parallel.avi /Volumes/MYBOOK/
    The movie was 525MB and I did each test 3 times. The very first run was slowest – presumably the file (or parts of it) was in the disk cache for subsequent runs. Here’s the times:
    FW800: 12.5 seconds
    FW400: 16.9 seconds
    USB2: 21.6 seconds
    Just to make sure my laptop drive wasn’t affecting the test, I also performed this test (several times for each):
    dd if=/dev/zero of=/Volumes/MYBOOK/test.file.fw800 bs=1m count=1024
    FW800: 24.8 seconds
    FW400: 32.4 seconds
    USB2: 40.9 seconds
    For comparison:
     Local SATA drive: 20.3 seconds
    My laptop hard drives results were a bit erratic – peaking up to 27 seconds and down to 20. No doubt due in part to the 21 applications I’m currently running. Stopping iTunes playing helped things ;-)
    I was surprised that FireWire 400 was that much faster than USB2 – I’d always assumed they were on par. Anyway, looks like FW800 is clearly the king for connecting external HD.
  • The parts arrived.

    And we’re back in action. Nothing says we’re back in action like driving over a small obstacle slowly.

  • $500 Ethernet cable?

    Thanks to teh timo for putting me onto this amazing product.

    Read the reviews. Funny stuff.

  • Frustrating

    I spent several hours yesterday fighting with RubyGems – I’d even written a vitriolic post about it – but I … did something … and bam, like that it was gone. RubyGem is Ruby’s version of Perl’s CPAN. It’s got a very annoying trait – its prodigious use of memory. For each gem ( a gem is a Ruby module – like rails or hpricot for example ) RubyGem would load the spec into memory in order ( I’m guessing after reading a bunch of forum posts ) to build a dependency tree. On a 256MB slice host, this pushes you into swap hell. On a 512MB host it would use up to 68% of memory.

    So what can you do but rent a bigger slicehost? Moe Sizlack said it best: “I’m choking on my own rage over here!”

    Naturally, it’s been fixed. Today.

    If only I’d done something more constructive yesterday. Like played COD.

  • SSH Tricks

    Read this tip here – if you add:

    Host *
           ControlMaster auto
           ControlPath /tmp/%r@%h:%p
    to your .ssh/config, ssh will reuse your network connections to hosts with already established ssh sessions – saving a bit of time and reducing the number of network sockets you’ve got.
    $ man ssh_config
    for the details. You learn something new every week eh?
  • Booko Bugs

    Fixed some Booko bugs/interface problems this weekend.

    These ones were reported by Niall:

    1. Search results report ISBN, but that value is listed as EAN on the next page. Fixed this to be consistent. I use ISBN to mean the 10 digit version, and EAN to mean the post January 1st 2007 13 digit version, although they are both technically ISBNs.- Searching for a valid ISBN which didn’t exist in Fishpond or The Nile doesn’t return any results. The spinning thing just kept spinning for ever. This bug was a bit surprising – thought I’d fixed this once before. Probably before a recent refactoring. Damn my lack of testing!

    Made the message explaining when the price was last looked up more clear. Reported by Andy.

    Improved a fragment caching problem reported by Joel. The problem was (as far as I can tell) that adding something to your cart, then moving to a different page before the cart is updated continued to show you the old version of the cart. This was because I was doing things in this order:

    1. Expire Cache for the cart
    2. Look up the book to add, then add the book to the cart and do a bunch of lookups and calculations,
    3. Regenerate the cart html and send it.

    2 takes a while. If the user navigates away before #2 is done, then the cart html is regenerated without the book being in the cart. Subsequent adding / removing of books will refresh the html and your book will be there. I’ve tried to fix this by shuffling the order things are done to this:

    1. Look up the book to add, then add the book to the cart and do a bunch of lookups and calculations, 
    2. Expire Cache for the cart
    3. Regenerate the cart html and send it.  

    Hopefully this will reduce the problem, but it may not eliminate it.

  • Playing with RC cars

    Went out driving RCs with Josh today. Found a nice half pipe. Weren’t too many pesky kids. Managed to snap the front right wheel off again. Then again. And Again. Then one last time before it really became tedious. Parts are ordered. Well, they were ordered last Sunday when it first happened. Still haven’t shipped.

    Anyways, we had some pretty good fun while it lasted.

  • Business Time

    Aww yeah.

  • I might be too old for Gentoo Unstable. It could be time for Debian. Or Ubuntu. Or Gentoo stable maybe. :-(

    Perhaps my blood sugar is just too low.

    Seeing this type of error in Gentoo?

    * ERROR: sys-apps/portage- failed.
     * Call stack:
     *, line 1792: Called dyn_unpack
     *, line 686: Called die
     * The specific snippet of code:
     * touch "${PORTAGE_BUILDDIR}/.unpacked" || die "IO Failure -- Failed 'touch .unpacked' in ${PORTAGE_BUILDDIR}"
     * The die message:
     * IO Failure -- Failed 'touch .unpacked' in /var/tmp/portage/sys-apps/portage-
    Apparently touch no longer works in my distro. Can’t build anything.
    It appears my kernel (2.6.21-gentoo-r3) is out of date compared with my linux-headers (2.6.25-r3) package and this screws up the latest version of touch which comes with coreutils. Update your kernel. But touch doesn’t work, so you need to go get an old version:
    mv coreutils-6.10-r2.tbz2 /usr/portage/distfiles/
    emerge -k =sys-apps/coreutils-6.10-r2
    Now go update your kernel.
  • XMPP

    This Simple XMPP client for Ruby looks like a great way to get some IM loving into an application. I’d love a monitoring system which used IM to alert me to failures. Since IM is not exactly a perfect medium, sending a copy of the message via Email for critical alerts is probably a good idea too.

    Could be fun to ask your monitoring IM buddy “Status?” and get a status report. X Emails delivered, Y Emails rejected, Z books looked up on Booko.

    Fun. :-)

  • Consistency

    Well, apparently I’ve not been consistent enough – an important quality when one bags out others for being inconsistent. So – I’ve updated all references to “Bookie” to the now correct “Booko”.

    While I was at it I updated the scraping code for Fishpond who have again updated their site. At least they’ve updated it for the better. Compare and contrast the old and new Hpricot XPath code for grabbing the book title and author.

    The Old:

    book.title = (doc/"table/tr/td/div/h1").inner_html = (doc/"table/tr/td/p[2]/a/font/u").inner_html
    The New:
    book.title = (doc/"h1#product_title").first.inner_html = (doc/"p#product_author/a").first.inner_html
    Much nicer!
  • Result!

    Coles pledges clearer pricing

    Although, I could have done slightly more research first:

    Coles, which has 749 stores nationally, joins Woolworths in supporting unit pricing. Aldi has already adopted the system

  • For Unit prices? Check.

    Feedback for Coles and Safeway:

    Hi There,

    I’m writing to suggest you guys start using unit pricing. I’ve experienced it while living in Finland and found it an excellent way of comparing products. It makes shopping faster and easier. I’d be more likely to buy larger volumes if I could quickly see, at a glance, that it provides better value.

    I like it so much, that I’d change supermarkets just to compare prices more easily.



  • Mass or Zombie take over?
  • This one is for Rob. You know which one.
  • Brilliant new business Idea

    So, I was watching Enemies Of Reason and had an idea I’m sure is not original. Start up a new Homeopathy business selling a new “Super Homepathic” cure all. Advertise the liquid as having the memory of all known substances which cause human ailment. Sell 20ml bottles of distilled water for $50 a pop.

    According to Richard Dawkins, in a cup of water, at least one molecule will have passed through the bladder of Oliver Cromwell. From this, it can be inferred (don’t worry about proof) that in a 20ml bottle of water, at least one molecule of the liquid has been in proximity to a substance which causes human ailment during some point in its lifetime (the Earth is estimated to be 4.5 billion years or so old – so this is a reasonable assumption). It’s spent the intervening time becoming more dilute, yet maintaining the “Memory” of this substance.

    In order to be taken seriously, it needs to be expensive. It’s not any old crap after all – it’s “Super Homepathic” medicine. $50 a pop is within reach of most people, but pricey enough that you’ll feel awe whilst imbibing it. The stronger the awe, the better the placebo effect, the better the “cure”!

    To assuage the guilt, on all shipping bottles we’ll say “Should be used in conjunction with accepted medical treatment.”

    If someone cries foul, we’ll suggest a double blind test with other Homepathic cures. Check. Mate.

  • Tight Site

    99 Designs looks like a great site. Clear purpose, good design very well executed. I like to think, whilst much simpler, Booko has a similar, clear objective. “Does one thing very well.” is the result I’m looking for, which I think 99 Designs has accomplished.

  • Windows Hatoraide

    Before my current job, my last crack at using MS Windows as a desktop was in 2000. It lasted about 6 months before I decided Linux made a better desktop. Back then I was using Windows 2000. I didn’t have any particular gripe with it – just didn’t really get along with it. I found it to be reasonably stable – at least as stable as a Mac of that era but less stable than Linux. I used Linux until November 2005 when I moved back to Mac. The change was dramatic: when I left, I was running Mac OS 9 and I came back to Mac OS 10.4 – a modern Unix based OS which, after years on Linux, felt like a good mix of Unix and lickable buttons.

    At my current job, I don’t have the benefit of choosing the OS of my desktop, and the imagined redtape involved in connecting my laptop to their network means that for the first time in a long time, I’ve got Windows on the desktop. I’ve been using Windows at work for almost 4 months. Windows XP, SP2.

    After all this time, I figured Windows would have improved. Surely, I thought, after almost 8 years of development things must be good – after all, consider the improvements in Linux since Red Hat 6. Literally leaps and bounds in all possible measures. Mac OS also went from an OS with no preemptive multitasking ( they used cooperative multitasking) and no memory protection to a modern Unix with all associated goodness.

    Windows XP, to me, doesn’t seem to have improved at all since 2000 aside from that annoying dark blue Crayola “theme”. It might be marginally more stable, although that could just me treating it with kid gloves.

    When my PC started playing up recently, I called in tech support. They asked when I’d last rebooted it. I said, “Oh a week or two?” – Everyone looked at my like I was King of the Muppet people. I retorted to the laughter with “Seriously? I though that was a joke! It’s 2008!” They laughed, closed the ticket and told me to reboot. It didn’t fix the problem. Next they suggested I’d installed to many applications and that was slowing it down. I’d installed Safari and the related Apple stuff dragged in (iTunes, quicktime, Bonjour, Software Update), Firefox, Wireshark and a couple of Jabber clients to test a jabber server. That’s it.

    I agreed to uninstall the stuff I wasn’t using or didn’t really need. The tech support guy opened up the add/remove program control panel and I deleted a few bits of software I’d been playing with (Safari for Windows). After removing software and rebooting again, the problem persisted. So I figured I’d uninstall some more software – but you need admin rights to open the add/remove programs control panel! So, you can install software, but you can’t uninstall software?! Apparently this is all you can do to fix problems. The next step, in the estimation of my Windows support guy, is to rebuilding the box from scratch.

    Now, I admit, I’m no Windows administrator, but how can you seriously run websites or email servers or anything with a modicum of importance on this stuff? It’s garbage. No wonder MS are so into clustering – rather than fixing problems on servers, you simply rebuild them. Just take it out of the cluster and nuke it.

    It doesn’t stop there. I’ve been documenting the more ridiculous aspects of life on Windows. Windows Explorer, one of the most used apps seems to have stood still. It does not keep the files on the right in alphabetical order. Copying or saving a file from an application into a directory simply adds that item to the end of the list. It seems you have to refresh the folder list to get them in order. Which is odd because the list of files & servers constantly flickers – I guess because of the attached network shares updating in the background. If you’re going to have an annoying, flickering explorer, at least it should be updating the file list to keep them correctly sorted. It’s kind of like an old fluorescent tube with a bad starter. It seems you can hide files beginning with a dot in the right hand side, but but not for folders on the left. Not only that, but Explorer doesn’t seem to be able to create a folder or file beginning with a “.”. To cap it off, the Explorer has no duplicate function, only copy/cut & paste.

    Opening documents in Excel, Word or Visio sometimes opens them in separate windows, sometimes in the same parent window. This is some sort of brain dead MDI behaviour. I can’t figure out how to make individual documents consistently open in their own window. To top it off, in both cases there are two buttons in the task bar. Alt-Tab shows you two word icons – naturally they’re different – one probably represents the “Parent”.

    Of course, both windows show up in the task bar, and naturally, each window from the same app respond differently to mouse-down / mouse-up. Sometimes you get the window on mouse-down, sometimes you have to wait for mouse-up. Sometimes, it works like you expect. Usually when you call someone over to show them.

    Say you have Word open, then you open another word window, then a third. The layering of windows is inconsistent. Click and hold on each of the different windows in the task bar, and you’ll get different responses – sometimes the window jumps straight to the top, sometimes a different windows jumps to the top on mouse-down, only to disappear behind the correct window when you mouse-up.

    The number of reboots is funny – like most jokes about Windows, this one is true. Ian just bought a new laptop – the first thing it did, after starting up, was to reboot. And then to reboot. And then one more reboot. Just in case. I think the total was higher than this, but I lost count. You have to reboot when upgrading Acrobat. I try not to use caps lock. Just in case.

    Want to look for a file? I tried using the inbuilt search function for the file “services” and initially didn’t return any results. When I open the C:\WINDOWS\system32\drivers\etc directory – so I could see the services file, the next search found it. Naturally this file can exist in C:\WINDOWS\system32\drivers\etc\services or C:\WINNT\system32\drivers\etc\services. For consistency, they’ve capped it at two locations. Brilliant.

    Windows Security sucks. You can have your ability to change the desktop image removed – however you can still set the desktop image with an application such as Paint which hasn’t been locked down. You can install applications, but have your access to “Add/Remove Programs” denied so you can’t uninstall them. Security in this sense seems to apply only to the method of doing something, rather than the result. So, instead of locking the desktop image, they lock the ways they know of changing it. Instead of stopping you installing software, they block access to the Add/Remove program.

    I have this fond memory of Visio – the excellent drawing program. Doesn’t seem to have changed since I first saw it in 1999. Compared to OmniGraffle, it’s rubbish. Lines are never straight – they often seem to have kinks in them because the snap-to function doesn’t seem to consider a straight line as useful. Nothing seems to be anti-aliased. There’s jagged lines all over the shop. Fonts look especially craptacular – but I’ll accept that I’m just used to seeing them nicely anti-aliased on a Mac, and that you can “get used to it”. They do look better if you turn on the ClearType stuff ( just a simple download, install and reboot for smooth fonts. ) Ctrl-w doesn’t close a window in Visio – it zooms to fill the window with the document. You need good old alt-f4 or alt-f-c. Naturally neither of these are listed as short cuts are documented in the “File->Close” menu option.

    It’s this inconsistency that really gets to me. Just when you think you’ve got it sorted, it randomly changes.

    I hear tell that Vista may actually be better, but reports are conflicted. For the foreseeable future, Windows for me will be simply a boot loader for Call of Duty 4.

  • Booko improvements

    I was contacted by a chap from The Nile to let me know that they not only have an Affiliate program I could join, but they have an API to access their site! I’ve spent the last couple of days adding the affiliate links. You’ll see that several stores now appear to link to clixGalore – but fear not, the links will still get you to the page you’re after.

    You’ll also notice there’s now a new store to search – The Nile. It’s the fastest of the search engines by a considerable margin. ( Which isn’t really fair – at least one of the sites which is searched is just a fancy screen scraper.)

    Additionally, I’ve cleaned up the CSS and layout some. Hopefully you won’t have the horizontal scroll bar on your browser, regardless of how wide you open the window.

    You’ll also notice that there’s a context sensitive help message in the top right-hand corner. This should make it clear what you can do at which ever page you happen to be on.

    Try out the updated Booko and let me know what you think.

    EDIT: Added a tool tip style mouse over for the Most Popular/Recent list so you can see the full title. Thanks to Niall & Riina for their help & ideas.

  • Satin Rulez

    satin rules - bathroom graffiti

  • Sam Harris Videos
  • Forest clearing machines

    These are some pretty cool machines. The first one is a Valmet ( a Finnish brand ) shows an attachment for clearing trees – seems like a really effective piece of hardware. The second clip shows a machine I think was invented in Finland, then bought by John Deer. It shows a very similar machine but has replaced the tracks with 6 legs. Apparently legs don’t rip the soil up as much, meaning forests recover faster.

    And the walking version…

  • Fighting Windmills

    Another in my series of fighting windmills. This is an email I sent to Origin. Didn’t get a reply.

    Hi there,
    I noticed on our bill you list total energy used in kWh – I was wondering why you do this, rather than simply measure kilojoules (kJ)? As 1 Watt is 1 Joule per second, our bill of 17.2 kWh means we used 17.2 kilojoules per second, for an hour during the last 3 months. Instead of the rate we used energy, wouldn’t it be simpler to just state the energy used – in this case 61,920 kJ?

  • Fragment Caching is go

    I added fragment caching to Booko the other day. I’ve added caching to four sections, the Recent Searchs, Most Popular, Shopping Cart and the section which displays the prices of a book.

    Now, instead of calculating the most popular books every time someone views a page, we look to see if that part of the site has been created recently – if it has, use it again. The Shopping cart is another good example – it only changes when you add or remove a book from it. Now Booko avoids having to calculate the cost of your shopping trolley at all shops every time you view a page – it regenerates that part of the page only when you add or remove a book.

    Kinda wishing I’d bench marked it before and after. I think it’s faster now – but that’s because I’m looking for it. It feels snappier. Anyway – let me know what you think, faster or slower?

  • Booko updates

    I’ve updated Booko’s cart feature. You now get a link to Amazon ( com or ) which will prompt you to add multiple items to your Amazon cart and set me as the Associate. Should make buying a bunch of items way easier. Now I just need to figure out how to do the same thing with Fishpond.

    Also, fixed a bug with a shop’s scrapping code.

  • Another child of the truly Faithful dies.

    Title says it all. Read the sad details here. Like the previous post about this except the parents are being charged. It’s amazing that Faith is seen as a positive trait for people to have. “I don’t need evidence, I’ve got Faith!”. Resolving conflict when one side has “Faith” is difficult or impossible because they don’t care about rational argument. That’s the point of faith – belief with out proof. Or more cynically, belief despite the mountains of evidence to the contrary.

  • Why are book prices in Australia higher than US & UK?

    Interesting article about book prices in Australia. Basically, we’re being screwed over by the Brits.

  • Differences between the US and the UK

    Interesting survey by the Economist on various topics. One section shows that 80% of Americans believe in god, but when it comes to who should get a tax break, 35% believe the middle-income families deserve it compared to 20% for the poor. Compare this with 40% believe in god in the UK and 40% of people believing the poor should get the tax cuts. Seems that being devout has little correlation to being charitable or having concern for those less well off.

  • Police: Girl Dies After Parents Pray for Healing Instead of Seeking Medical Help

    These people should be charged. I wonder what would happen if someone let their children die because Zeus didn’t answer the parent’s prays?

  • Electric Religion


    Persinger has tickled the temporal lobes of more than 900 people before me and has concluded, among other things, that different subjects label this ghostly perception with the names that their cultures have trained them to use – Elijah, Jesus, the Virgin Mary, Mohammed, the Sky Spirit. Some subjects have emerged with Freudian interpretations – describing the presence as one’s grandfather, for instance – while others, agnostics with more than a passing faith in UFOs, tell something that sounds more like a standard alien-abduction story.

    Who knows? Perhaps mystical visions are in fact nothing more than a bit of squelchy feedback in the temporal lobes. But that’s such a preposterously small part of what most people think of when they think of God, it seems insanely grandiose to suggest that anyone has explained away “God.” It’s almost ironic. Every so often during one of America’s little creation-science tempests, some humorless rationalist like Stephen Jay Gould steps forward to say that theology is an inadequate foundation for the study of science. Noted. And vice versa.

  • BigDog!


  • Better carts

    Well, my first attempt at a shopping cart was pretty naf. There was no feedback to tell you that something was happening when adding or removing books from your cart, and every book added was listed individually.

    I’ve added some feedback now for adding and removing from your cart, and added the number of items beside each item. It’s quite a bit better. Still looks crap tho.

  • Return to Dark Castle released!

    Well, they’ve finally finished. I was sure this was always going to be vapourware, but it looks like they’ve kept their word. I’ve had a play of the demo and it’s very reminiscent of the original. I’m not sure if that’s kind of cool and retro, or lazy. Regardless, the demo was fun and I’m pretty tempted to shell out the $33.83 AUD it costs to relive my childhood. You can find the game here along with a demo version.

  • Booko updates

    Well, I’ve added another feature. You can now add books to a cart, which will calculate the price to buy all books in your cart at the various online book stores, including calculating shipping.

    It might be slightly problematic for collecting referrer fees as people will probably not be clicking on each of the book links. I’ll have to have a think on that.

    Next job is to make it look better.

  • Letter to SBS

    I’m in an emailing mode lately.

    Hi There,

    While watching tonight’s story on the Lord’s Resistance Army on World News Australia, I’m curious as to why you would label their leader a “Mystic” – he is a self proclaimed Christian. Why would your well respected news desk make this error?


    Dan Milne

    Dan Milne

  • OpenID

    I started playing around with OpenID today. It’s a solid concept – single set of credentials for signing on to multiple sites. This means that for a site that is a Relying party (ie – the place you want to login to), you can enter your OpenID URL and hit “Login” – you’ll be redirected to your OpenID Provider, where you’ll be asked if you trust the original site. Depending on the provider, you’ll be asked to trust Once, Forever or Never

  • Letter to a polly

    Sent an Email to Jenny Macklin – I wonder if I’ll get a reply?

    Dear Minister,
    I am writing to you to express my concern about recent coverage of Aboriginal health, education and welfare and to offer a simple suggestion which I believe will make a great difference in the race to improve quality of life and educational outcomes in Aboriginal communities.

    I believe the introduction of school provided meals for breakfast and lunch, free of charge and of high quality, could go a long way to achieving several important outcomes:

    • Improved health
    • Improved school attendance
    • Improved ability to concentrate, leading to better academic performance
    • Exposing children to what should constitute a proper diet ( There is evidence that adult dietary patterns are learnt in [childhood )- Allowing parents to focus on self improvement, by needing to provide 10 fewer meals per week.
    • Reducing financial load on families.

    A recent article on Aboriginal welfare, highlighted nutrition as a key problem. Providing proper meals helps meet the foundation of Maslow’s hierarchy of needs. Once these basic needs are met, focus can be moved to other community problems.

    Finland, consistently one of the highest performing countries in educational results has provided free school meals to everyone since 1948. A key point is that all students should be provided meals – providing meals to only those in dire need has a stigmatising effect.

    This is by no means a complete solution, but could provide immediate improvement in quality of life for young Aborigines. Providing free meals to Aboriginal students could be considered as a pilot program, as it is my opinion that, in the future, all Australian schools should provide all students with a free lunch.

    Best regards,
    Dan Milne


  • Do Not Call Register

    Not sure why I didn’t sign up for this ages ago!

    Say goodbye to Telstra calling you up asking who your current provider is – well hopefully. Doesn’t stop market research unfortunately.

  • Dkam... Boils... with RAGE!
  • Big Booko updates

    I’ve just finished the biggest update to Booko since it went live. I never liked the fact that you had to wait for all the results to be found before displaying prices. Having each shop get updated was problematic as the end result wasn’t sorted by price. So I found a way to provide feedback while book sites are being searched and having the result sorted by price.

    I’ve found a fixed a few bugs from the last release too around providing a link for the image in the search page.

    So, go to town and let me know if you find any bugs. Any feature requests while I’m at it? I’m thinking of a personal list of viewed books or maybe a shopping cart type feature which calculates the cheapest place to buy all the books on your list – inclusive of shipping.

  • Booko updates

    Well, it’s been a while, but it looks like someone (Tim you’re the only person who looks at cooking books) found a bug. Searching for a book which has an ISBN which is only available via Fishpond and not Amazon, means that you could find the book, but that it didn’t have a title, author or image. Well, I’ve fixed that now.

    Also, you can now click on the book cover image to take you to the price lookup page.

    Lastly, shipping price can now be more than just a single number – I can define rules for shipping. So, for example ( the only one I’ve found so far ) Fishpond have free shipping for books over $50 – this is now correctly accounted for.

  • Go Barack!

    It’s hard to not be impressed by this guy. I find it annoying that I care what happens in the US elections, but it affects us so strongly, and this guy says so much that makes sense.

  • Classic Mac Game may be returning?!

    Man I loved this game when I was a kid.

  • Religion in decline?

    Looks like fewer people are wasting their lives in servitude to their religious beliefs. Sure, some of you are going to say that’s a bit harsh, but really. It’s the 21st century, enough already.

    If you want to know what religious conversations sound like to an atheist, I thought of an interesting mental experiment you can try. Whenever you hear the name of a god you don’t believe in ( God, Jesus, Allah, Yahweh etc) substitute it with “Zeus”, and when you hear the name of a place you go when you die, replace it with “Valhalla”. It probably works better for a god you don’t believe in – the mental jump between a god you don’t believe in, and Zeus is no doubt much easier to jump.

  • Upgrading the HD in a MacBook Pro.
  • More
  • Dancing Help

    Ever feel you need a bit of help disco dancing? Here’s a clip from the 70s to help you out. This guy’s dancing school is still running! It’s the most famous dance school in Finland.

    Check it:

  • is interesting

    I love the idea of TED. “Ideas worth spreading”. Clips of the talks or presentations are available. They seem to be between 5 – 20 minutes long. They vary quite a bit in topics from how ants organise their nests to how we can defeat ageing.

    You can browse topics like Why we age and how we can avoid it. or A surprising idea for solving Climate Change, or you can browse by speakers, such as Steven Pinker and Larry Lessig.

    Some very interesting talks by very smart people with engaging ideas if you’ve got the time.

  • Amazon's customer service rules

    I ordered a box set of DVDs for mum for Christmas. When I ordered them the site told me that it should be delivered before December 24th – but as this was an international delivery, the estimate jumped up to December 28th. I don’t remember if this new delivery date was shown to me before I paid for the DVDs, but it was certainly there after payment. Well, that was a little disappointing, but not completely unreasonable.

    The 28th came and went with no DVDs delivered, so on the 6th of Jan, I emailed Amazon to ask where my package was, as it still hadn’t arrived. They agreed that something must have gone wrong and immediately, without question, shipped another £50 box set of DVDs to me. Excellent customer service there.

    Naturally, the day after the DVDs were dispatched, the original set arrived. Then a week later, the second set arrived here. I logged on to Amazon, resolved to do the right thing and return the DVD set. If they were good enough to send me an extra set, I’ll would return the package. Turns out, on the page to print a return slip, there was no adequate category for “A replacement package for an item which arrived late”. So I emailed Amazon to ask what to do, and how I would be reimbursed for shipping. Here’s the response ( trimmed down )

    As the cost of returning the package is in this case prohibitively
    expensive, we ask that you keep the replacement with our
    compliments. Perhaps you would like to donate it to a charity in
    your area if you feel it would be appropriate to do so.

    That represents some excellent customer service. I makes me completely confident that anything I order from Amazon will arrive, and that if it doesn’t, they’ll replace it, no questions asked. No doubt people take advantage of this, but hopefully Amazon will continue to assume the best of its customers.

  • On Filesharing

    Great interview with the founder of the Swedish Pirate Party.

    What was remarkable was that this was the point where the enemy – forces that want to lock down culture and knowledge at the cost of total surveillance – realised they were under a serious attack, and mounted every piece of defense they could muster. For the first time, we saw everything they could bring to the battle.

    And it was… nothing. Not even a fizzle. All they can say is “thief, we have our rights, we want our rights, nothing must change, we want more money, thief, thief, thief”. And shove some poor artists in front of them to deliver the message. Whereas we are talking about scarcity vs. abundance, monopolies, the nature of property, 500-year historical perspectives on culture and knowledge, incentive structures, economic theory, disruptive technologies, etc. The difference in intellectual levels between the sides is astounding.

  • Family Values under attack!

    Apparently, family values are being threatened!

    THE State Government is indulging in social engineering in giving lesbians and single women access to fertility treatment, giving lesbian partners legal recognition as parents and allowing surrogate mothers, the leader of a Jewish, Christian and Muslim committee said yesterday.

    Heaven’s above! Whatever shall we do! Who’s responsible for this degradation of the moral fabric of our time?

    Rabbi Shimon Cowen said planned changes announced by Attorney-General Rob Hulls before Christmas showed that secularists had hijacked fundamental values and were changing accepted morals.

    Bloody secularists. Next thing they’ll be telling us that owning slaves is “wrong” and that “gays” should be allowed to walk the street with you and me.

    This is a text book example of religion retarding the advancement of society. A bunch of old men who’ve climbed the “holier than thou” ladder of internal church politics presume to tell us that we’re not living by the standards of their sacred books.

  • My new toy

    Well, not that new. Got it just before Christmas.

    I picked it up on Wednesday after work ( The Wednesday before Christmas ), then returned it on Thursday morning. The camera didn’t detect the lens was attached. I took it into Michael’s on Elizabeth street where I’d bought it and was being helped by a competent sales assistant when his manager swanned over and said

    “Ohhh, I don’t think a lens like that will work on that cheapo camera.”

    Ha! Since I wanted what ever was busted replaced immediately, I took a positive approach.

    “Oh I’m sure it does – I’ve read reviews on the internet”

    He then proceeded to check with some other guys if the lens would work with the camera, to which they all said “Yes – of course.”. Turns out it was a faulty camera, which they replaced immediately.

    Anyways, aside from that unpleasantness, I’m enjoying having an SLR. I upgraded my flickr account to a pro account, but it’s also spurred me to continue writing photoKing.

  • Pope calls kettle black

    From the Daily Mail :

    Pope Benedict XVI has launched a surprise attack on climate change prophets of doom, warning them that any solutions to global warming must be based on firm evidence and not on dubious ideology.

    Hahaha. I was sure that was a joke when I first read it.

  • Sunset

    Sunset Christmas Eve.

  • Rain!

    With Riina’s family being in Finland and us not, Christmas will be in Nangiloc this year. Normally this means it’ll be a hot, dry Midwinter Solstice, but the drive from Melbourne to Charlton was enhanced with constant rain. ( I like driving in the rain – probably puts me in a minority I suspect ) About an hour before we got to Charlton ( the halfway point ), the rain really started coming down. Visibility was less than 100 meters and cars were pulling over to wait it out. At one point, cars with their headlights on would disappear until the wipers cleared some rain.
    Then, suddenly, it stopped, and the sky cleared. There was debris all over the road from where water had flooded across bringing sticks, dirt and leaves. The road was completely covered in water in places.

    As we approached Colignan, the sun was setting, making for some beautiful red/ orange / purple skies.

    I couldn’t pick a favourite, so here’s another:

    There’s another of dark skies and a wheat paddock on my Flickr page – taken at 110 km/h from the car. Worked out quite nicely. ( Riina took it! )

  • Testing with Watir
  • Booko gets new search engine.

    I’ve updated Booko to have a default new search engine: Thanks to Tim Evans for finding bugs in it immediately.

    Unlike Amazon, Fishpond ( or any Australian bookstore as far as I can tell ) don’t provide an interface for searching their site. Fishpond take the inconvenience one step further by not providing a standard way of finding a book by ISBN. You have to search for the ISBN, then get the Fishpond ID of the book. ( BTW – searching for an ISBN can return multiple results – the same book, but often with different prices. Apparently it’s due to having multiple suppliers for the same book. ) Aside from these annoying bits, Fishpond seems to have a very complete listing. They have an associate program too, so sending traffic to their sites may provide some return.

    So, I wrote a searching module for Fishpond. Let me know if you find bugs.

  • Finland Finland Finland, the place I'd love to be

    The latest PISA results are out. Extensively quoting:

    • Finland, with an average of 563 score points, was the highest-performing country on the PISA 2006 science scale.- Six other high-scoring countries had mean scores of 530 to 542 points: Canada, Japan and New Zealand and the partner countries/economies Hong Kong-China, Chinese Taipei and Estonia. Australia, the Netherlands, Korea, Germany, the United Kingdom, the Czech Republic, Switzerland, Austria, Belgium and Ireland, and the partner countries/economies Liechtenstein, Slovenia and Macao-China also scored above the OECD average of 500 score points.- On average across OECD countries, 1.3% of 15-year-olds reached Level 6 of the PISA 2006 science scale, the highest proficiency level. These students could consistently identify, explain and apply scientific knowledge, and knowledge about science, in a variety of complex life situations. In New Zealand and Finland this figure was at least 3.9%, three times the OECD average. In the United Kingdom, Australia, Japan and Canada, as well as the partner countries/economies Liechtenstein, Slovenia and Hong Kong-China, between 2 and 3% reached Level 6.

    Speculating on just what it is that makes Finns do so well at running and performing well in education systems is a fun past time for Riina and I. One of my personal favourites is food. Finnish schools provide hot lunches for all students, every day. Kids are practically guaranteed of having a proper lunch – not a Mars Bar ( or Fani Pala – my favourite. Kismet is also great. ) and Coke. Having a good diet will no doubt help for concentration and learning. That’s got to be an advantage.

  • Our new Government

    The Rudd team isn’t all bad apparently – along with getting on board Kyoto, religion will hopefully have a smaller role in our new government:

    The Rudd team is not only younger than the Howard ministries of recent years. Despite Rudd’s acclaimed commitment to Christianity, the Godless of Labor’s front bench outweighs the God-fearing if a propensity to take an affirmation rather than an oath is a guide. Only 19 of the team, including Rudd, held the Bible, while the other 23 opted to affirm their loyalty. The Howard folk were Bible-bearers almost to a person.

    Perhaps they’ll drop ludicrous ideas like School Chaplains.

  • More Religion

    Reuters and the The Age report that the Infallible head of the Catholic Church, Pope Benedict says that atheism is responsible for injustice and cruelty. Lenin and Marx are mentioned in reference to atrocities committed in the name of Marxism.

    This is a common argument you hear from time to time. “If you want to live in an Atheist society, move to North Korea” is an old favourite. However, in societies such as North Korea, religion is replaced by a cult of personality and their own system of belief. These belief systems have the hallmarks of Religion including being idealistic, utopian & dogmatic.

    One thing they don’t have, is people doing evil things “In the Name of Atheism”. The argument is old and busted.

    Atheism encourages rational inquiry over superstition and it can hardly be said that societies such as North Korea or Nazism or people like Lenin or Stalin or Chairman Mao were suffering from an excess of rationalism.

    Aside from being incorrect, it’s typically hypocritical. This is the organisation which protected child molesters from discovery and prosecution, the organisation which facilitates the spread of AIDS throughout Africa and other devout but poor countries by banning the use of condoms. This same organisation criticises Amnesty International for supporting the victims of rape during war who choose abortion. And that’s only in the last 15 years!

    On the same front page of The Age, we get this, another example of what happens when you mix ignorance and faith. It should remind us of what the Dark Ages might have been like.

    You might well say not all ( or even most ) religious people behave in this way. But this is exactly what “Faith” enables – people believing nonsense ( in this case, that their god would be offended that a teacher allowed children to name a teddy bear Mohammed, the most common name in the Islamic world ) with such fervour that they’ll call for the killing of a teacher. It allows people to fly planes into buildings and murder doctors specialising in abortion and believe that they’ll go to heaven for doing God’s work. You cannot argue with them, because their beliefs are not rational, it’s their interpretation of their holy book.

  • Confidence is:

    A Microsoft webserver

    dkam@omena ~ $ curl -I
    HTTP/1.1 200 OK
    Server: Microsoft-IIS/5.0
  • Bad-Ass computer shit
  • Bookie becomes.... Booko

    The domain name was taken, so I figured I’d carry on the tradition of naming the product like it was a person whose name was Book…. Booko. So you can now find the cheapest place to buy books at

    Found another bug today when one of the remote shops was misbehaving. The open-uri library was throwing exceptions I wasn’t catching.

    The original version in the shop model:

    def get_pricing(book)
        eval( self.price_function + "(book)" )
    Replaced by this version:
    def get_pricing(book)
        eval( self.price_function + "(book)" )
      rescue Errno::ECONNRESET => e">>> Connection Reset checking #{}")
      rescue OpenURI::HTTPError => e">>> Connection Reset checking #{}")
    Seems to work quite well.
  • Beatbox Cooking
  • One Last Sunday Ruby/Mac OS X tidbit

    Looks like Ruby in Leopard has been give the Official treatment, with the latest stable version of Ruby ( plus important patches ) included with the base install. The latest RubyGem is included along with a bunch of useful gems like Rails, Mongrel, Hpricot and Capistrano.

    There’s also an /etc/irbrc providing sensible defaults for IRB ( the interactive ruby interpreter ) which requires rubygems for you.

    Ruby also comes with DTrace support which is also pretty cool. RubyCocoa is also included and should be fun to play with.

    Check out this page for more info on Leopard’s new found Ruby Lovin’.

  • My First Ruby Patch
  • Time Machine Rules

    Apple is often accused, especially by my hardcore linux mates, of committing the fatal sin of treating the user like an idiot, of reducing the options, or making things simpler than they should be. I’m pretty ambivalent about these claims. A simple example of this is iTunes and it’s desire to manage the on disk layout of your music. I know, some people want to do this themselves, but really, I’ve got better things to do.

    I’ll be not at all surprised to hear the same sentiment levelled at Apple’s new backup solution, Time Machine. Time Machine takes a complex, boring, sometimes stressful problem and makes it completely foolproof. There is one main choice to make when setting up Time Machine. Which disk to use for backups. You can optionally exclude directories from being backed-up, and you can be warned when old backups are about to be deleted. That’s it.

    I particularly like that you define what not to backup, rather than what should be backed-up. This makes the whole task so much simpler. No guessing which system files should or shouldn’t be backed-up.

    If Time Machine is not configured, and you plug in an external drive, it’ll pop up a dialogue box asking you if you’d like to use this disk for backups.

    To restore files, you can use the cheesy ‘fly through time’ animated system, or you can just go digging through the backups manually.

    If you hard drive fails, you can boot up with the Leopard Install disk and point it at your Time Machine disk and recover your disk to the latest available backup. Brilliant!

    The backups made by Time Machine are reasonably space efficient – it makes heavy use of hardlinks and is a variant of a method that I’ve always thought was very clever for it’s simplicity and effectiveness. Each backup is the size of the all the files which have been modified since last backup. Unfortunately, if you work with large files such as photoshop’s or virtual machine disk images, this means that the entire file is backed-up.

    There will be nay-sayers of course. There will be those who which to control every aspect of the backup. When to run, how frequently to run. There will be complaints that remote disks should be supported.

    But for me, it’s great. It’s taken a task that I have done myself with rsync and cron and made it a no-brainer. A backup solution that my Mum will be able to use. ( I’ll help you set it up mum ;-) )

  • Operations as a competitive advantage

    I love reading articles like these, mostly because they deal with issues that I see almost every day in my day job. Adding a new server to your deployment should be as simple as doing a base install and then pointing your configuration management system at it. The hard work should be done once, defining services, their configuration and their relationships.

    The operational efficiencies gained from an automated configuration management system should extend beyond growing your current server farm. The time taken to track down bugs and reproduce problems should fall substantially when you know all your servers have the correct configuration. No more diff’ing the config across multiple servers to figure out why one is behaving different to another. No more checking software version numbers across hosts, because sometimes, a host is missed during an upgrade. No more wondering if apache is supposed to be installed on one of your mail servers.

    Once your operational staff are relieved of these tedious tasks, their time can be used more effectively in improving aspects of your service. All those tasks that should be done “one day” such as implementing or improving backups, capacity planning or monitoring and reporting of the service can finally get some love.

    As we move towards a virtualisation of hardware, automation of provisioning, building and management of servers will become ever more critical. Businesses with advanced operational practices will gain a competitive edge over those organisations who still manually build, configure and maintain their hosts.

  • Threading the Bookie

    Bookie currently checks prices at 9 shops. When you view a new book or refresh the pricing, it checks each of those shops in sequence. A nice little optimisation is to check the shops in parallel. Threading in rails appears to be pretty straight forward – provided you clean up before the request-response cycle is complete.

    Here’s the sequential version:

    for shop in Shop.find(:all)
    And the threaded version:
    threads =[]
    for shop in Shop.find(:all)
    threads.each{|thr| thr.join}
    By default ActiveRecord doesn’t allow multiple threads to access its mysql connection, so you need to allow concurrency by adding the following line to your environment.rb file:
    config.active_record.allow_concurrency = true
    That last line in the example is used to close database connections which are no longer attached to a thread. You’d have thought that joining the thread would have closed it’s database connection, but there you go. Without this you’ll eventually exhaust your database connections.
  • Rent or Buy?
  • Keith's in the Age!

    Check it – Keith made the Age. In Nangiloc, it’s on page 4 – but I didn’t find it in the edition we’ve got at work.

  • Another Shop for Bookie

    I’ve updated Bookie by adding another online Australian retailer, Fishpond. They seem to have good pricing on some books, and as a big plus, they have an Affiliate program which I’ve signed up for. I’ll get a cut on any books purchased via Fishpond, Amazon UK & Amazon US.

    Adding Fishpond wasn’t as straight forward as the other stores. When searching for an ISBN, you can get multiple results, with different product ids and different prices. (According to their support guys, it’s because they give different product ids to books provided by different suppliers.) Just to make life difficult, the product id needed to generate Associate Links isn’t simply the ISBN. After a little bit of Hpricot work, I figured out how to grab all the data required to select the cheapest book ( if there’s multiple results ) and to generate Associate Links.

  • Database migration

    Lots of you have been noticing that “Bookie” craps out pretty frequently – turns out it’s due to SQLite3:

    ActiveRecord::StatementInvalid (SQLite3::BusyException: database is locked: SELECT * FROM books WHERE (books.”isbn10” = ‘978-0596005696’) LIMIT 1):

    Session data ( stored in the DB ) was a major culprit, but it looks like more than one concurrent user ( It happens! ) can cause this problem. SQLite’s homepage states that write operations lock the whole table, but since this should only take milliseconds, it shouldn’t be a problem.

    I’ve migrated over to MySQL and performance feels much snappier. Maybe that’s just because I was hoping it’d be faster. With luck, bookie should be far more stable now.

  • Chemical Brothers - The Salmon Dance

    Such a cool song.

  • Watching the telly

    We’re going to have some interesting ways to watch telly in the next few years. Video content is popping up everywhere now – the iPhone, Sony PS2, iPod Touch and iPod Video are pushing slowing into the mainstream – watching TV on the train on the way to work is not unusual now, and much more practical than whipping out your laptop. MythTV, Windows Media Centre and TiVO are growing slowly, bringing timeshifting into the mainstream. AppleTV brings ( or will bring ) shopping for TV shows and movies to the Telly.

    And of course, BitTorrent is helping to sharing TV around.


  • Only in America? As if.

    I seem to be posting quite a bit about religion lately. I don’t think it’s on purpose, it’s just that there seems to be lots of stuff to write about. For those of you who don’t know, Gardasil, is a drug which provides vaccination for the human papillomavirus. The virus is responsible for a large percentage of cervical cancer cases and can also be responsible for genital warts, so it’s eradication is important and highly desirable. Some time ago we heard on the telly, that whack-job Americans were refusing to allow their daughters to be vaccinated because, apparently, they fear their daughters were more likely to become sexually active if they were immune to the human papillomavirus.

    I know, I know, crazy Americans. Well, turns out we have our own share of Christian parents who’d rather their daughters were vulnerable to cancer than be vaccinated against an STD. Let me rephrase that – they prefer to risk their daughters to cervial cancer, rather than risk them having pre-marital sex.

    Even worse, to effectively eradicate a disease like this, all women need to be vaccinated. Not only are these parents more concerned with their daughter’s coital activity than their risk of cancer, they’re putting the rest of the community at greater risk of infection. This is amazingly selfish and hypocritical behaviour.

    Vaccinations such as these should be mandatory.

  • Catholic church committing genocide in Africa?

    The BBC ( among others) is reporting that the head of the Catholic Church in Mozambique, reportedly widely respected throughout the country, believes that condoms not only don’t work as a method to stop transmission of AIDS, but are actually infected with the virus as part of a plot by European manufactures to destroy Africa. Abstinence for the unmarried, and fidelity for the married is the only way to stop the infection, according to the country’s head of the Catholic Church.

    The BBC’s Jose Tembe in the capital, Maputo, says it is estimated that 16.2% of Mozambique’s 19m inhabitants are HIV positive.
    About 500 people are infected every day.

    At what point can opinions like this be classified as genocide? The Catholic church needs to accept part of the responsibility for the spread of this disease in countries where it has poisoned public perception of safe sex with its ludicrous propaganda.

  • Darwin & Big Explosions
  • George W. Bush says Saddam killed the Mandelas

    What a joke.

  • Bookie updates

    Couple of small updates to Bookie, the most interesting of which was to filter the “Recent Searches” list to exclude filthy words. Timo was both the cause of the problem and suggested the solution. Thanks. I think ;-)

    Here’s how it used to look:

    ( Note: It’s searching the book prices as they maintain an “updated at” value )

    Price.find(:all).sort_by {|p| p.updated_at }.reverse.collect {|p|}.uniq.compact.slice(0..14)

    To filter out books with bad words in their title, I changed it to this:

    Price.find(:all).sort_by {|p| p.updated_at }.reverse.collect {|p|}.uniq.delete_if { |b| b.title =~ / shit| piss| cunt/i }.compact.slice(0..14)

    Adding the following will delete the Books containing rude words:

    .delete_if { |b| b.title =~ / shit| piss| dick/i }

    How sweet is that? You can practically read it like a sentence.

  • Irony overload
  • I've missed XKCD

    Insomnia and Action Movies

    And yes, we’re home from our honeymoon. I’ll probably write a “We’re home from our honeymoon” post real soon now.

  • Last bookie Change for some time

    OK – I’ve made the last change to Bookie for a while. The search form is now available on both pages – meaning navigation is a no brainer. I’ve also moved the site officially to a VPS.

  • Just because it's funny

    Browsing around I came across this page – I ‘ve seen it before but I thought I’d link to it for your pleasure. It’s the Anonymous Atheist Complaint Box.

  • New hosting for Bookie coming

    It’ll be time soon to move to a real host. My single 1GHz CPU with 750MB of RAM was a good starting point, put it’s really not up to snuff. And by real of course I mean a VPS host. Which is new hotness. Real hosts are old and busted.

    I’ve gone with Gentoo of course, being the Ricer than I am. -O99 and all that. I should probably have gone with Debian Etch. It is the OS I work with as a professional and lets face it, way faster to install. On the other hand, the new host, being at the bottom of the list of the VPS on offer at my host ( ), it has only 256MB of RAM – so the obvious optimisation is clearly -Os. Which no doubt will make a huge difference. To avoid pushing into swap, it’s running on 4 mongrel instances – which should probably be just fine for the time being.

    It’s address is – let me know what you think of performance.

  • Delivery info available in Tool-Tips

    MouseOver on the delivery rate will now give you a Tool-Tip containing delivery information for that shop. Makes it easy to see now that while some shops are expensive, they may offer multiple deliveries for a flat rate.

  • Top ten unix shell commands

    Saw this meme on Ben’s Blog

    My OSX laptop, used at work and home, for business and pleasure:

    history |awk '{print $2}'| awk 'BEGIN {FS="|"} {print $1}'| sort|uniq -c | sort -r |head -20
      84 ssh
      71 cd
      64 ls
      23 rsync
      22 openssl
      17 less
      15 stunnel
      14 killall
      12 svn
      12 scp
      11 find
      10 script/console
      10 netstat
      9 vim
      9 rm
      8 rake
      8 ps
      8 mongrel_rails
      7 tail
      7 sqlite3
  • New Shop for Bookie

    I’ve added your favourite bookstore and mine, Readings.

  • Bookie updates

    Some more functional changes to Bookie this weekend. The major change has been that the pricing information is now retrieved once the page has loaded, with a spinning icon to show that work is being done. Should probably find a larger animation, or one that says “Loading Pricing Info…” with some animated dots. Or something. This should provide much better user feed back that something is happening.

    I’ve updated the CSS to make it look a little nicer, but it’s still focused on getting the functionality right. Most people who’ve provided feed-back ( thanks Rob & Niall ) want either a consolidation of searching and pricing, or having the search bar available from the pricing info – saving extra clicks. I’ll have to chew over these to figure out a good approach.

  • More Bookie bug fixes

    Couple of changes to Bookie recently:

    • Changed the label for the search from `span to label (Thanks Phil) Updated the html in the “Recent Searches” to use lists rather than spans – this makes more sense really. (Thanks Phil) Updated the price layout html to use a combination of div and span, rather than an html table. Fixed a bug where selecting an item after searching in the US Amazon, would then go and lookup the book details from the UK Amazon. If the book didn’t exist in the UK Amazon, the title became the ISBN. Bookie now searches both Amazons for book details.


  • Interview with author of Puppet

    Great interview with the author of Puppet in Computer World Australia. It’s refreshing to find someone expressing and dealing with issues like this.

    The truth is, the state of computing is absolutely pitiful. There are essentially no good tools for sysadmins, and the practice of system administration relies almost entirely on hand-building and hand-maintaining operating systems; those who aren’t doing things by hand are almost exclusively using tools they built themselves and will never publish, including places like Google.

    It’s so true, but as with many truths, sometimes it takes someone to say it plainly. We system admins ( at least the ones I work with ) dislike the tedious work – the typing monkey work, but love the challenge of a new problem to solve. When the tedium becomes too strong, we write scripts to do the typing monkey work for us. This can be as enjoyable as solving problems. This is probably the point where non-geeks are scratching their heads saying “Did he just say enjoyable?”.

    Some parts of the interview give my sense of humour a wry poke:

    sure, you can tell Apache is running, but is it supposed to be running or did someone just start it while testing something six months ago?

    Ha. So true. We see this kind of thing all the time – especially with boxes which have been running for a while. ( I was sad to have to update the kernel on some machines a few weeks ago – 522 days of uptime ). “Is apache supposed to be installed on this box??” The more I get to know puppet, the more I think it’s got a place in the toolbox of the sys admin.

  • Sam Harris Speech

    An enjoyable speech given by Sam Harris can be found here. Sam follows his speech up with short Q&A session. The subject is familiar to those of you who’ve read his latest book, Letter to a Christian Nation. If you find Dawkins too aggressive, you may find Sam Harris to be more your style. It’s difficult to describe the differences in their approaches, you could perhaps sum it up as Dawkins appealing to your intellectual side, whilst Harris is after your understanding.

    One of my favourite quotes:

    I submit to you that there really is no society, in human history that has ever suffered because it’s population became too reasonable, too relucant to embrace dogma, or too demanding of evidence.

  • Australian Book Prices & Scratching an Itch

    Sometimes we pay more for stuff in Australia. It’s a small market and we’re a first world country with a high standard of living. But sometimes, this premium seems totally unjustified such as when comparing prices we pay for Books , to prices in the US or even the UK – a country with a higher cost of living. It’s often cheaper to buy a book from Amazon in the US or UK and have it shipped here, than drop into your local bookstore.

    And I enjoy reading. I try to squeeze as much reading as I can into my life, I tend to buy a couple of a books at a time when the mood strikes me. Whenever I buy books, I wonder if I’m getting the best deal – I’ve never been bothered to find a good Australian book site with good prices – it’s just so much work logging into every site and comparing them all. Then figuring out the shipping, then wondering if I should just get in the car and drive to the shops. Should I factor fuel, parking and time into the cost if I do that? Does all the work make up for the postage? How much time have I spent weighing these options already?

    So, what’s the point of learning the latest fad web development environment if you can’t knock together a quick and easy website to scratch that itch? So, I built Bookie – a website that compares Amazon (US/UK) with the first Australian online bookstores which came up in a Google search. I’ve even gone and gotten me some Amazon Associate accounts to possible make a tiny bit of cold hard cash. It’s a bit buggy, but that’s ok – send me an email if you can make it crash.

subscribe via RSS