msemtd's blog

Speedcubing: now down to 1:31

Well it ain't anywhere near competition speed but I just beat my personal record and I'm now down to 1 minute 31 seconds. I'm still using a set of beginner's algorithms but I've started learning the F2L for the Fridrich method (http://www.learn2cube.com/cfop/f2l/index.php). Soon i'll be able to cut down my overheads!

SuperChamps Battle - Japan v Korea

Learning about speedcubing

I was very pleased to receive a Rubik's Cube[1] as a gift on Fathers' Day this year and I decided to learn how to solve it. Yesterday I memorised the last of a full set of beginners' algorithms for the Fridrich Method[2] of solving the classic 3x3x3 cube. Now I'm trying to develop some speed and minimise the mistakes I make and my times are OK: I'm averaging about 2 minutes, 40 seconds with my best speed 2 minutes 19 seconds. I'm using the World Cube Association Competition regulations for scrambling[3] and their handy form for scrambling algorithms[4]. I hope that one day I'll get my head around some of the intermediate algorithms so I can break the 2 minute glass ceiling!

[1] http://en.wikipedia.org/wiki/Rubik's_Cube
[2] http://en.wikipedia.org/wiki/Fridrich_method
[3] http://www.worldcubeassociation.org/regulations/#scrambling
[4] http://www.worldcubeassociation.org/regulations/scrambles/scramble_cube.htm

http://www.cubestation.co.uk/cs2/index.php?page=3x3x3/3x3x3

Dislocated Shoulder - Ouch!

Whilst skating tonight at Arnold I got competitive with some youngsters and ended up having a gnarly crash. I fell backwards onto my front arm - I was coming back in from a feeble that was overcooked and my right arm was straight out behind me (I skate goofy) and it broke my fall but I was a bit shocked to find my arm was sort of hanging off an feeling really wrong! I grabbed it and it just crunched and clunked back into place with stomach-turning agony. I was able to get up pretty quickly but soon got the shakes and then I had to drive the car which was interesting! I got some ibuprofen from the local co-op and had to do a bit more driving (picking one of the kids up from karate) before getting home to the arnica. Now it just hurts. I've never dislocated a shoulder before. Cycling to work will be interesting in the morning :)

http://en.wikipedia.org/wiki/Dislocated_shoulder

Drupal ate my images!

Upgrade time is scary time: something always snaps or gets bent out of shape. Thank god for backups. Drupal seems to have chewed up my image galleries - maybe I'll restore them - maybe I won't bother!

Playing with SQL XML in Java



package com.tecspy.jdbc3;

import java.io.StringWriter;
import java.sql.Connection;

import java.sql.ResultSet;
import java.sql.SQLException;

import java.sql.Statement;

import javax.sql.rowset.WebRowSet;

import com.sun.rowset.WebRowSetImpl;

/**
 * Handy JDBC 3.0 SQL XML tools using {@link WebRowSet}.

 *
 * @author Michael Erskine (msemtd)
 */
public class SqlXml {

    /**
     * Get an SQL XML value of a {@link WebRowSet} from the given query on the
     * given {@link Connection}.
     *
     * @param con
     *                Established database connection.

     * @param query
     *                SQL query to be performed.
     * @return Resulting SQL XML.
     * @throws SQLException

     */
    public static String getQueryWebRowSetXml(Connection con, String query)

            throws SQLException {
        // Create statement and execute query...
        Statement stmt = con.createStatement();

        ResultSet rs = stmt.executeQuery(query);
        // Create a WebRowSet and populate with result...
        WebRowSet wrs = new WebRowSetImpl();

        wrs.populate(rs);
        // Get the XML into a String...
        StringWriter sw = new StringWriter();

Burning midnight oil

Last night I was out in the garden making a brazier (http://en.wikipedia.org/wiki/Brazier not to be confused with http://en.wikipedia.org/wiki/Brassiere :) ) out of a 25L motor oil drum (found in the street) mounted on the tubular steel legs of an Ikea stool (also found in the street). I cut the top off by hammering a flat-ended screwdriver through the steel top near to the rim at 1cm intervals then cutting through the remaining spots, again with a screwdriver and hammer. There was some motor oil left in (you can never empty these things with the plastic spout) so poured this out and saved it to fill my oil can (there was probably about 400ml). I bolted the leg to the bottom of the drum with some long steel bolts I recovered from the timber of a cabin bed frame (found in the street!).

BOTY rendered unexciting by Eurosport!

I was pretty chuffed to hear that Battle of the Year was going to be televised on Eurosport. I'm watching it right now: it's the semifinals and... well, the commentators are just pathetic - why can't they just shut up? The breaking is the only thing that should talk. We don't need a pair of idiots yapping over it - especially when they have ABSOLUTELY nothing useful to add. Compare this travesty with the BOTY DVD where its got the stuff you want. Eurosport seem to do this with anything slightly different - they get someone from the sport who can't commentate and some commentator who knows nothing of the sport and they just talk crap all the way through what would otherwise be entertaining in its own right. I'm gonna wait for the DVD again this year!

Blog with no moving parts

I'm writing this entry from a completely solid-state machine thanks to Alistair for donating a 32Mb compact flash card for me to play with. Actually it isn't properly finished yet and I still rely on Knoppix for a good web browsing experience! The machine is a Via EPIA 5000 Mini-ITX board that has been propping up my monitor for the past few years. My wife has been using this machine to boot into Windows 2000 on those occasions I'm not there to demonstrate the free alternatives available on our family Linux box but I've decided it should be put to better use as a media streaming device since it is completely silent with a 12V DC 75W ATX power supply and in a stylish G-Alantic case with front-munted USB ports and a little IR window. I've set up a CF to IDE adapter that I bought some years ago for $20 with the 32Mb CF and after attaching a temporary CD drive and booting an old Knoppix CD I was able to use cfdisk and mke2fs to create a single ext2 partition. This partition will be mounted read-only by the way since we don't want to unduely hammer the flash and I haven't got to grips with JFFS2 yet! The read-write parts of the system will be in ramfs: /var, /home, /tmp and some others using up a small part of the 512Mb of RAM available. Using grub-install I was able to make the partition bootable. I'm going to use a kernel and modified initrd from a Movix2 iso - http://movix.sourceforge.net/ - once it is downloaded! Updates soon.

Catch-up blog

Hmm, lots going on: at my partner's gym in Nottingham and trying out a public internet machine with IE 7 on it and the thing seems to render my site OK! I'm mildly impressed :) I was less impressed with the Java 6 update 10 beta (http://java.sun.com/javase/downloads/ea/6u10/6u10beta.jsp): I desparately wanted the Nimbus look and feel (http://java.sun.com/javase/downloads/ea/6u10/nimbus.jsp) for beautifying my ugly Linux deployments but testing yesterday with the standard Swing Set 2 JNLP left me a bit sickened - poor performance, random silent crashes, processes left in background that I could get at with JConsole but with no window! All on Kubuntu 7.10 with nv driver so not exactly off the beaten track there! I'll be trying it out with the accelerated i810 X driver later today. Still on the Java front I've been doing a lot of Swing Application Framework stuff and I've got to grips with resource injection, Actions and some of the other beansbinding lovelyness includign the use of the EL expression language - neat.

Syndicate content