September 26th, 2007

There are moments in life that teach you things and moments that renew your spirit. There are moments that cause you to reflect deeply on how to continue your journey - to be a better person, to go further and to do more. There are moments that bring inspiration and moments that confer wisdom. Rarely, there are singular events in life that bring all of these together in one life-affirming experience. For me, one such event occured this morning when I watched Randy Pausch's last lecture - a gift of incalculable value.

July 22nd, 2007

It's been a long time since my last post but I've been working on improvements to and articles for the PRFSA site. My recent weekend was packed with exciting adventures including going to a 00:01 advanced preview of one hell of a movie and having the privilege of being blown out of my seat by the awe-ispiring talent of The Suchet.

July 1st, 2007

Loosely related to my last post, I heartily recommend Ebon Moglen's recent lecture to the Scottish Society for Computers and Law. It's full to bursting with oratorical fireworks, well-informed reasoning and passionate advocacy. I wish more people spoke like this.

June 30th, 2007

There is currently a massive backlash against one of my favourite artists for giving away his own music. It's official: the music retail industry is populated by pathetically risible amoeba and they no longer even have the decency to conceal their petulance.

June 14th, 2007

The more I find out about it, the more I am enamoured by ZFS. If used properly it promises to render obsolete most of the RAID controller / specialised chassis / expensive NVRAM / fibrechannel rubbish that masquerades as an industry. Just think - a 4U JBOD with 16 disks and a couple of eSATA cards plus a cheap Intel motherboard and chip (including on-board ethernet) gives you a delightfully inexpensive NAS that is as performant, more reliable, easier to administer and probably higher capacity than commercial RAIDs costing twice or even three times as much.

June 9th, 2007

The PRFSA site is now up (albeit in a dreadfully simplified state).

May 25th, 2007

It's not often that it happens but I've just watched a pop music video that's gotten right under my skin. Whilst nothing can displace Thriller from the accolade of 'ultimate music video', the construction and concepts at play in the video for Tracey Thorn's new song 'It's All True' make for an instant classic.

May 17th, 2007

There's an interesting debate going on over at Slashdot at the moment. The bit of the debate that I find particularly engaging is the drawing of parallels between the mindset and skills of a geek and that of a lawyer. Indeed I have often found that, as a computing-nerdy-type-person, I have a dark and slightly lurid fascination with the law. The trial under discussion is one where (for whatever reason) the Judge has stated that he doesn't really understand the term "web site". Like many of the Slashdotters, I am glad the Judge is willing to state this openly and unashamedly and that the trial and ruling will be made more effective by having a decent definition form part of the record.

However, it does kind of go to the heart of how expert testimony is required and deployed in such cases. The recent UMG v Lindor case brought by the MAFIAA typifies the use of downright obfuscation to make legal points not supported by technical evidence. Not being a lawyer, I am unfamiliar with the reasoning as to why we tend not to favour expert Judge streaming (judge A for Internet cases, judge B for medical malpractice and so on). All one needs to do is appreciate the history of bad expert evidence (a particualrly sad example of which is discussed in this brilliant TED talk) to see the motivation for such a scheme.

April 28th, 2007

Every so often there is a geek pilgrimage to be made into the heart of childhood. This weekend I was in a peculiarly Wagnerian mood and no-one can listen to Wagner in quite the same way if they've ever seen what I am going to go out on a limb and call one of the greatest cartoon shorts ever made. Sure - Duck Dodgers is brilliant, as is The Rabbit of Seville. However, for sheer genius and poignancy, this one gets me every time.

April 26th, 2007

Over a month since my last post (my powers are weak - old man). I was sitting munching on a pastrami, Leerdamer and cranberry bread sandwich and it struck me that never have I felt so justified in my anti-privatization stance than in the last few days of attempting to get my gas meter moved. My meter is located in another person's flat for historical and completely suspect reasons. I have no access to it except by mutual appointment. Thus it made sense to get it moved.

I called my provider who said that it was a physical, pipe-related enquiry (well - yeah) and so I needed to speak to the people who maintain the network in my area - Wales and West. The rebarbative middle-aged woman who answered my call told me they have nothing to do with my network and that I needed to speak with Energy Watch to find out who did. Energy Watch told me that they were merely an oversight body and that I actually wanted The National Grid. In turn, TNG pointed me in the direction of my original provider and then (after some raised voices) to Scotia Gas Networks who apparently do run my local network. SGN then sent me to a webform on their site to book a call regarding getting an appointment for an assessment of my transfer requirements. Come back original British Gas, all is forgiven.

March 21st, 2007

It suddenly occurred to me today that one of the most famous documents on Earth has a glaring grammatical error at the beginning...

We the people of the United States,
in order to form a more perfect union...

March 2nd, 2007

I was recently putting together a credit card processing library so I was embroiled with the finer points of the Luhn algorithm. In particular, I was a little disappointed to find only long-winded versions of the algorithm for Ruby that were designed to operate on incoming integers. From a practical perspective, PANs are almost always floating about as strings after they've been POSTed via a web form. The fact that its a string makes it much easier to reverse the order of the digits - pretty much the first thing you want to do. Here's my stab at an ultra simple version that uses the fact that the double-reduce-sum operation gives a one-to-one mapping...

def valid_luhn?(pan)
    drs_lookup = [0, 2, 4, 6, 8, 1, 3, 5, 7, 9]
    sum = 0
    pan.split("").reverse.each_with_index do |digit, i|
        d = digit.to_i
        sum += (i % 2 == 0 ? d : drs_lookup[d])
    end
    sum % 10 == 0
end

February 22nd, 2007

Once more unto the breach. I've manufactured a fairly good progress bar. It uses some hot div on div action. The only thing that it really needs is an animation library behind it so that it can sweep smoothly from point to point as the real one does in Mac OS X. Something like my simple cubic tweeing function would do it...

// Gives a T second cubic variation - f(t): 0->1 as t: 0->T
float tweenCubic(float t, float T) {
    return (t * t * (3 * T - 2 * t) / (T * T * T));
} 

February 21st, 2007

Some guys from PC World have posted a rather good article about the more irritating aspects of Windows Vista. It's not just MS bashing - there is a real sense of bewilderment that some of this stuff was the best they could come up with over five years of development.

February 16th, 2007

It's very simple - I want one.

February 15th, 2007

Since I've now received a number of requests for it, here's the solution to the maths problem I quoted 5 days ago. The important first step is to express n in a fashion that allows us to deal with the last digit in isolation (1). With this defintion, we can then re-express the 'number constructed by moving the lowest digit of n all the way to the left' (2). This leaves us with an equation (3), which may be simplified (4). Now the challenge is to find some value of the free parameter (p) so that the fraction reduces to give an integer less than 10 on the bottom (5). Thus we have both a and b and from (1) may find the value of n and check that it satisfies the constraint (6)...

(1) n = 10a + b
(2) b * 10^p + a
(3) (3 / 2) * (10a + b) = b * 10^p + a
(4) a / b = (2 * 10^p - 3) / 28
(5) a / b = 19997 / 28 = 28571 / 4 (with p = 5)
(6) (3 / 2) * (285714) = 428571 : QED

February 11th, 2007

Continuing with the CSS-based-OSX-look endeavours, I've now got a reasonable table and the first animated widgets - a busy spinner and a barber's pole.

February 10th, 2007

The most amazing facet of not getting things done is the way in which time is stolen from you in almost imperceptibly small chunks. It has taken me nearly a year to post something new to my site and it has not been for want of trying. There is a conspiracy of distraction to life that is simultaneously intriguing and obstructive. In that spirit here's a 2-minute maths problem I recently found interesting...

Find the smallest number (n) such that 3n/2 is equal to the
number constructed by moving the lowest digit of n all the
way to the left.
contact: andre-at-domain - site design inspired by Apple Mac OS X