Friday, December 29, 2006

I've got a new camera

I've got a new camera, originally uploaded by b3ardman.

It's a Canon Powershot A710 IS, and already I've killed the batteries that came with it.
So far, it seems great. I'm loving the 6x Optical Zoom, and the all round photo quality seems great. I'm going to have to play with it some more. I took a picture of a christmas card from across the room, and you can read the writing in it and everything.
It does up to 7.1 Mega Pixel, and, although I'll probably never really need that power, it seems sharp as anything, so lower resolutions will be even better.
It appears to be simple enough in Point & Shoot mode, but the settings can be played with and tweaked. And, as it's a digital camera, I can erase it and put it back into P&S mode when it all goes stupidly wrong.
Best of all, is that it's about 1/2 the size of my old camera, which will hopefully mean I carry it around with me more, and thus take more pictures.

Google logging in and out

My blog is with Google, and I use Google Reader and Google Mail. They all share the same log in mechanism. This is great, as I only have one set of credentials to remember. However, it backfires massively when I have blogger, reader and gmail open in different tabs, and then sign out of one of them. Suddenly, it all stops working. Google Mail and Reader and Blogger all behave differently in this situation. Blogger and Mail behave okish - both requiring you to sign back in somehow. But Reader just kind of silently stops working. The worst thing is that I have to sign into each app separately, rather than it picking up that I'm signed in again and getting on with it.

Thursday, December 28, 2006

Putting methods in the correct place

Object-orientated programming is all about encapsulation - the principal whereby an object exposes only what is needed by other objects and, by doing so, remains in control of its state.
For example, your Collection class exposes methods to add, retrieve and remove items, as well as a Count property, which indicates how many items it contains.

In real life, however, the concept of an Item or a Collection are way too abstract. For example, you might have a collection of stamps, trains, pc components, mobile phones, screw drivers, or you may have a list of things to do, telephone numbers or groceries to buy (a shopping list!). The terms "collection" and "list" need qualifying - what is it a collection of? What does the list list?
In your program, you no longer have a collection, you have a Pupil Collection (first example that came to mind). This is exposed as a property of your Class class.

You've got this far, and then you find you need to check if a Pupil is in a Class, so you write code like this:
public class Class
    public PupilCollection Attendies;
    //other methods
    public bool ContainsPupil ( Pupil pupil )
for ( int i = 0; i < Attendies.Count; ++i )
if ( Attendies.GetPupil(i) == pupil )
return true;
return false;
Then, a few days later, you find another class needs to see if a Pupil Collection contains a Pupil. So, you write that same method again. And then, in another few days, you find another class that needs to do the same thing. In fact, checking whether a Pupil is in a Pupil Collection is a really common thing.
So, what could you have done differently?
How about if, instead of having the Class iterate through the Pupil Collection, have the Pupil Collection iterate through itself, like this:
public abstract class PupilCollection
    public bool ContainsPupil (Pupil pupil )
for ( int i = 0; i < pupils.Count; ++i )
if ( pupils[i] == pupil )
return true;
        return false;
public class Class
    public PupilCollection Attendies;
    //other methods
    public bool ContainsPupil ( Pupil pupil )
        return Attendies.ContainsPupil ( pupil );

And the next time you need to see if a Pupil Collection contains a Pupil, the code's already there. Your code looses a whole load of duplication, and reads nicer, simply because you moved a method.
In this case, we can start to think about things like specifications [pdf], and other more intricate designs, because we no longer look at the code for the Class and have to think about how it's doing what it's doing.

Using tools (and Code Smells)
I've been using Resharper for the past two years, and I can hardly use Visual Studio without it (well, I can, but I always get frustrated that + and ++R do nothing).

Its Extract Method option is probably the one I use most. Not only does this decide what to have as parameters for the method, but the majority of the time, it's "Declare Static" box is checked too - meaning that the method it will create will be a class level method.

When it does this, I take it as a sign to assess whether this newly created method wouldn't be better off somewhere else. Sometimes it doesn't make sense to move it, but often, just thinking about what the new method does means I put it somewhere more appropriate, and I find my code reads a lot better for it.

So, next time you see a static/class level method, ask yourself if it doesn't belong elsewhere.

Seasonal stuff

Happy christmas and all that kind of thing.
I can write some other stuff now.

Wednesday, December 20, 2006

Monday, December 18, 2006

Veg Box

I've had veg boxes from several different sources, and invariably they are poor.
I can understand that, in the winter, it's going to be hard to put together locally sourced organic food for the same price as during the summer (and I suppose I'm surprised the price doesn't reflect this), but they are invariably full of stuff that you don't eat - either because you don't know what it is, or because there's so many of them (e.g.: one massive squash that you'd not even think about buying from the shop).
Even the "best ever veg box" that Amy and I had (from Goosemoor Organics, who don't deliver to where I live now) still had a large celeriac every week. They did leave it out when we asked, but there were a few that turned runny before we actually got to eating them.
The other thing is that they are not tremendously good value. This true of organic veg in general, but I've found that, from a £25 "mixed" box, typically I end up buying another £5-10 worth of veg. This is sometimes simply because there weren't basic things like onions, but also because, being vegan, I tend to eat a lot of fruit and veg, and there wasn't enough variety in the veg box to keep me healthy.
We tried doing a veg box where we got to choose what we got. It was a nice idea, but it turned out that, because the supplier was so unreliable, we'd usually only get half of what we ordered. Very annoying, especially if you were trying to get specific ingredients. Also, we had to order the new veg box the day after we got the old one, so we'd have to try and predict what we'd need a week in advance.
It's hard to know what to do, as the best places I've found for organic fruit and veg are Beanos (Leeds), Beanies (Sheffield), and On the Eight Day (Manchester), so it's not really viable to go and choose my own veg unless I want a two hour round trip. (I know I work in Manchester, but Eight Day is about 20 minutes from where I walk, and then the stuff would have to sit in my bag for 3-4 hours before being bumped around on the train, and so would be unlikely to last very long. Getting things like tomatoes just isn't practical.)
I currently get one from Carnival Organics in Manchester (they only sell boxes), which is conveniently situated between where I work and the station. It's not great, but it's just good enough to stop me getting one.

Friday, December 15, 2006


I haven't really been drinking coffee lately. I quite like coffee - not nasty NesCrappy, but freshly brewed coffee, preferably from fresh grounds (although they're usually not quite so fresh).
I have to take my hat off to Union Coffee Roasters <> for having made the nicest coffee I've ever tasted. The packets I've tasted are smooth and fresh tasting, and have a pleasant citrus element. The only places I've found to buy it are Waitrose (nearest is either Otley or Sheffield), Beano and Just Bean (both in Leeds). It's subsequently a bit of a treat when I do get some.
Since I've been tired, I've been drinking coffee everyday this week - I think it was three cups on Monday. It started because I was shattered after staying out late on Saturday night, then waking up early on Sunday morning. So on Monday I drank lots of coffee to get me through the day. Monday night I had about five hours sleep.
Tuesday was a busy busy day - was at work by 8am, and, after taking the cat to the vet's, didn't get home until nearly 8pm. Not much coffee drunk, and I took some Nytol before bed, and I slept deeply.
Wednesday, I had 1 cup of coffee, felt really bad when I got home from work, but managed to drag myself out to Yoga, and unsurprisingly, slept really well, (and I managed to get up slightly later than usual). I felt really awake yesterday (Thursday), but I still had some coffee, and didn't sleep at all well last night.
So, from tomorrow, I'm going to stop the coffee, and hopefully I'll sleep better.
Right now, I just need one more cup now to get me through the day...

Wednesday, December 13, 2006


On Saturdays, normally I end up going into Huddersfield for groceries. Mostly, this is because I think that supermarkets are evil, and Saturday is the only day when I'm not at work and the smaller, local, shops are open. 
However, last Saturday, as well as getting my delivery from Black Isle Brewery (more on that in another post), Amy + I went to visit the cattery Henry will be staying in over Christmas, and ended up doing our shop in Holmfirth.
I've not really been to Holmfirth that much. It's where Last Of The Summer Wine was filmed around, and apparently the Café capital of West Yorkshire. Apart from that, I've never really had reason to go there.
I have to say, I was pleasantly suprised. Not only is there a respectable wholefood shop, called Your Nuts, but behind Your Nuts is a veggie, organic cafe called WOW. There are also a few green grocers, and we ended up getting the things we couldn't get anywhere else from Co-op, which is one of the less evil supermarkets.
So, from now on, we're going to try going to Holmfirth for our groceries on Saturdays (and probably squeeze in a visit to WOW too!).


Dammit, I started getting spam on my Google Mail account. For the moment, it's about one a day, and the spam filtering catches.
Also, it's clearly designed to fox spam filters, resulting in some rather surreal text:

Coming from where? I asked.
A galactic garbage dump! I cried aloud. Where you holier-than-thou
Now is the time, Captain. For at this meeting I am not only going to
Oh, I do appreciate a sense of humor, stranger. The tentacle took
there. Stand up, Jim! I got as far as my knees and he came on.
will not shout or you really will be dead. You will speak to me softly
slumworld. Think quickly, Jim, before things get any worse.
Very gradually the wall became higher as we walked beside it. In
tearful thanks in advance. This is the experience that will change
the bed, turn off the searing lights, stumble on all fours to my pack
everything was in great swing already. I ready. And gory too; I

Monday, December 11, 2006

Armando says...

"isn't there a possible compromise to be reached on the successor to Trident? How about taking all the money and saying we've spent it on a fresh batch of nuclear warheads, but quietly spend it on other things like street parties and the Olympics. Blow the money big time on fun and, instead, construct a missile system made out of bars of soap."
...and I whole-heartedly agree with him.

Hooray for Open Source!

Jeremy and Ayende (and probably others by now) have been considering the Microsoft attitude to Open Source.
I can see why companies don't like GPL, but it can turn out to be a good thing.
The very fact that Linksys decided to use Debian Linux kernel for their NSLU2 device, and were obliged by the GPL to release (bits of) their code, has meant that a whole community has sprung up around it (, who figured out how to run Debian on it, which has resulted in their product being used as a lightweight, low-cost, server. (yeah, 32MB ram and 266Mhz is hardly going to win any performance awards, but for ~£40 + cost of storage device, what do you expect?) [Edit: Thanks to Øyvind Repvik for setting me straight on this]
Jeremy makes the point about Agile development in .Net only being possible with open source tools tools. I don't think that this is just related to OSS. In the places that I've worked (my view of the 'Microsoft world'), people don't seem to want to know about something unless it comes from Microsoft. (The only notable exception is the miles of sub-standard code that's been copy-pasted from the code project).
Agile? Not until MS announced they'd been dabbling with SCRUM.
Unit Testing? Not really, and still not very much (too much poorly written code based on sample provided by Microsoft).
IoC/Dependancy Injection? Despite working with numerous "plug-in" frameworks, based on DLLs, then COM, and now .Net, people still don't see the benefit of taking it that one step further and creating all of their code based around this model.
In my view, the problem in the .Net world is that there are too many .Net developers. Many of these have come to it from VB and from ASP, and have little experience of rich OO architecture, and many wouldn't know a proxy from an abstract factory.
What happened to the Visual C++ developers? Most of the Visual C++ programmers I know are still developing in unmanaged C++, claiming the performance of .Net prevents them from moving.
To be honest, I've been trying to plot ways of leaving .Net, and moving to RoR or Java, as a way to escape the crippling laziness/poor practised that I consistently experience in Microsoft based developments. I'm fed up with having to teach people about loose coupling, dependencies, and other really basic stuff - the kind of things that other development communities seem to have tackled years ago, and from which they are now reaping the benefits.

Tuesday, December 05, 2006

Sufjan Steven's Christmas Songs

On the Asthmatic Kitty site, you can listen to Sufjan Steven's latest release, Songs for Christmas (a 5 CD set, that appears to be a compilation of previously unreleased stuff).
Admittedly, there's some only slightly above average stuff on there, but there's some wonderful bits too. Definitely a chrismas album worth having.

.Net Testing And Assemblies Signed with Strong Names

I've been trying to NUnit to test assemblies that reference some other Assemblies which are signed with Strong Names, and which aren't installed in the Global Assembly Cache.
I keep getting "Method Not Found" exceptions, which I tracked down to the Assembly Download Cache not being refreshed when the Assembly's Manifest hasn't changed (which it hasn't, just the code). Because the signed Assemblies aren't in the GAC, the ones in the Assembly Download Cache get used instead (I'm not quite sure why, but it does, so there!).
I can't put compiler directives around the AssemblyKeyFile directives (I could propose this, but I'm the only one using NUnit for unit testing, so no-one else would see the point).
Fortunately, Suzanne Cook mentions how to sort this out. Run "gacutil /cdl" everytime I recompile a signed assembly. Not a lot of fun, but it works.
I've thought about using DEVPATH too, but I've got a solution I can live with (for the moment), so I'll investigate that when I get fed up of typing "gacutil /cdl".

Monday, December 04, 2006

Development Metaphors

At the moment I'm reading Domain Driven Design and A Confederacy of Dunces (which is quite amusing in a very dry way). So no doubt, I'll be posting reflections on parts of the former.
Today's reflection is about a bit about the Motor Industry metaphor for software development. I
n the motor industry you have a team of highly skilled engineers who design a car, and then the assembly gets done by lower skilled people. Basically, this metaphor is used to support the idea that the hard part of software is the design, and that the important thing is to get the design right. If you do that, then you can have code-slaves putting it all together.
How does the "getting the design right" happen in the motor industry? By the engineers designing, and building, prototypes, testing them out, and then refining them. I might be wrong, but I'm sure that most of the engineers have the knowledge, if not the mechanical skills, to build a car.
In software, the prototype is the product, and so software development is all design. The low skill part - producing distribution media and packaging, can be done by machine. (The low skill repetative bit of coding should be done by machine too.)
To this end, I propose that a more useful metaphor: building a F1 racing car. In this case, you want the best people possible designing and building the car. You want them to interact, to talk about design decisions and how they can be implemented. At no point do you want someone who doesn't understand the interactions of what they're doing working on your tip-top machine.
Software development is all design (yeah, that's a quote from the book).

[Update: this is written about far more eloquently on coding horror, which I read quite coincidentally]

Sunday, December 03, 2006


Gary's written a reflection on using Ubuntu. It's kind of reassuring.
I've been using Ubuntu in a virtual machine for a while for some projects I've been working on. I kind of like it (although, I have switched to using Xubuntu, as it has a lower resource overhead).
There are still a few areas where the open source community lacks strong software. These are .Net development (nothing comes close to Visual Studio and Resharper), and music.
There's one DAW solution, but I tend to use Ableton Live, which is a bit of a hybrid, and I've not really seen else like it. That, and Guitar Rig. There is FreeAmp, but Guitar Rig is soooo amazing, I don't know how anyone else could do that.
There are some components out there that could be put together to arrange something ableton like, but, as always, it's time, and tweaking, and it's time i could actually spend playing guitar.
Yeah, so use ubuntu if you don't want to do music on your pc.

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.

Tuesday, October 31, 2006

less is more vs being polite

Simplicity is widely associated with reduction. In fact, in his book the Laws of Simplicity, John Maeda states the first law as being Reduce.
However, there comes a point where you have to stop reducing.
This is the same with emails, blog posts, newspaper articles, computer programs, and probably anything.
Take emails.
The widget - where is it?
David, Where's the widget? Thanks.
As you can see, there's very little difference in length, but the whole tone is different, and I know I'd be more inclined to reply swiftly to the latter rather than the former.
If you're going to send an email, be brief, but don't forget to be polite.

Monday, October 30, 2006

Visual Studio Developers need to get out of the IDE more

So, been in the new job for 2 months, and it's finally come to setting up my machine for development on the company's main project.
Is it a case of "svn checkout http://*****/mainprojectname", followed by "build"?
Fuck it is!
These guys have never left the IDE, so wouldn't know what a build script was if it came up to them in the street and gave them a big wet sloppy kiss.
So, what do I have to do to get this project working?
First: Get the Enterprise Library. Fair enough. Except the Enterprise Library doesn't build because I have NUnit for .Net 2.0 and not .Net 1.1. Fuckers.
Then the Localization Toolkit. Fine. Except I have to manually install bits of this (the WMI bits). Again - WTF?
Ok. So that's there. Except, stupid me, didn't realise I needed to install all this before I got the project from SourceSafe. Jesus.
Now I can't load half the solution because IIS is returning a 500 error for those projects. Fucking hell.
So, I'm now at the stage where I'm going to remove all the mappings from IIS. Unstall, then reinstall, Enterprise Library, get the solution afresh, and cross my fingers.
All for the sake of someone spending 1/2 a day getting it setup to work from a blank slate with open source tools like nant that can be put in the source repository.
I might have it setup by this afternoon.

Friday, October 27, 2006

rude words

Why are words like Fuck, Feltch, Shit, Cunt, Cock, Arse, Tit, Rim, Smeg, Rimmer, and Rectum considered to be grotesque, crude, offensive or inappropriate? Surely, that's like having a heirarchy of words, where words and phrases like "damn", "Bother Boots" and "Excuse me, my personnal area appears to have made a noise like passing wind" are higher up than their equivalent "Arse", "SHIT!!!!", or "fuck me, I've just done a fanny fart".
Who made up the rules about which words we can and can't use? Frankly, they should be taken out the back and given a good hard slap in the balls (let's face it, it was, undoubtedly, a man.) It's just wordism - descriminating against some words because of your own prejudicies rather than anything they have done.
If a word's in the dictionary, then surely it's as valuable as the next one, and we shouldn't be put into the situation where calling your boss "a cock-sucking whore" is any worse them questioning their commitment to their staff and their ability to manage an office of intelligent, yet somewhat disfunctional, humans. To be honest, sometimes, it's more fitting to call someone a "shit-sucking fuck face" than "a bit of a nuisance".
So, get with the mother fucking program you arse rammer: No more discrimination against swear words.

Firefox 2.0

I've been using Firefox 2.0 for the last few days. To be honest, I hadn't noticed any different to Firefox that I was using. With one notable difference - Firefox 2.0 would randomly crash. So, bollocks to it. I've gone back to, and I'll hold off that oh so vital upgrade to things like Javascript 1.7 (like anyone's actually using that anyway.)

What's that on the left hand side?

Twitter now allow you to twitter via Jabber (and hence Google Talk). I can also show my latest twitter on my blog. So, for short messages, I can now update my blog the same as I chat to Chris, Gary or someone else. If you want more, there's my twitter page. Crazy.

Wednesday, October 25, 2006

The Perry Bible Fellowship

I know Chris has blogged about it before, but The Perry Bible Fellowship is one of my favourite comic strips. It used to be in the Guardian, but they axed it for some reason. Fortunately, I can still read it online, and there's regular enough updates to keep me hooked.
Sometimes I find the meaning of the strip to be vague on first inspection, but then I take time to look closer at it, and it reveals its meaning, more often than not to comic effect. I know jokes and gags are meant to be immediate, but I think that PBF (as it's known to those in the know) works by its opaqueness.
The only complaint I have is that the strips don't show up in the RSS feed, so I have to leave Google Reader and actually go to the site. I know this only takes 1 click, but the PBF site is a bit slow sometimes...
Anyway, if you've not done so already, go read The Perry Bible Fellowship (and then probably leave me a comment to the fact that I'm clearly a weirdo for liking it.)

Monday, October 23, 2006

New Google Reader

Google relaunched their RSS aggregator a few weeks ago. I was quite a fan of the old version, which was fairly simple - a list of all available messages down the lefthand side, and a big reading pane. Gary didn't like it, because it didn't allow you to view messages by feed, but I quite liked its simplicity.
Their new version is more like other aggregators I've seen - there's a hierarchical list of feeds down the lefthand side, and a scrolling list of messages. It works really well, especially the special functionality that automatically marks messages as read when you scroll past them.  It's still simple looking - a bit like Google Mail - but it works really well. There are two other screens: the home screen; and the all items screen. The home screen is a bit useless, as it only provides a list of the latest two unread messages... The all items is much better, showing all items, which you can filtered by read/unread.
There are two things I don't like about it: it doesn't work well with the SessionSaver/SessionManager plugins in Firefox - it invariably displays an error message when it's shown in a restored tab when FF starts up. It requires me to do a <ctrl>+<f5> to get it working again.
The other thing I don't really like is the "mark as read" check box - it doesn't really change when a message is read/unread. The "shared" icon lights up, the "starred" icon lights up, but the "mark as read" check box stays a very indistinct colour, and a difficult to see check appears.
The "Shared" items functionality is cool - you could do this with the old reader, but you had to do it by tagging messages with a distinct tag. It's much simpler now, and the integration with blogger beta is cool.

Sunday, October 22, 2006

Weekend End

Wow. That has to have been the busiest weekend I've had in a while - and certainly the drunkest one, seeing as I hadn't had an alcoholic drink since the beginning of September. The reason for this was Gary being over from China for a week. It was a bit unexpected, and certainly not the best of circumstances, but it was still great to see him - it's a bit weird when you see someone nearly every day, and then you don't see them at all for six months.
We'd already met for lunch in Manchester on wednesday, so I didn't stay out for that long on Friday night (I got the 2140 train home), and he was already drunk by the time I got there...not that I didn't try to catch up! The beer in the Victoria was quite nice - the Timothy Taylor's Landlord was good, and then I had a pint of a similarly bitter tasting one before I left. It was good to see some of Gary's friends too - I'd met most of them a few times before, and Antz is a really nice bloke.
So yeah, apart from the bizarre train home, which went about half a mile at 7 miles per hour before turning back, and then having to walk to a different platform and get on a different train, Friday night was pretty uneventfull. I'm glad I did leave early, as apparently they didn't stop until 4am on Saturday.
On Saturday evening, we went over to Leeds, and met Gary, Antz, Mike and Cate at Hansa's - one of my all time favourite places to eat. The food was amazing, as usual, and as usual, we all left feeling like we'd eaten too much. With it being Diwali, there were free sweets, the one I had tasted a bit like pistachio turkish delight. We had a chat, ate, and it was good. Anthony and Gary were both monged out...
Cate and Mike came back to ours to visit Henry and stay the night (not sure which order). It was nice to catch up with them, as we'd not seen them since the beginning of September, when they came to drop off Henry. They've just put an offer in on a house, which is quite an exciting time. They'd left by about 11am, and I've mostly pottered around and cooked today, although we did go out for a walk in the rain and discovered that there are allotments quite close by, and that most of them seem to be used, which is good in one way, as if we did get one we wouldn't have to fight against nature as hard as if it was all overgrown, but it also means that there might be a waiting list. Mind you, we've still got lots of house stuff to sort out before we should be thinking about getting an allotment.
The week ahead might be quite busy at work, with a project due at the end of the week - the three week project that's had about one week of work actually spent on it...oh well. Amy also starts her new job tomorrow, so it might be a bit hectic at home too.

Friday, October 20, 2006

email address regular expression

complies to what wikipedia says on the subject

Why Refactor?

Because the aim of refactoring (in essence) is to reduce the amount of code, and less code = less chance for wrong code = less bugs.

Thursday, October 19, 2006

Wednesday, October 18, 2006

anonymous delegates in .net 2.0

This is a real quick sample of how anonymous delegates work in .Net 2.0.

your simple code:

delegate void test ();
public static void Main()
test r = null;
for ( int i = 1; i < 11; ++i )
int p = i;
test x = r;
r = delegate { Console.WriteLine ("{0}", p ); if(x != null) x(); };

Console.ReadLine ();

gets translated to:
class tmpClass
test x;
int p;

public void Execute ()
Console.WriteLine ("{0}", p );
if(x != null)

delegate void test ();
public static void Main()
test r = null;
for ( int i = 1; i < 11; ++i )
tmpClass tmp = new tmpClass();
tmp.x = r;
tmp.p = i;

r = new test(tmp.Execute);


So, for this simple (contrived) example, you end up creating 10 temporary objects.
I really like the idea of anonymous delegates, but their use needs to be reviewed carefully.

Tuesday, October 17, 2006

Autumn. Yay!

I love autumn. It has to be my favourite time of year. Yes, it's a bit colder (it feels a lot colder at the moment), and, yes, I'll admit it's darker, and wetter, but I still love it.
Because the Sctoland trip was cancelled (boo!), I've managed to get out for a few mini day trips - yesterday to the Yorkshire Sculture Park, and today to HardCastle Crags and Hebden Bridge.
I love the sculpture park, and the James Turrell exhibition has been extended until January. I really do advise you to go and see it. Even if you've seen it already, going to see it again is still amazing. He's also go a permanent installation, in what was the deer shelter. This is so simple, yet so effective. It's essentially a hole in the roof, but the roof is so thin, and featureless, that it frames the sky, and makes it appear close enough to touch. It's as if it's a moving picture of the sky rather than the sky itself. The space is also so quiet, it was nice just to be sat in there, looking at the sky.
There's also an interesting Simon Whitehead exhibition - it's a bit wierd as it's about walks that he's taken, and there was a stuffed goose, which meant I had to leave before looking at videos and listening to the cds, but the book about it seems a lot more interesting, and given some guitar ideas to try (not with my aria though!).
We didn't really look at much else - just had a bit of a wander. It was a shame to see the absence of the Ronald Rae stuff, but I suppose it can't stay there forever. There were quite a few Shaggy Ink Caps around, but not where I could pick them.
HardCastle Crags was really pretty with all the autumn colours, and we saw quite a few mushrooms - as yet unidentified. Again, it was a shame to remember that the sculpture trail will no longer be happening, but it was still nice to wander around. We saw the biggest dog I have ever seen (it came up to my chest).
Hebden was a bit hippy-fied, but most of it was closed due to it being tuesday (they seem to open wednesday - sunday, which I suppose works better with the tourists). Saw Sam, and went to Organic House for lunch. It's an ok resturant (Amy liked it), but there was a feeble vegan choice (hummus, basically).
Yay, so get out and enjoy Autumn. Take your waterproofs, wear a jumper that you'll have to take off, and after a while come home and feel cosy, but, most importantly, get out and enjoy it before it turns into winter.

Sunday, October 15, 2006

Why using code samples from the internet is a bad idea

If you're anything like me, you don't know how to make a computer do almost anything, but you do know where to look for code samples that show you how.
Also, if you're anything like me, you don't often have a lot of time to play the code samples, see how they work, read the API documentation (if there is any!), or often even the article text that accompanies the code. Usually it's: google, download code, unzip, compile, run. Then a quick once over to see if it does what I want.
However, sample code should never make it into production. Why? Because it's SAMPLE CODE.
The aims of sample code are to illustrate how a technology/technique works.
What it doesn't aim to do is be ideal code that you can copy and paste straight into your application.
Here's a sample from

string connectionString = "Data Source=MEDIACENTER;" +

"Initial Catalog=AdventureWorks;Integrated Security=SSPI;" +

string strSQLGetOrder = "Select * from Sales.SalesOrderDetail" +
"WHERE SalesOrderID = 43659";

string strSQLUpdateInv = "UPDATE
Production.ProductInventory " +
"SET Quantity=Quantity-@amt WHERE (ProductID=@pid)";

SqlConnection marsConnection = new SqlConnection(connectionString);


SqlCommand readCommand =
new SqlCommand(strSQLGetOrder, marsConnection);
SqlCommand writeCommand =
new SqlCommand(strSQLUpdateInv, marsConnection);

("@amt", SqlDbType.Int);
("@pid", SqlDbType.Int);
using (SqlDataReader rdr = readCommand.ExecuteReader())
while (rdr.Read())
["@amt"].Value = rdr["OrderQty"];

writeCommand.Parameters["@pid"].Value = rdr["ProductID"];
marsConnection.Close ();
If I saw code like this in someone's production code, I'd see red. This is, frankly, shit.
What does is illustrate how you can use Multiple Active Recordsets in ADO.NET 2.0.
What's wrong with it?
  • Embedded SQL.
  • It doesn't clean up the open connection reliably.
  • Embedded column and parameter names.
  • Hard coded connection string.
  • No mention of Transactions.
  • Result would be better achieved in a simple SQL statement.
I could go on. I suppose the main problem with this sample is that it isn't integrated with the rest of your code. Because it is provided as a stand alone sample, it doesn't use any underlying framework that you're using. For example, if I was using the Data Access Application Block to underpin my data access, this code snippet is useless. Also, if I'm using an "n-tier", or layered, design, this code is pretty pointless.
So, we should use code samples to see how to use a specific technology or technique, but then go away and write our own code that fits in with your application.

Saturday, October 14, 2006


Friday was my first day actually coding for my current employer.
However, I'm getting some bad feelings about the code base.
First, rather than use a closed source, but otherwise free, component, the developer I'm working with had decompiled it, and renamed the namespace.
Why? I have no idea. He'd certainly not touched, or even really looked, at the code.
Secondly, the other senior developer has a laptop and a desktop machine, and his code seems to be shewn across the two. If I had this, I'd be sure that I was using source control, even as a joint store between the two machines. But no. I asked him for some code that I was meant to be working on, and it took a full hour before it was in the company's code repository. This is the company's prime assets (it's a technology company), and it's not even under source control. WTF?
I've watched the programming team, and whilst they seem to get on, there's not a lot of "team" working. Everyone seems to work in isolation, then run into trouble when code sharing comes along. I presume this is because there used to be three of them, and now there are five, and an office/project manager. Information sharing becomes more and more important as the team grows.
I'm going to stick with it for a few days, then try and rock the boat a bit, and see what happens.

Scotland is off

Yeap, you heard it straight, Scotland is off.
After going back to work yesterday, both Amy & myself were absolutely drained last night, and realised that a dead early start, followed by 10 hours on a train, and then an hour car journey, may not be the best thing for our recoveries.
It's a pain, not least because of the money (I don't think we'll be able to get any money back on the cottage), but also because I was looking forward to getting away for a few days, getting some fresh air, and meeting up with Chris and Conrad. I think Amy was looking forward to finally meeting some of my Sheffield buddies - I think she thinks they're made up.
Despite not going, I'm still glad to have a few days off. I know I've been in bed for most of the last week, but I feel like everything's been hectic recently. I don't know, perhaps it's the fact I'm out of the house from 0730 to 1845, so I've effectively lost an hour of free time a day.

Friday, October 13, 2006

Fwd: weekly update friday the thirteenth of september two thousand and six

This week, brilliant indie record store Norman Records offered Max Richter cd for cost price. here's their explanation:

This week you may have noticed we put the Max Richter up on the site very cheap 'n all. In fact we are selling it at cost price so we're not making a bean on this. The reasons for this crazy phenomena are twofold:

1) It's a great album and you all need to hear it. Selling it at cost is a great way of spreading the music

2) Errr... we had no choice as Boomkat managed to get it a week early as they had struck up an exclusive deal with Fat Cat. I called Fat Cat who were very nice but they couldn't really help us in the way we wanted to be helped (ie we all get it at the same time to create a level playing field). This kind of behaviour is going to be the downfall of indie music stores as the big corporate style of said online store slowly takes over. It's fine for stores to have exclusives but on big properly distributed releases like this it just isn't fair at all. If everyone buys it from them, then no one buys it elsewhere thus taking important key sales away from the smaller indies. You can say what you like about the indie stores but without them you have no independent music. Thus, to support independent music you need to support the little stores otherwise both small labels and artists will suffer. Eventually it will get to a stage where there are no indies left and the lesser known artists will struggle to get their releases into the handful of stores left (they may not see it worthwhile as they won't 'shift enough units for them). I am not just romanticising here, this will happen! So we thought the only thing to do in this case was to sell it at cost price which may be suicidal but this is an important release for us this year. You may notice other shops have done this too so it is not just us who are aggrieved. The independent music store is the lifeblood of music. Without that you have a load of bland corporate places telling you what you should own. As indie stores shut down there will be less choice available and those in need of their fix will go straight to labels which is what kind of happens anyway. Only time will tell what will happen eh....
Fat Cat have released some of my favourite albums lately, and this behaviour is fucking ridiculous. I've sent them a rather rude message asking them how they like being a coporate gimp, and I'll let you know if I get a reply.

Running...or not

I'm back at work today. Trying to take it as it comes, but the first hour or so has been ok.
However, the forecast for Sunday's run isn't so hot. I'm still very flemmy, and I do have a cough still. Unless I get a lot better by tomorrow evening, I'm not going to be able to run, and even then, jumping up, after a week of virtual inactivity, and running 13 miles is perhaps over optimistic. I'm still stubbonly refusing to say that I'm not doing it, as the disappointment is too much to face. I've been training since May, and to have to pull out at such a late stage because of, let's face it, a cold, is a real bummer.
Ah feck, I'm not running, am I? Shit. I'll just have to sit and cry for the whole time.

Tuesday, October 10, 2006


Was looking at, which shows estimates for how sea levels could rise. Basically, a 14 meter sea level rise (yes, that is a lot) would see Leeds virtually on the coast, and even 5 meters sees Selby under water*.
*not necessarily a bad thing.

Monday, October 09, 2006


I'm off work today, with a cold. It sounds lame, but walking downstairs to phone work took it out of me, so I don't think that a 40 minute train ride, followed by a 15 minute walk was really feasible. Amy was feeling dodgy too, but she's managed to go to work. I hope she's ok.
So, because I've not put anything on my blog for ages, here's a quick summary of what's going on in my life:
The big event is next weekend (argh!), but I managed to do 10 miles on Saturday, so hopefully should at least be able to make it round the course. It's looking possible that I'll be running it by myself, as Bill and Conrad didn't get round to entering, and Chris' ankle is still playing up. Still, I'm sure the other people running will provide inspiration, and Paul Radcliffe's tip about counting to 100 instead of constantly worry about how far you've got left seems to help too. It's just a bit difficult counting to 100 whislt breathing enough, but it did seem to help on saturday.
Henry gets his stitches out today, but his wound is still a bit scabby, so we're going to keep him in until he's healed properly. That should stop another fight opening up the wound again, but won't stop more wounds. He's been being really friendly, and a pleasure to have around (most of the time). He did knock an entire pint glass of water off the coffee table yesterday, but he was just sniffing around, and didn't do it intentionally.
Yeah, work. Yeah. Been going ok. Just one day, when they said "you can all work an extra half hour a day for the next month, can't you?", has been bad, but it seems ok. Still haven't done any serious coding, and I can hardly wait. They don't seem to know about unit tests, loose coupling, or anything like that, so I'm looking forward to introducing some of those concepts. The manager seems quite keen on BUFD, almost done to the code level, which worries me slightly, but I can see that he'll be happy as long as the work gets done. I hope I never have to spend a month on requirements capture again.

I need to go and lie down now.

Thursday, September 28, 2006

Party Conferences

It's party conference "season" at the moment, and frankly I'm fed up with it. It's all a load of bollocks, but the Press seem to lap it up. I, for one, don't care about how the Parties reach their pointless policies, which they'll inevitably default on and change anyway.
Also, I don't understand what all the "Tony Blair's Leaving" shit is all about. Surely, if Party Politics was truly democratic, it wouldn't make any difference who the leader was, as they'd only be implementing the Party's will.
It all stinks of shit, and frankly there's a whole lot more going on in the world that the Press should be telling us about.

Wednesday, September 27, 2006

Henry vs Back Alley Cat

Well, Henry's been fighting, so I took him to the vet last night, as he had a really nasty wound on his back leg. The vet took one look and said he needs stitches, so I left him there overnight, and I'll get to hear a bit later on about how it's gone.
It was a bit strange, coming back to an empty house. He's only been with us for four weeks, but it already feels very strange not having him around, and both Amy and I were quite upset about it.

Thursday, September 21, 2006

Paging In TSQL

There's a lot of crap written about paging in TSQL (SQL Server's SQL). Then I found this article that uses SET ROWCOUNT to do it. Brilliant.
However, there's no error checking, so I've tweaked it a bit, and my results are below. Enjoy.

DECLARE @Start int, @End int

DECLARE @StartId int
DECLARE @NumRows int

SELECT @Start = 11, @End = 20

IF @Start <= @End
SELECT @StartId = addressid FROM Person.Address
order by addressid Asc

IF @@ROWCOUNT >= @Start

SELECT @NumRows = ( @End - @Start ) + 1


SELECT * FROM Person.Address
WHERE addressid >= @startId
order by addressid Asc


Anne2.0 posted a link to an article about coghead.
In their own words:

[Coghead is] A simple, powerful new way to create web-based business applications that can be used by anyone, anytime, anywhere!
Coghead developers don’t need to know how to code! With just a browser and an internet connection, they can create, modify, and deploy hosted business applications, and collaborate directly with their end-users all via the Coghead service.
Sounds like they're empowering the user - the person who wants to use the application. Sounds like a great plan.
With one major drawback. At the moment, there doesn't seem to any talk of sharing information with exisitng applications.
This is best illustrated with a story (sorry if you've heard this one before) about an organisation that allowed unrestrained use of Microsoft Access. Microsoft Access allows development of simple database applications without (too much) code. (This isn't a crack at Access, I'm sure you can do many marvellous things with it). Across this organisation, many people created applications (some quite complex) that many more people used to run the organisation.
This organisation had a a number of branches (about 300). Each branch had a number of staff, as well as a number of customers. There were about 120,000 customers in total. The organisation was required to keep track of all of this.
Now, if you can imagine, 300 Access Databases, some duplicates (because, after all, Access Databases are just files that can be copied as easily as a Word document), all with their own list of, at least these 300 clients, and all with a different (sometimes duplicate) bits information about the 120,000 customers.
The problem, of course, comes when details change (which they did on a very regular basis), or when somebody to use bits of information from across different databases. It was a nightmare.
Of course, maintianing these applications/databases was a constant struggle, because they'd usually been developed by a member of staff who was on holiday, or who had left, and almost invariable had no idea about normalisation, settling on a naming standard, or programming in general, after all, they'd just knocked this application up in their lunch break(s).
So, how does Coghead solve these problems? As far as I can tell, it doesn't. If you want to run your entire business on it, it's probably ideal, and I'm sure it'll work great, but there seems to be no emphasis on collabaration.
Now, I'm aware that there are businesses using Excel for their central database (bless), and I'm sure this is a giant leap away from that (I mean, it's got workflow tools and security). However, without addressing the collaboration issue, I think the probability of replacing a poor solution with a more powerful poor solution is too high.

Wednesday, September 20, 2006

Catch up...

Seeing as I've moved to blogger beta, which, as Gary pointed out, is a lot slicker than plain old blogger, and it no longer requires me to have a blogger and a google login (horray!) I though I'd better write some new content, which in fact most people will already know.
Green Man Festival - brilliant, despite having to put the tent up in the dark and rain, and taking 6 hours to get there, and the first night being a massive thunder storm, the first day being almost constant rain. Still brilliant. I think having the cottage to retreat to was a really nice extra - we got to get clean and relax comfortably. On the monday morning when we were woken up at 6am by a van stuck in the mud next to our tent, not having a six hour drive was also good.
Music-wise: julina molina was my favourite, especially as I'd never heard her before. Euros Childs (formerly Gorky's Zygotic Munkie) was very good too, albeit in a poppier, happier, more jumping round the room way that I usually go for. Tunng were brilliant too. Bat for Lashes was another good find - a bit Bjork like, which is no bad thing in my book. The dressing up was beyond the call of duty, too. Malcom Middleton played a blinding set, and Viking Moses entertained, especially with his cover of Whitney Huston's I Will Always Love You (no, it wasn't done seriously).
There's some bits and pieces on the bbc collective site.
After Green Man came Wales, or at least the Brecon Beacons. Really beautiful hills.
We were staying right by Table Mountain (near crickhowell), on the Breacons Way, and did one walk right from the door, which was brilliant. Also walked under a water fall, which was pretty neat, and up Pen Y Fan, which was really challenging, and then slightly disappointing - there's a really easy way up to the top, and so it was teaming with people who weren't out of breath. We went up the route that was shit scary, and my vertigo nearly got the better of me. The way down featured a 200ft drop on one side, which did get the better of me. The last day we did Sugar Loaf Mountain, which was a bit of a stroll. We meandered up there in about 1.5 hours, including stopping for lunch, then ran down in 30 minutes. I was quite exhilarating running down. I've put some photos over on flickr.
Coming back from Wales, we found Cate and Mike staying at our house. It was arranged, although at the last minute before we left, and they bought Henry up with them. It was cool to see them, even though we'd only seen them a fortnight before, and they were in house hunting mode... Still, hopefully they're going to based in Leeds for some time to come, so I should be able to see them more.
Henry's been cool, and I'm starting to enjoy having him around. Despite a few (nearly) sleepness nights, where he found he could get his paw under the bedroom door, and thus wake me up by scratching, it's been ok (we've kept him in the kitchen at night since). Last night, for the first time, he didn't come back before we went to bed, and hence caused no end of worry. He was outside this morning, acting like nothing had happened. He seemed quite tired when he came in and he ate all his breakfast in one go, which he hasn't done for a few weeks.
The new job, at million21 seems ok. It's actually application development, rather than web stuff, but with a strong bias towards web technologies, which is kind of my thing really. Also, there's a bloke who's fresh from Uni, who I'll probably end up taking under my wing. Been working on a project that's not connected with the rest of the company's work, so not got to see their coding standards, practises, etc... that's a treat to come. They do seem hooked on SPs though, which is something that's going to cause friction, no doubt.

Tuesday, September 19, 2006


Blogger screwed up my blog (or, at least, it disappeared), so I've had to republish it apologies for those syndicators who get all my content appear again.

Monday, August 14, 2006


originally uploaded by b3ardman.
Saw Mike and Cate at the weekend. Was another weekend with too much time spent in the car, especially as we went the wrong way (twice) when we got to London, but it was good to see them.
The main purpose of the visit was to see Henry, who's going to come live with us once we get back from our holidays. Fortunately, Amy wasn't too allergic (she got a bit snotty, but her eyes seemed ok). Henry seems like a dude, he didn't seem to mind Amy fussing him, or me not fussing him. In fact, the only thing he seemed to be concerned at all about was his dinner (but then that's cats I suppose).
Amy and I are already looking forward to him coming to live with us. It'll be great to have the patter of paws around the house.

Friday, August 11, 2006

Cracked it.

Finally, found a way to AppUnload IIS sites using PowerShell.

New-Object System.DirectoryServices.DirectoryEntry "IIS:// servername/W3SVC" | %{ $_.get_Children() } | where { $_.get_SchemaClassName() -eq "IIsWebServer" } | where { $_.serverComment -eq " sitename" } | %{ $site=$_;"-----";$site.get_Name(); $site.ServerComment; $site.get_Children() | where { $_.get_SchemaClassName() -eq "IIsWebVirtualDir" } | %{ $_.Invoke("AppUnload") } }
where { $_.serverComment -eq " sitename" } is useful if you need to pick site via the "server comment", which is the name displayed in IIS. If you only have one site (like on XP), then you can remove/ignore this. Also, it prints out the site "name" (this will be a number) and "server comment", which isn't strictly necessary, but then at least you'll get an ideas what's going on.

The bit I got stuck on was that the full path to a the object that has "AppUnload" is "IIS:/localhost/W3SVC/1/ROOT" - I was trying to do it on the "IISWebServer" element...

Wednesday, August 09, 2006


so, after yesterday's childish reaction to rewriting the spec, I got told that the incomprehensible pile of shit that I had written was "a lot better", and the only comment I got was that "[what I posted yesterday] has to be the longest sentence [project manager has] ever seen".
Thank fuck I'm out of here.

Tuesday, August 08, 2006

too much?

I hate writing functional specifications, thus I write bollocks, like this sentence:

A Review Schedule is created for documents with the status of "Published" on the "Create Review Schedule" page by selecting the first review start date, which the system will check as being after a date in the future, the first review end date, which the system will check as being after the first review start date, thus also a date in the future, and the review frequency with which the document in the status of "Published" is to be reviewed, which may be monthly, quarterly, biannual, yearly, two yearly, or three yearly, but the system will ensure is greater than the period between the first review start date and the first review end date, then clicking on the "populate review schedule" button, which will populate the review schedule by initially calculating the next review state date as being the first review start date plus the review frequency and calculate the next review end date as being the first review end date plus the review frequency, then by calculating subsequent review start dates as being the previous review start date plus the review frequency and the associated review end date as being the previous associated review end date plus the review frequency, and continue this calculation until it has populated the review schedule with eleven further review start dates and eleven associated review end dates, which will be presented to the user to modify as they which, but which the system will ensure do not over lap, by checking that each review start date is before its associated end date and that each start date and associated review end date represent a discrete time period within the review schedule, and then allowing the user to save the populated review schedule once they have made any changes that may be required and which the system validates as representing a valid review schedule.
So far I've written 3 pages of this durge. I did follow Joel Spoelsky's advice, but I got told off, so they'll have to put up with this.

Monday, August 07, 2006

Bristol's a long way away

Nine hours travelling (there and back), which is a bit much for a weekend. Nice to see Amy's sister mind. Amy's got crazy ideas about living down there, so I had to take the scenic route back, the one over Pole Moor, where you can see all along the Colne Valley. Picture's of Clifton Suspension bridge. I was too scared to walk across it, it's fucking high up. Posted by Picasa


Although I can find little information about it, nvarchar(max) is one of my favourite features, to-date, of SQLServer 2005. (It's not a LOB, it's a Large Value Datatype!)

Goodbye pens

I let Amy borrow my Muji pens which I'd kept hidden in my bag. I'll never see them again then.

Wednesday, August 02, 2006

PowerShell + sourcesafe = :D

gci -i "*.aspx" -r | select-string "searchstring" | %{ $_.RelativePath($(get-item .).FullName) } | %{ ss checkout $_ -i- -gf }

{checks out items from current project dependant if they contain the pattern searchstring}

Tuesday, August 01, 2006

Dorest Cereals

Dorest Cereals (their homepage doesn't work at time of writing) have redesigned their packaging, and it looks really good: check it out. (There's some pictures of the old style here).
Apart from fitting in the cupboard better, and being easier to close, they are  harder to recycle (due to the plastic windows), and contain more packaging, as there's a polythene bag inside of the box.
Aesthetically, however, they are very smart.

Monday, July 31, 2006


Bill's Rock Balancing
Bill's Rock Balancing,
originally uploaded by b3ardman.
I like camping.
I also like my SDL (past + present) buddies.
So, this past weeked proved to be most pleasurable, as I managed to do both.
Walking, beer and food all featured. As well as stone balancing and general tom-foolery.
Strangely, I think bouncing down the edge of Kinder Scout fixed my knee. Hooray.
Back to work today. Bum.

Thursday, July 27, 2006

All I want is a job where I don't feel like I'm compromising myself everyday.

So, I was offered a job, good pay, good benefits, but simply too far away.
Then, yesterday at interview, I failed to sell the non-technical side of my skills, and so failed to get a job nearer home.
It's the second part that I'm most fed-up about. I didn't have a job specification before the interview, and then, at the interview, they didn't really explain that the job would involve customer interaction, so I went all technical on them, and totally missed the target with the other side of the job, which I didn't even know existed.
I'm really hating my job at the moment. Everything I do is a fucking hack. Hack this, hack that. I'm a bit worried I'll forget how not to hack.
Fuck it. fuck fucky fuck fuck.
Time to put the CV on monster again, to hell with it.

Friday, July 21, 2006

2 job interviews, no job

Not because I didn't do well at interview (one have already come back indicating they're putting the final touches on a proposal), but simply because they're not right for me.
One, which seems like I might do well there is simply too far away (would require 1h15m drive, hence £++s on travelling, and less reading time). The manager seems to have a flexible attitude to working hours, even if the official company line difers, and when I had to give an inprotu presentation on something technical (they asked me to tell them something about SQL Server 2005, so I told them about Report Services), they seemed like they were actually thinking about how & where they could use it. It's a shame it's so far away, and they'd mentioned outsourcing things to India previously (although I think they got burned).
The other one is for an online games (read 'gambling-lite')(or should that be 'gambling-zero'?) company in Manchester. Seemed ok, although they stumbled when I asked about Test Driven Development (seemed to have looked at NUnit, but not grasped the nettle). No benefits (no pension, minimum holiday), and the £££s didn't seem to compensate for that. Had a bit of an argument with the agency guy about what he'd told me beforehand, but I think it's best left alone. Why do companies forget that employees are people, with wants and needs?
I've got another interview next week, where there's more benefits ( 25 days hols + 8 stats, Stake holder pension, subsidised Gym membership just up the road & bonus scheme payable upon individual performance), which is always good. Not read the job spec yet, but it's closer to home, which is always good.