Academia (7)

“On accident”

For some reason, since September 2004 people have suddenly started using `on accident’ rather than `by accident’ – what the hell happened in September 2004?

According to Wikipedia in September’14 the only two noteworthy accidents were:

“UFC Heavyweight Champion Frank Mir seriously injured in motorcycle accident”


“A train crash in Sweden kills two and injures 30. The accident happened when a passenger train collided with a lorry on a railway crossing in Kristianstad. (BBC)

Neither of which seem to be particularly language-defining… So, after a bit of digging, I found this paper which shows that seemingly unanimously, a whole age group divided on the matter, creating the `on accident’ generation, who, in turn show up in writing online in the latter months of 2004.

Very, very weird.


Trip to Gent – Belgium

I’ve been sent off to Gent by the university to a review meeting for one of the projects I’m associated with.
Luckily, before the meeting I have a spare day to grab some photographs and wander about the place.

Here are just a few, in no particular order. Unfortunately, I don’t know the names of the places I’m photographing, but if anyone wants to let me know I’ll update the descriptions!




Square 2

All taken with my quasi-good HTC One X’s camera (didn’t bring my S-5000).

Upcoming Talk – Serial Communications

I’m currently slated to present a talk at the CSLU (Lancaster University’s Computing Society) on serial communications with micro-controllers.

In addition to the talk, there will be a lab session where we will be working on a simple, practical communication scheme using Arduino micro-controllers and these beauties:

11 RS-485 Shields for the Arduino

Arduino RS-485 Shields for the Arduino

All ready to solder up, when I have the stacking headers that is – shipping from Hong Kong takes way to long!

I’ll update when I have more information about the talk, and after the fact will update the ‘Talks’ page on here with the slides, should anyone want to follow along.

Enumerating PCI Devices

In a fit of ‘getting stuff done’ at 6am today, I wrote a basic PCI enumeration class, allowing my research OS to display what it has found along the PCI bus.

QEMU diplaying a list of PCI devices and their respective ID's

Acinonyx Jubatus running in QEMU, displaying the connected virtual PCI devices.

The actual enumeration itself is pretty straightforward, just a bit of indirect addressing and you get a nice structure back (sequentially) with the vendor and device IDs.

The awkward part was gleaning any meaning from those – obviously I can match an ID to a driver, but it’d be nice to output some human readable stuff so that we show that specific hardware has been recognised.

VirtualBox's PCI devices enumerated in my research OS

To this end, I enlisted the help of which provide an open list of PCI device and vendor IDs, as well as a C header (yay!).

Except that I’m using C++, and a fairly trimmed-down version of C++ at that, with the String libraries missing (I haven’t written them yet!) so the header won’t work without modification.

Thus, after many a minute of search/replacing, I’ve altered the header into a object/header pair (to avoid linker errors) that works with a stripped-down compiler.

In case this is useful for anyone else (god knows who) I’m attaching it here – PCIDevices.tar.gz – do let me know if anyone finds any use for it! I’d love to know what for…

InfoLab Kitten!


A cat gave birth behind InfoLab earlier in the year, and one of the kittens Hung around!

Totally feral, but its used to people being around due to all the students about all the time so will quite happily sit on the warmer manhole covers and let you take photos.

I’m pondering calling the RSPCA to have them collect it, as food will go scarce when the students leave for Christmas…

Gmail Conversation View

I get rather a lot of e-mail these days.

As a member of several mailing lists, it can get rather hard to keep track of the flow of conversation if the mail client doesn’t really support it, as is the case with Mozilla Thunderbird.

While Thunderbird does include a ‘conversation view’ it doesn’t really work properly with GMail IMAP accounts, and tends to duplicate messages in the list making the thread unreadable.

Alternatively, there is the collapsed ‘thread view’ which shows a summary of the messages with a given subject line.  While this is good for short threads, it does get slightly useless for longer replies.  Futhermore, Thunderbird does not show your replies in this view, relying on the replies from other users to include your text in the conversation!

As a result of looking for a solution to another problem, I stumbled upon this the GMail Conversation View plugin for Thunderbird which has completely fixed the problems of ‘thread view’ for me, allowing messages to be expanded out and viewed in full in the thread list, and contains my sent messages along with the received ones!

Get it! It’s good!

Useful LaTeX

Some snippets of LaTeX that I have used at some point or another, and may be useful to anyone else.

Package: hyperref

Simply including this package will make your table of contents have clickable links to pages in the document.

Package: todonotes

This package was an absolute life saver during my dissertation.

It provides the use of todo{} tags, which place a marker on the page with a virtual ‘sticky note’ showing your to-do item text, and also provides a listoftodos command, which creates a list of all your to-do notes.

Furthermore, with the hyperref package included in your document, the to-do item list will have links to their respective pages!


% ========================= %
% ==== REMOVE ON FINAL ==== %
% ==== REMOVE ON FINAL ==== %
% ========================= %

Text text, texty text…
todo{This is a to-do note!}%
Stuff stuffs… list of stuff.

todo{This is another one!}%

Shorter List Style

The default list style in latex I found to be excessively spacious, and in any list heavy sections, the page numbers started to rack up!

To remedy this, I defined a new environment for a thinner list style

% This makes list spacing much better.

item Item one
item Item two
item …
item Further items

Package: makerobust

During the course of writing my dissertation, I came across the problem of not being able to put url{} commands inside a footnote{} command, this is due to the way latex handles URLs, as the command is not considered to be ‘robust’.

Long story short, I searched around, and found the ‘makerobust’ package, which wraps non-robust commands in a robust frame, making them robust, as can be seen in the snippet below


% Make the damn url command work in caption’s

Package: listings

I’m a computer scientist, so having code listings in a document is par for the course. To support this, I used the ‘listings’ package to nicely format my code.


% Magic listing style!
lstset{basicstyle=tiny, tabsize=1, numbers=left}

The lstset{} command in the snippet above sets the basic style for code listings – I had a few large sections of code to include, so I set the font to tiny and a tab size of 1 space. You may wish to edit this to suit.

The full manual for the package can be found here:’s copy of the listings manual

Package: pdflscape, pdfpages

My gantt charts for the dissertation were generated from Microsoft Project (The best I could get at the time! No hate mail plase!) in PDF format, so to include them in the Appendix, I used pdflscape.

This is nothing particularly spectacular, but I’m putting it here in case someone else stumbles upon it.



Note that you can include specific pages with the optional ‘pages’ argument.