Moving Times

I recently spent several hours hopping between my desk and the consoles of a number of computer systems running different operating systems (Solaris, Linux and Windows to be precise). I hadn’t yet configured remote access on these machines, hence the need to sit at the console.

Anyway, a rather curious observation was that the time on these systems was located in completely different areas. On Windows, it defaults to the bottom-right corner, Solaris defaults to the bottom-left corner and Ubuntu defaults to the upper-right corner. As I quite often don’t wear a watch, I found my eyes playing a game of Boggle every time I wanted to check the current time, a very strange experience.

Naturally, I presume I could have reconfigured the desktop(s) to show the time in the same place but it’s still interesting to wonder if this was a deliberate move on the part of each operating system vendor.

Disk Drive Comfort Factor

Having spent several years developing software for large disk subsystems, I frequently found myself surrounded by racks and rack of noisy disk drives (or “disc” for the purists among you) often performing random seek tests in less than forgiving laboratory environments. Not for anyone who suffers from migraines I can tell you.

However, what I never really realised until recently was that there is somewhat of a subconscious comfort factor associated with the noise generated by a hard disk. As long there was a nice actuating noise coming from the disk (and not a high-pitched scratching noise), it at least meant that the system was still doing something and not hung.

I say this because I am currently in the process of carrying out some lengthy configuration of some new Solaris servers from a remote location (another room in the same building) which involves lots of slowly moving progress bars. I keep looking around for the system chassis to listen for disk activity (or look at a disk activity LED), all to comfort myself with the fact that the update is still progressing … but alas, nothing.

It’s a very strange feeling.

Using a different diff with Subversion

If like me, you’re not too keen on the sometimes cluttered output produced by a Subversion diff command (svn diff), here is a way to use Unix diff with Subversion instead. I’ve also used the -b parameter to ignore whitespace differences.

$ svn diff --diff-cmd diff --extensions '-b'

It looks a little messy at first but you could probably alias it quite easily using something like:

alias "svn_diff_b"="svn diff --diff-cmd diff --extensions '-b'"

in your .bashrc (or equivalent) file.

Adding XML support to Selenium Remote Control

If you are one of the chosen few using (or having to use) the Selenium suite of software test tools, then you may have discovered that it does not natively support XML content. Here is a useful way to modify it so that it does:

  1. Download the latest version in JAR format from your usual Maven repository (e.g. selenium-server-0.9.0.jar)
  2. Unpack this JAR somewhere on your system
  3. $ cd /tmp
    $ mkdir ss090 ; cd ss090
    $ jar xf ~/Desktop/selenium-server-0.9.0.jar

  4. Edit the file /tmp/ss090/core/scripts/selenium-browserbot.js and locate the getBody function (line 1573 approximately)
  5. Modify this function as follows:
  6. PageBot.prototype.bodyText = function() {
    if (this.getDocument() instanceof XMLDocument) {
    return new XMLSerializer().serializeToString(this.getDocument());
    } else {
    return getText(this.getDocument().body);
    }
    };

  7. Repack the JAR taking care to specify the correct MANIFEST file:
  8. $ cd /tmp/ss090
    $ jar cfm selenium-server-xml-0.9.0.jar META-INF/MANIFEST.MF *

  9. If you want to produce an MD5 signature for this JAR file, you can do so using the md5sum program.

Happy Trails …