“Our logic is full of holes...
I can see the bubbles.”
Thursday 5th November, 2009
Java should not look like this: code from the undergraduate archive.

private static int[] s(int[] a, int sd) {
        int b=0, ds = sd, dsa = (sd!= 0 ? Math.abs(sd) : (ds=1)), f=0; // assume 0 is positive
        for (int d=0; d < a.length; d++) b = (a[d] >  b ? a[d] : b);
        int[] c = new int[b], e = new int[a.length];
        for (int d=0; d < a.length; d++) c[a[d]-1]++;
        for (int d=(sd < 0 ? b-1 : 0); (sd < 0 ? d >= 0 : d < b); d+=(ds/dsa)) while (c[d] > 0) {e[f++]=d+1; c[d]--;}
        return e;
}

by Rob Mitchelmore, 14:13 (anchor)
Monday 21st September, 2009
A vision of the end of the world on the aeroplane to Arlanda: British Airways' GPS screen just showing a blue screen with NORTH SEA in the middle of it; and outside only clouds, so all that could be seen was a bright featureless luminous whiteness, cutting the world inside the fuselage off completely from the world outside it. Maybe the end will come as an all-pervading luminous mist, thicker and thicker, dividing everything from everything else until one is alone; and then dividing oneself from oneself, part by part, in reducing awareness until there is no self left to experience, and no world left outside for it to experience either.
by Rob Mitchelmore, 00:54 (anchor)
Thursday 17th September, 2009
A brief review of the final of the tournament BWC season held in Waltham Chase on Sunday 30th August 2009.

Final scores were:

Rob Monil but enlightened. Drawn on by himself.
Ian269+6i. Drawn on by Rob Mo. Lactose intolerant.
Toby96+6i-5j. Drawn on by Rob Mo while gloved.
Rob Mi483+6i. Wearing one sock due to iconoclasm. Half a king.
Jimmy5+7i but +8 against rodents.
Emma2-765i. Underwent 90 degree rotation.
Richard4

Some game highlights:

by Rob Mitchelmore, 12:38 (anchor)
Tuesday 7th July, 2009
Quick demo of authentication against WHMCS 4.0 ("Loginshare"): In WHCMS 4.0 the authentication scheme changed to use MD5 passwords, which promptly broke software that authenticates against it. Now, when you query client details using the getclientdetails call, you get a password hash which looks something like

+----------------------------------------+
| password |
+----------------------------------------+
| fa91985ac8a79a2b0a308fc816353867:!BJK! |
+----------------------------------------+

This is a two-part hash; the part before the colon is an MD5 hash, the part after the colon is a salt. To verify a user's password, take the password they have given in the login form, prepend the salt to it, and then take the MD5 of the result. If the MD5 hashes match, then authentication is successful.

Remember that different users have different salts!

Example code:

// This actually needs to come from getclientdetails from the WHMCS API
$hash_from_whmcs = "fa91985ac8a79a2b0a308fc816353867:!BJK!";

$password = $_POST["password"];

// Split on the colon, concatenate and hash:
$parts = explode(":", $hash_from_whmcs);
$newhash = md5($parts[1] . $password);

if ($newhash == $parts[0]) {
        print "Well done, you can remember your password.";
} else {
        print "You are either amnesiac or an impostor, go away.";
}

by Rob Mitchelmore, 10:42 (anchor)
Wednesday 15th April, 2009
Things that are not going to be released from the "In Shadow"/TS2 studio marathon:

by Rob Mitchelmore, 10:53 (anchor)
Saturday 22nd November, 2008
An approximation to beauty: sitting in Arlanda airport, watching the snow fall over the aeroplanes and the lights move on the vehicles, listening to Kodaly's Laudes Organi very loudly.
by Rob Mitchelmore, 02:29 (anchor)
Wednesday 24th September, 2008
Oh to walk my way with kindness,
And not betray my life to a cloud of suspicions...
How I wish that someone would believe me,
How I wish that I could believe someone.

To triumph in an unequal battle,
To embrace with love both small and big,
How I wish that someone would believe me,
How I wish that I could believe someone.

Let the silence burst forth with fury
And the eternal noise die down for good...
How I wish that someone would believe me,
How I wish that I could believe someone.


— Hamo Sahyan

by Rob Mitchelmore, 01:19 (anchor)
Tuesday 8th April, 2008
IPMI polling on Dell PowerEdge R200s (and other Intel CPU rackmounts): polling the Dell PowerEdge R200 using IPMI-over-LAN, it may be surprising to find the 'Temp' sensor reporting comfortably arctic temperatures, low to the point of being sub-zero, and critical failure:

Temp             | -52 degrees C     | cr

In moderately recent time, Intel have taken to giving this temperature not as an absolute temperature, but have instead redefined the scale of Degrees Celsius so that it is measured relative to the "melting point" of the CPU.

Once this is compensated for, it should give the actual temperature of the machine.

by Rob Mitchelmore, 17:01 (anchor)
Sunday 13th January, 2008
A partial solution to the Nokia N800 boot issue: there is a problem, or a family of related problems in booting on the Nokia N800 linux tablet, where the tablet will not power on correctly when connected to a mains output and will not charge reliably - or at all.

The solution to this in some cases is to turn off extended virtual memory on the memory card (under Control Panel - Memory), as this appears to impact the way it 'boots' to go into charging mode. Battery charging appears to be largely software-monitored and controlled.

Of course, this rather depends on the machine booting in the first place; in some cases the machine will boot intermittently (which sounds like a timing issue), if it does not then a solution may be to get hold of an offline, 'dumb' nokia battery charger to give the tablet battery an initial charge.

You may also find that removing the battery for a while helps.

by Rob Mitchelmore, 14:27 (anchor)
Monday 3rd December, 2007
A peacock-like fan with each feather an ivy branch escher-tesselate; in the middle of each leaf a single eye with slowly dilating pupil and all in the reds and golds of autumn.

Watching.

by Rob Mitchelmore, 23:05 (anchor)
November 2009September 2009July 2009April 2009
November 2008September 2008April 2008January 2008
December 2007October 2007August 2007July 2007
older posts