July 26, 2005
Five Years

Look, I can appreciate that they have to discourage this kind of thing, but five years? Seems a bit harsh.

Posted to The Big Room by Simon Brunning at 12:26 PM
July 22, 2005
It's All Go Today...

Steve and I will be responding to today's events in the appropriate manner at The Frog this evening. How I'm going to get past Stockwell I don't know...

(Image via Chocolate and Vodka.)

Posted to Beer by Simon Brunning at 04:58 PM
July 21, 2005
Oh No, Not Again...

There are reports of 'incidents' at various tube stations, and on a bus. It's early to tell, but it doesn't look very serious from what we can see at the moment.

It appears that there have been very minor explosions, designed to scare rather than to cause injury. Is someone pulling some kind of perverted practical joke or something? If so, they are going to find themselves in a world of trouble when, and I do mean when, they are caught.

All the mobiles are getting turned off now...

Update 14:15: At least one person injured, phones are back.

Posted to The Big Room by Simon Brunning at 02:10 PM
Another Year Closer To Death

25 today. In hex.

Still using the same jokes, too. Ever felt you are in a rut?

Anyway, commiserate with me this evening in The Horse Bar if you fancy.

Update: I'm knocking this evening on the head. Even assuming that it's all as trivial as it currently appears to be (fingers crossed!), travel will
be a nightmare today.

Posted to Apropos of nothing by Simon Brunning at 08:57 AM
July 14, 2005
Spring: Bold as Love

I am having trouble getting Spring and Axis to play nicely together.

I've been getting along famously with Spring. We are using Spring's MVC framework, and everything was fitting together as smooth as silk. Our DAO's are coded using HibernateDaoSupport, instantiated as beans wrapped in HibernateTransactionManagers, and injected into our actions and controllers. With this lot set up, Spring and Hibernate between them do all the heavy lifting in terms of database work, and our code needs to know almost nothing about it. And using jMock in our unit tests to mock the DAO, we had close to 100% coverage.

Then I was asked to introduce web services. Axis looked to me to be the de-facto standard, so that was what I've been using so far. In most ways, it's a thing of beauty - I particularly like happyaxis.jsp - but I can't work out how to get it to play happily with Spring. Spring isn't instantiating the service objects, so it doesn't get an opportunity to inject the DAOs.

In order to unit test at all, I've created given the service objects setters and getters for the DAOs they need. The getters lazily initialize the DAOs from Spring in required. In our unit tests, we just call the setter with a mock object, so the lazy initialization never gets used.

public CurrencyDAO getCurrencyDAO() {
 
    // Lazy initialisation. If the DAO hasn't yet been set, we'll get it
    // from Spring. I doubt we'll be able to cover this in testing.
    if (this.currencyDAO == null) {
        this.logger.debug("Lazy initialisation of currencyDAO");
        final ApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext());
        setCurrencyDAO((CurrencyDAO) applicationContext.getBean("currencyDAO"));
    }
    return this.currencyDAO;
}
 
public void setCurrencyDAO(final CurrencyDAO currencyDAO) {
    // This will probably ony be needed for test purposes.
    this.currencyDAO = currencyDAO;
    this.logger.debug("currencyDAO set to " + String.valueOf(currencyDAO));
}

(How do I get the servletContext? In the real code, I grab hold of it with a ServletContextListener, and keep it in a Borg.)

This works, but it feels inelegant. Worse, much of the getter is impossible to unit test. Is there a way to get Spring to instantiate my Axis service objects? Is there a cleaner way of getting beans from Spring? Is there another web service framework that plays nicer with Spring?

Posted to Java by Simon Brunning at 04:52 PM
A Health Message for the Boys

Oh, I say.

Via Ulterior.

This is nearly as good as that Kylie ad.

Posted to Apropos of nothing by Simon Brunning at 02:49 PM
Two Minutes

I've just got back from the two minutes' silence at Aldgate. Unsurprisingly, there were a lot of people there. It's really eerie when you have a large crowd standing in total silence.

Anyway, there are still a couple ways in which the terrorists can have some measure of success. One is if there is an anti-Muslim backlash. That would be handing some of what the extremists want on a plate. They want Muslims to be isolated from everyone else.

The other is if some ill considered anti-terrorism makes its way onto the statute books. Personally, I doubt that there are really any changes needed to the law, but if any are made, I hope that there's nothing too draconian or knee-jerk. If our rights are impinged, then the bombers will have succeeded in affecting our lives in a way that I think they shouldn't - and history shows us that draconian measures like internment are counter-productive.

To his credit, Charles Clarke isn't using the attack as an excuse for garner more support for the ID card bill. Let's hope it fails...

Posted to The Big Room by Simon Brunning at 12:37 PM
July 13, 2005
French Terror Alert

Prime Minister Chirac has officially raised the French terror alert level from "Run" to "Hide".

There are only two higher levels in France - "Surrender" and "Collaborate".

(Recieved via email, provenance unknown.)

Update Thursday 14th: The British Alert Level - a nice hot cup of tea.

Posted to Funny by Simon Brunning at 05:37 PM
Which Part of London am I?
Most of South London
You scored -4 sophistication and -3 scintillation!
You are the whole of South London (excluding Barnes, Clapham, Dulwich and Greenwich Village)!

Oh dear, oh dear, oh dear. You know how some personality tests say that there are no right or wrong answers? This is NOT one of those tests.

You're a bit of a hidebound character - and you're either unaware of your own stagnation, or you've acquiesced to it. (I'm not sure which is worse.) You take pride in your philistinism. The only culture you have experienced lately was the yeast growing between the sweaty thighs of the last person you pulled. For you, binge-drinking serves as a proxy for a personality (typical quote: "Best night of my life. Can't remember a fuckin' thing!").

The good news is that this is not the worst result you can get on this test!




My test tracked 2 variables How you compared to other people your age and gender:
free online datingfree online dating
You scored higher than 7% on sophistication
free online datingfree online dating
You scored higher than 3% on scintillation
Link: The WHICH PART OF LONDON ARE YOU? Test written by fine-and-dandy on Ok Cupid

Result!

Posted to Funny by Simon Brunning at 04:24 PM
Osama: My Part in His Downfall

So, Last Thursday. What a day.

I started out leaving home at about half past seven, as usual. There was a report of major problems with The Northern Line on the news. These reports are usually so out of date that it's worth having a go anyway, but in this case when I arrived at Colliers Wood, there was indeed absolutely no service South of Kennington. The bus stops looked like like the first day of the sales, so I walked to Wimbledon.

Had the Northern Line been running normally, I'd have been at work, safe in my office before anything happened.

From Wimbledon, I got an overground train to Waterloo. It was heaving, as expected, but quick. At Waterloo, I just missed one train as I got down to the Waterloo and City line platform, which would have taken me to Bank. The next one came in, but didn't open its doors. Then there was an announcement that "due to a power surge", the Waterloo and City line was suspended.

I had absolutely no inkling at this point that this was anything more than tube problems, albeit rather spectacular ones.

I walked across Hungerford Bridge - always a beautiful view - to Embankment, and got on a District line train to go round to Aldgate. The Train sat there for a good while, then started off. It got two stops, to Blackfriars, then came an announcement that the District Line was suspended. Again, this was put down to a power surge, but we were asked to leave the station, so someone knew that something was wrong.

Again, I still thought that it was just a particularly bad day for TfL at this point, so I started walking. It was around ten when I approached Aldgate. It was now that is started to occur to be that something serious was wrong. Aldgate was wall to wall fire engines, police cars, and ambulances.

Just then, I bumped into Trevor from work. He told me that there had been an explosion on the tube, that our office was behind the cordon and inaccessible, and the the police were advising everyone to just go home.

It took about twenty or thirty goes to get through, but I rang my parents to tell them that I was OK. They hadn't yet turned on the news, so they didn't know what was happening. I asked them to ring around and reassure everyone, since I didn't thank that I'd be able to get through. Then I, eventually, got through to work. It seemed that everyone was accounted for, except for Tulna, who was on a course, so I texted her. Then I walked to London Bridge to get a bus. The 133 would take me most of the way home.

As I was waiting at the bus stop, Dad called, and told me about the bus explosion. So I decided not to get the bus after all, and started walking.

In the underpass at Elephant and Castle, I bumped into Helen, a friend of my brother's, and Miranda, a friend of hers. They had walked from Tooting all the way up to Borough before realising what was going on, and were on their way back. They were a bit lost, so I confidently led us all out of the underpass and in completely the wrong direction.

A kind stranger put us right, and we were soon headed in the right direction, but we were all tired ant thirsty, so we stopped for a rest. Being British, we stopped at a pub, and I had the earliest pint that I've had in years. They had a telly on, and I began to realise just how bad the situation was.

There were reports of an incident at Stockwell, which was on our way, so we stayed put for a while.

We pushed on, but Helen needed to rest her blistered feet, so we stopped again at The Circle. We were there for an hour or so, avoiding the rain.

Busses were running this far out of London, but we decided not to risk them, and kept walking. We did feel a bit wimpy after about how short our last leg was, so we kept going a bit longer this time, but Helen was in too much pain to go on forever, so we stopped again at The Duke of Devonshire.

So, when my grandchildren say to me "Granddad, what did you do on the seventh of the seventh", I'll have to tell them that I went on a sort of bizarre pub crawl.

We waited at the Duke of Dev for a while for Miranda's boyfriend Martyn, and ate some bad food. We chatted for a while, then pushed on home.

I was seriously knackered when I got home. Still no answer from Tulna - at which point I realised that I'd texted her old number. Sigh. I rang her new number, and got straight through - she was fine. Worried for nothing.

I'm glad to see that at the end of the day the bombers have achieved nothing. They've killed a few people, yes, and inconvenienced many, but if they were hoping to intimidate us or change our attitudes, they failed - See London Will Fucking Twat You In A Minute, Son and Quotes of the Day. And let's face it, the death toll, though tragic, was less than a week's worth of UK road deaths.

I wonder if they realise that they've achieved nothing? Do they see it as a defeat, or a victory?

Posted to Apropos of nothing by Simon Brunning at 04:17 PM
July 09, 2005
Lucky

I've no time for a full account now, but I'm fine, in case anyone was worried. It was all much too close for comfort, but I was never very close to any danger on Thursday.

I made it in as far as just next to Aldgate Station, near by my my office, but I was turned back there. (Before that, I had been under the impression that there were just tube disruptions.) I rang home to tell my parents that I was OK, and to get them to spread the news. Dad told me that there had been an explosion on a bus as well as on the tube, so I walked home. I met up with a friend (and a friend of hers), which was nice, but she had blisters, and there was an alert at Stockwell, so it took a loooong time to get home.

As far as I can tell, no one I know was hurt either, fingers crossed.

More on Monday.

Posted to Apropos of nothing by Simon Brunning at 02:29 PM
July 06, 2005
Instant Messaging redux

Having tried a few IM tools, I've settled on GAIM. I can use it to access the IRC #python channel on Freenode, which is nice, and also to over (gulp) MSN.

I'm not happy about using MSN, you understand, but if that's where everyone else is, that's where you have to be too, if you want to talk to them.

So, now I'm on Freenode and MSN as small_values. Do say "Hi".

Posted to Software by Simon Brunning at 02:03 PM
Serve Them Right

It seems that some silly sods are getting caught out by the Crazy Frog. The think that they are just ordering the one ringtone, but find that they have in fact subscribed to a rather expensive service.

Serve them bloody right, I would have said. Anyone wanting that bloody thing deserves whatever they get. But no, the regulators are after them.

Oh, Lord, it's got its own bloody game now, too.

Posted to Rants by Simon Brunning at 01:24 PM
Software Patents

It's not all bad news today, though; EU rejects software patents directive, for the moment at least. Yay!

Now if only the UK rejects ID cards...

Posted to Software by Simon Brunning at 01:04 PM
Bloody Olympics

London beats Paris to 2012 Games. Oh bugger. That'll be £20 on my council tax bill then, and it'll be bloody murder getting in to work. Assuming I'll still be in London by then.

Interesting - the BBC seems to be totally slashdotted. I've never seen that before.

Posted to The Big Room by Simon Brunning at 01:01 PM
July 05, 2005
Listing shell windows

Having read Raymond Chen's Using script to query information from Internet Explorer windows, well, how could I resist?

import win32com.client
shell = win32com.client.gencache.EnsureDispatch("Shell.Application")
 
windows = shell.Windows()
for window in (windows.Item(index) for index in range(1, windows.Count+1)):
    if window:
        print window.LocationName, '=', window.LocationURL

Quite pointless, but there you are.

There are other fun things you can do with the shell interfact, too, like opening exporer windows pointing to the directory of your choice - shell.Explore(r'C:\projects\morph') - or opening up control panel items - shell.ControlPanelItem('timedate.cpl') - but they are mostly pretty pointless too. I can think of uses for some things, I suppose - shell.IsServiceRunning('Tomcat5') might come in handy, along with ServiceStop and ServiceStart.

You can find some of this stuff documented in MSDN - Shell Object and IShellDispatch2 Object.

Posted to Python by Simon Brunning at 04:03 PM
The Single Life

Tulna told me in the pub last night that she's on a mission to fix me up with a girlfriend. Sigh.

Don't worry, girls, it won't come to anything. People seem to get this notion from time to time; I've had it from my sister, from Steve, my brother, even from Michael. But in the end, they find that there isn't anyone that they'd be prepaired to put through the ordeal of going out with me.

There's a good article about single men over on the Grauniad today; Sex and the single weirdo. "The home-alone male is routinely assumed to be an oik or a loser", it says. "Men who live alone look after themselves less well, shop less confidently, have fewer friends, suffer more with depression and die younger than married or partnered men."

Shop less confidently? WTF does that mean? "I was going to buy those frozen peas, but I just couldn't work up the courage." And he missed out "drink more". Other than that, spot on. Well, I'm not dead yet, so I'm not sure about the last point, but he's probably right about that, too.

Posted to Apropos of nothing by Simon Brunning at 02:01 PM
Presentation skills training

El Presidente is nagging me about organising some presentation skills training, following my last review. I can't say I'm looking forward to it, but I suppose it would be good for what I laughingly refer to as my career.

Hmmm. "Career: to hurtle downhill, out of control and at speed." Perhaps career is the right word after all.

Anyway, El P has suggested a Learning Tree course, but if anyone has any recommendations, I'd be glad to hear them. I'm not too keen on Learning Tree anyway, due to the truly ridiculous amount of junk mail they send out. Learning Stump, more like, given the paper they get through.

Posted to Apropos of nothing by Simon Brunning at 01:15 PM
July 04, 2005
iSeries Open Source

I have a spot of '400 work to do. It sounded a bit daunting to begin with; I need to make an HTTP request and look at the response. Doesn't sound too hard, does it? Bear in mind, though, that I have to use RPG, and that RPG doesn't come with support for anything above the level of raw sockets, and that by using the notoriously hairy '400 API calls. Pointer arithmetic everywhere. Yuck.

But no. A spot of googling revealed a piece of honest-to-goodness open source for the 'Series - Scott Klement's HTTPAPI. Marvelous.

There are a few other useful libraries on Scott's site, too, and a nice RPG IV Socket Tutorial.

Posted to iSeries by Simon Brunning at 02:22 PM