Wednesday, November 29, 2006

90% of trains are on time

According to Network Rail's latest news release, "An average of 89.5% of trains ran on time over the first six periods of the year [2006]".
Does this mean I only have to pay 89.5% of the fare? No. I'm still left paying 100% of the fare of 89.5% of the service.
I'm considering coming into work for 80% of the time I currently work. Do I expect to have 100% of the pay? No, I expect 80% of the pay.
Would the bank be happy if I paid 89.5% of my mortgage?
What if I only got 89.5% of a sandwich?

When will the fat controllers stop running the trains as if they're running for the sake of running, and start to realise that they're running because people want to travel on them?

Monday, November 27, 2006

Using Rhino.Mocks

If you're using Rhino Mocks, make sure you create a new repository in the [SetUp] of your test fixture. This will stop unfullfilled expectations causing havock (he says, after trying to figure this out for half an hour).

I want one of those!

Well, actually, one of those, but at £1200, I think it better be put on my someday maybe list (unless Santa's got very big pockets!)

Sunday, November 26, 2006

Abbey Dashed

Well, I finally got to do a race today! The Leeds Abbey Dash 2006 was my first event, as well as Amy's. I didn't break any records - I took about 70 minutes to get round, and although I feel I could have gone faster, I think it was more important to run with and support Amy and her friend Heather. I sprinted the last 1/2 mile, so I crossed the finishing line with a sweat on!
It was good to get round, and run along a route that I know. Kinda wierd to see Kirstall Road empty, and the police support people running on the street.
Thanks to everyone who sponsored me. I've now got to find another event in the new year, maybe further south so I can get my (lazy) brother to do it too.

Thursday, November 23, 2006

Girlfriend In A Coma

I've been reading Douglas Coupland's Girlfriend In A Coma. I'd recommend it, it's a good book (I've only got 20 pages left, so I'm hoping I won't regret saying that). This isn't a review of that book though.
One of the things that book is about is how "empty" modern life is. It's a feeling I've been having lately. It's the eternal question: what's the meaning of life?
I'm not holding out for an answer from the book, indeed I'm not holding out for any one answer, as I suppose there are as many answers as there are people. Not that I'm saying everyone has a cosmic purpose, I'm just saying different people have different values, and therefore the meaning they give to their life will be different. For example, a suicide bomber's meaning will be different to a fashion model's meaning - as well it should.
To this end, I suppose I've been trying to figure out what I want the meaning, or purpose, of my life to be.
When I was a kid, this was a really easy thing, because I didn't realise there'd be anything stopping me doing whatever the hell I want. And, in a way, there still isn't - the biggest hurdle is my own inhibitions.
Why shouldn't I travel more? because I'm scare of it.
Why shouldn't I work for myself? because I'm scared of it not working.
Having to think about Amy is also a good excuse for not doing stuff too - I have to think about her fears, or at least I can think that some of my own fears are hers.
When I was really young, I was happy to accept the Jesus crap that my parents told me. Losing that left a big a hole, which I suppose I've filled with veganism (at least you can argue for it logically!), but left me without a purpose to my life.
Anyway, this is kind of where I'm at with it - What do I want to do with my life?
I know some things I don't want to do with my life:
  • Spend it writing the same lines of data access code that I've written 1000 times before.
  • Doing evil (well, not serious evil).
  • Nothing.
  • Being addicted to anything.
  • Being ill.
But, they don't really help answer the question, especially if there are a near infinite number of possibilities.
The flip side to this is, of course, my ability to change. If I decide to be an astronaut (yeah, it should have been on the list above...), am I able to change myself sufficiently to achieve that? Am I using this as another excuse not to even try?
So many questions...all I need now is to come up with some answers.
One thing - does this feeling disappear when I pass 30? Most of my friends above that age seem really sorted out - at least spiritually (maybe philosophically is a better term?).

Friday, November 17, 2006


I love wikipedia. Take this article on Lottery Mathematics. I never knew all I needed to do to find the probability of winning the National Lottery was open up Excel (I'd imagine you can do the same in OpenOffice), and put "=COMBIN(49,6)" in a cell. Brilliant. (However, at 1:13983816, I'm definitely not going to waste £1 on a ticket!)

Thursday, November 16, 2006

USB Drive access under Windows XP

Wow, I've just increased the speed of my USB drive dramatically.
All I did was to change the Policy to use "Optimize for performance" rather than "Optimize for quick removal". The downside is that, to be safe, I have to do the whole "Safely Remove Hardware" dance. A small price to pay, I think.
Anyway, this option is in Computer Managerment->Device Manager->Disk Drives->(Your USB drive here). Right click, select the "Policies" tab and click ok. Bingo. Transfering data to and from the USB drive is now increased to something reasonable.
You don't care, do you?

Wednesday, November 15, 2006

New Code Smell

This one really only applies to C#, but here it goes:
Over use of #region directive, especially in methods.
    public void SomeFunction ( /* probably too many parameters */ )
        if ( something )
            #region blah blah
            // 10000 lines of code here

Monday, November 13, 2006


Chris seems to be having a similar train of thought to me lately.However, he makes it far easier to understand than I ever could.
Anyway, part of my action was insulating the loft, but the week presented me with another opportunity.
In our bathroom, we had a light fitting that took 3 (yes, 3!!!) 60w bulbs (or a total of 180w for those of you who can't multiply 3x60). One of these blew on Tuesday.
After checking that the current fitting could be recycled (if it hadn't been so ugly and energy inefficient, I might have freecycled it), I subsequently bought a new one, that takes a 28w  ('A'-rated!) bulb.
As I didn't press the bulb into place properly first time, I got the multimeter out and checked that the fitting wasn't busted. Then I just put the bulb in properly, and it works fine.
The new light feels brighter than what was there originally, and also gives a much "whiter" light, which isn't quite so good when I see myself in the mirror first thing in the morning...
How's that for less than 30 of your english pounds, and half an hour of fitting?

Random Comment from PHB

"I thought LEFT JOIN is the same as INNER JOIN".
And they have him writing queries for business reports.

Wednesday, November 08, 2006

SourceSafe has ruined my life.

Ok, so perhaps I went about this the wrong way, but...
Here's what I wanted to do: branch a project (well, solution) so that I can do some work on it that won't affect the main trunk.
Here's the problems: there's no "trunk" branch, so I can't easily branch the entire solution. There are 52 projects in the solution. Using Visual Studio 2003, SourceSafe, and ASP.NET Projects is like when you forget to wash your hands before going for a pee after chopping chillies - you don't notice anything straight away, but then it fucking bites.
My solution was to only branch the projects I needed to, which also meant branching the solution. It worked reasonably well, until I try and change the binding in Visual Studio, and get told "The operation has failed". How does that help me?
I've had to manually edit the solution file 20 times, and I still get problems with one project not loading properly.
God. My next project is using Subversion and TortoiseSVN. I might see about using AnhkSVN for convienience, but I've not had any problems without it at home.
That, and I'm buying "Pragmatic Source Control with SVN". Quicksmart.


I spent most of Sunday putting more insulation in the loft. Despite the argument about climate change/global warming, nobody's denying that there are finite reserves of oil, gas and coal, and using less of them is subsequently a good idea. That, and the facts that the house gets really cold during winter, and that it'll save me money (possibly quite quickly), all seemed to make it appeal to me.
It was a relatively easy thing to do, but it did take about 5 hours, and most of that time was spent going up and down a ladder, and scooting about in the roof.
The real pain was that I couldn't get the whole rolls of insulation up into the roof, as the hatch is only about 30cm wide, and about 50cm long (yeah, I do only just fit up there!), and the rolls were about 40cm wide. There was also so compressed that I couldn't squeeze them at all. What I ended up doing was cutting up the rolls then having to partially unroll the pieces before I could tkae them into the roof. It was very messy, and I'm glad I wore a mask and gloves.
Our house was built in about 1890, and it didn't seem like much had been done up there for ages. There was signs of some rewiring going on: the original wiring was very neatly done and enclosed in pipes. TThe rewring was a mess of different gauges of wire (oh yes). There was one wire which I pulled and tripped out the whole of the lighting service. I was sure to neaten that up before I put the power back on. Apart from that, the main problem was the dirt: it was absolutely filthy. Some of this may have been soot, but I think a lot of it was general filth. Again, the gloves and mask were by friends.
Laying the insultation wasn't too hard - just strenuous. I found a length of pipe in the roof, which was really useful for pushing the insulation into the corners. The serated bread knife the last inhabitants left behind also proved useful: easily cutting through the insulation when I need to leave gaps for the chimey breast and loft hatch.
It was a messy messy job, and I ended up throwing away the old clothes I use for DIY - they were filthly and full of small bits of insulating.
So, was it worth it? I don't bloody know, as it's apparently been milder this week. Fucking weather.

Tuesday, November 07, 2006

Where does the day go?

In an effort to answer be question, here's what I did yesterday:

06:45: : Woke up got in shower, ate breakfast, blah blah

07:30: Leave the house

07:47: Get on the (8 minute delayed) train

08:35: Arrive into Manchester

08:50: Get to work

13:20: Go out for a wander at lunch time

14:00: Back at work

17:30: Leave work, and go via (argh!) Tescos on way to train station

17:57: On train

18:45: Arrive home. Finish cooking dinner (which Amy had already started)

19:10: Eat

19:30: Washing up/cleaning. Think I talked to amy for a minute or two

20:20: Running

21:20: back home, eat some pear and plum crumble, spend time with Amy + Henry

22:20: Go to bed

That's pretty much my typical weekday. Tuesday's there's not running, but I have to make the dinner, as Amy doesn't get back from work until late. And I don't have crumble every night.

That was a dull post, wasn't it?

Friday, November 03, 2006


T-SQL's SCOPE_IDENTITY() always returns a "Numeric" value (this is a decimal).
If you're using ADO.NET, then you've got two choices:
Cast it as to the correct type in the consuming code:
(int) reader.GetDecimal
Cast it as an int in the T-SQL:
I'd favour the method second, as other DBs might not have this nuance.

Thursday, November 02, 2006

What Generous Friends I Have

I never realised what generous friends I have. I'm going to be running the Leeds Abbey Dash 2006, and I've set up a site on Just Giving ( and I emailed a few folks about it. I hope I'd reach the £25 minimum entry, but thanks to the generousity of my friends and family, I'm currently at £40. And that's without having to hassle people with a sponsor form or anything.
Thanks everyone.