Posts Tagged ‘General’

Wanted: free car

Wednesday, October 11th, 2006

I think that say enough ;)

Driving test

Wednesday, October 11th, 2006

Well… it’s supposed to be today at 2.05PM, but right now it is raining.

A lot.

Vim 7

Monday, October 9th, 2006

Woo!  The new version of Vim absolutely rocks!

Vim is obviously editor of choice, but new features include spell-checking, omni-completion (it’s been a long time coming), tabs in gvim, undo branching, internal/external grepping and editing remote and compressed files.

Pretty impressive stuff.  I’ve just got to figure out exactly how to make it all work :)

Pink Box

Sunday, October 8th, 2006

pinkbox.jpg

Pink Box: Inside Japan’s Sex Clubs by Joan Sinclair.

Coming soon to a Lewis near you.

Ingmar Bergman

Sunday, October 8th, 2006

This weekend I’ve made a decent-sized dent into my stack of as-yet-unwatched DVDs.  Up for viewing were two Ingmar Bergman films: Smiles of a Summer Night and Persona.

Smiles of a Summer Night was pretty good, it was a comedy, but not really the kind of comedy I’m used to.  Well worth watching :)

Persona was… weird.  Very weird.  I don’t really understand all of it, and I’m not sure that a second viewing will change things all that much.  It’s rated as one of the all-time great films, so definitely worth giving a chance—I have a nasty habit of hardly understanding any of the films I watch, so plenty of other people will do better in understanding it than me.

I had sort-of decided to not buy any more DVDs until I’d got through this pile.  Well, I guess I buckled and just bought The Seventh Seal from play.com.  This is a really great film, up there with my favourite film: The Seven Samurai.  Like the Seven Samurai it’s also incredibly long, and requires a lot of concentration to fully appreciate it.  It should make an interesting evening :)

The 11Ls

Sunday, October 8th, 2006

So, I’ve been pretty laid back in playing around with these new Quad 11Ls.  I got all of the good stuff sorted: new 33 pre-amp, new Audigy 2 ZS soundcard and a bunch of my albums ripped to FLACs.

Past that I sort of haven’t had a lot of time to really sit down and listen to it all.  One thing that had been really annoying me was the fact that the output from the soundcard was so noisy: I previously tried this with Windows and found things to be different, so I assumed it to be a Linux thing.  After messing around with the OSS modules (instead of ALSA) I re-checked Windows and realised I’d messed it all up and that it was a soundcard/cable issue.

That said… I played around with all of the options in the mixer and managed to improve things a lot: turns out that the Audigy cards have about a zillion different inputs, channels and options.  I’ve managed to crank some of them up a lot, mute all of the others and the net result is that the soundcard output is plenty louder and the noise is down (well, only because the output is higher).  Things are much better, anyway.

It all sounds great: just sat down and listened to an album (Regina Spektor’s Mary Ann Meets the Gravediggers and Other Short Stories) and the bass was incredible, especially considering they’re sat down on my desk, no spikes, no stands, none of that fancy stuff.

Definitely a good investment!  :)

Greasemonkey (improving ServiceDesk QMgr)

Sunday, October 8th, 2006

Sat at work I find myself frequently scanning through the list of tickets that are assigned to me so I should know what to be getting on with. A bunch of tickets on my queue are “stale”—I might be waiting for a machine to become free, I’m waiting on some big thing to happen, etc. Some are in a state where I’m still actively working on it, but I happen to be waiting on some feedback from the ticket owner (i.e. the engineer that opened it), while the rest all require work to be done.

It’s possible to change the status of a ticket, but this is a bit of a pain—it requires changing status to “Waiting on user input”, etc. The tickets can then be ordered by status… no biggie, but surely there must be a “better way”.

Enter Greasemonkey—an extension for Firefox that allows the end-user a massive degree of control over how websites are presented. I’d describe Greasemonkey as a way of “post-processing” websites once they’ve loaded. This is done by hijacking the JavaScript and providing the Greasemonkey script with full access to the DOM for the page.

In the course of my really basic script I learned a lot about how Firefox must render pages. This DOM stuff is totally awesome.

What I wanted to do was assign each and every ticket a “status”—I wanted three statuses: stale, awaiting feedback and active. Luckily for me three colours came to mind: red, orange and green :)

I started by intercepting a mouseclick with some JavaScript stuff… I then checked whether the “modifier” key was held (on my Linux box this is the Windows key, on Sun keyboards it’s usually the little diamond thing) and proceeded to change the colour of the HTML element that the mouse pressed. This required figuring out how JavaScript worked—it’s not my favourite language in the world, but I suppose it does the job.

Once I’d got the colour cycling working (this took a little while as I’ve never played with Greasemonkey, JavaScript or this DOM stuff before) I decided to start investigating how I could begin to uniquely identify the “ticket number”—turned out this was fairly easy: the ticket number link has an HREF containing: “Work on Ticket”, once I’d got this I could extract the ticket number itself. This ticket number is, by definition, unique (or at least I damn well hope it is!), which means I can use it as a key for storing variables. My variable is simple: status.

Greasemonkey provides two really nifty functions: GM_getValue(key, value) and GM_setValue(key, value). These work in a similar way to cookies. So now when the user cycles through the available statuses, I store the value using GM_setValue(ticketno, status). This value is persistent, so I can close the browser and come back later and the value will be the same.

At this point all that was left was to read in the stored values and update the tickets with the appropriate colour: to do this I added an EventListener for the “load” event, found all of the ticket links (XPath provides some easy ways to do this), read the stored value (defaulting to an active status (green)) and updated the field. Easy.

So, here’s the end result:

qmgr.png

I wasn’t too sure what details I should/shouldn’t make available, so I blurred a lot of it out. So, it’s not the most incredibly useful script in the world, but it should save me some time, and it was an interesting learning experience.

Since switching to Wordpress I’d been annoyed by the fact that I have to enter the Site admin interface just to create a new blog entry. I fixed this by using Greasemonkey to add an “Admin options” section to the top of my page:

wordpress.png

Really basic stuff, for sure, but certainly a time-saver for me. I knocked this one up really quickly: if I wanted to do it properly I’d check if I was actually logged in before displaying the admin options. Since I tend to stay logged in all of the time, I figured this was a fairly pointless exercise.

So, Greasemonkey is good. We Love It.

Birthday

Saturday, October 7th, 2006

So, last Wednesday was my birthday.  Twenty-two years old… 22 sounds a lot older than 21, etc.

My parents came down on Tuesday evening and we had a meal out at The Ely—a pub I’ve passed every day on the way to work since we got here.  It’s quite a nice place, really, roomy, not smoky and the food was pretty good.  We ended up going back on the Wednesday too—but this was more because we couldn’t think of anywhere else to go ;)

I’ve got a few nice presents—Kim and James got me some great stuff from Amazon: Henri Cartier-Bresson’s Europeans, as well as two Haruki Murakami books: Norwegian Wood (his first novel), and South of the Border, West of the Sun.  My parents got me a nice new jumper (wore it to Tesco today, but then it got too hot so I had to take it off) and Olivia got me some goodies.

Xiao managed to arrange for my Mum to pick me up a new wallet… so I’ve got this too.  It’s really nice, but the money pocket is on the inside, not the outside like the one I have now.  I’m going to have a look and see if I can find one with a money pocket on the outside, but I’m not holding out much hope…

On Wednesday my TOI went fairly well—there were ten people there, four of them were engineers, so I got a few questions that made me pause and think.  It was about an as-yet unreleased product upgrade, so I got a little worried when it all went wrong minutes before I was due to prevent things.  A new version of the software was released today, so I might give it a try sometime tomorrow, or when I get back to work.

All in all, it was a nice day, but I don’t think I’ll be looking forward to the next: TWENTY-THREE IS OLD!

(and yes, I know that last statement is one I’ll come back and laugh about—I’m just telling it how it is :)

ルイス

Friday, October 6th, 2006

Why is it that my name looks so totally awesome in the Japanese katakana alphabet?

The characters are: ‘ru’, ‘i’, and ‘su’... not big on the old ‘L’s those crazy Japanese.

Lewis’ top secret TOI

Monday, October 2nd, 2006

At the suggestion of Matt Finch I decided to read up on a new “product” (not really) that Sun should be rolling out soon.  I’ve spent quite a bit of time reading up and I’m fairly confident with the material available to us mere mortals (I’m sure all of the really good stuff is hidden away on the part of the TWiki that requires special permissions that I don’t have).  I’ve had everything up and running on a lab box for the past few days and I expect to have a few of the more advanced things played around with this evening/tomorrow at work.

I’ve had quite a bit of help from Mick Mullins, who works in the VSP group (whatever that is/they do) adjoining our office area, which has been great.  I spoke to Paul about doing a TOI (Transfer Of Information—a Sun term I told myself I’d never use when I first heard it) to Chris, Anton, James and Liam my co-workery people.  This got expanded a bit to include a couple more people (I think David and William will be coming along) and then today I sent out an email to (as far as I can tell) most of the engineers at Guillemont Park (that’s three whole buildings), inviting them to come along.

The room I’ve got booked out is good to seat about ten people, so I have a feeling a larger room may be required, if I can get one.

I’m looking forward to doing this… it’s going to be pretty hard work for a bunch of reasons: there are some areas that I’ve simply not managed to get answers for yet; “public” speaking really isn’t my thing; and if just one engineer turns up (Mick Mullins has already told me he’ll be coming, and I expect Matt Finch will turn up) I’m going to be talking to people who know far more than I do about a lot of the technologies that make up the new “product”.  But where I have the edge is the fact that I wrote the slides and I know (hopefully) specifically how they work and exactly what they do that’s of use to their function.

Anyway, time to do a little more reading-up and figuring out how to get those “advanced” (they’re not really) things working in time for Wednesday.
Damn, it’s really hard talking about something you can’t name ;)