Goodwood Revival!

Reading Time: 9 minutes
Cobras and E-Types
Cobras and E-Types… mmm… racing cars…

Goodwood Revival was enormous fun.

I am, it has to be said, a bit of a car nut. I like cars, I like motorsport. So put a couple of hundred of the most classic racing cars in history on a track and race them – and I really do mean race them – and you’ve got my interest.

Goodwood Revival is a pastiche of course – it nominally attempts to revive motorsport as it was before 1970, the reality is that it does no such thing. I would argue that it doesn’t want to either – motorsport is still dangerous but before 1970 it was practically suicidal. Goodwood itself claimed the life of Bruce McLaren and ended the career of Sir Stirling Moss.

So I’ll hear no nostalgic talk of “The Golden Era of Motorsport” – sure there were things that were better, but there’s a hell of a lot that was worse. I also don’t think we want to look too with too rosy an eye at the realities of life for the average person in the mid twentieth century. We’ve come a long, long way since then.

The beauty of the Goodwood Revival is that we can ignore the crappy standard of living and the appalling attitude to safety and just celebrate the good stuff. Let’s face it, the cars were much, much prettier and had an elegant simplicity that today’s machines – although clearly far superior in just about every other way – lack.

 Decisions, Decisions

The people I was with were dressing 1950s style, so I had to fit in with them. I’m not exactly preppy, I’m not a military person and a not really a biker so (months ago) I started looking at what the early Teddy Boys wore. This was a bit of a non-starter – they wore smart Edwardian clothing. The basic lounge (business) suit hasn’t really changed much in 100 years so whilst looking like an authentic 1950s Ted is pretty easy, it’s not really playing the game.

So I started looking at other 1950s fashion and I ran into this image of James Dean from Rebel Without a Cause. There’s no way my hair was going to do that – far too short, but I should be able to get a jacket, shirt and trousers pretty easily…

Tom And James

Tweed jackets also have the added bonus of being warm, which is a definite advantage at a race track.

Glamping

Trying to find accommodation is a pain. There is a lot in the local area and Goodwood do put on shuttle bus services, but demand far outstrips supply. The reality is that if you do find somewhere for a reasonable price you’re likely to have to drive into the event each day. That’s inconvenient from a traffic point of view and also because you have to have a designated driver, which is not really in the spirit of Goodwood Revival (see earlier comments about this not actually being the 1950s).

The other option is camping at the site. This however is not like camping a music festival. You get a good size pitch and the facilities are good and well maintained. You’re also with a different set of people: camping – or more precisely motorhomes and caravans – are deeply embedded into motorsport in the UK. These are people who are used to being to be up and compos mentis at a reasonable time in the morning because they’re involved in the racing. Sure there’s some pretty hard partying going on, but it’s at the event- the camp site is actually a bit of a peace haven.

We’re experienced campers and nothing about the arrangements really phased us. Overall Goodwood do a great job in creating a perfectly reasonable temporary camp site in what is otherwise a farming field.

There are a few things that I someone considering this option might want to be aware of:

  • The route to the camp site is adequately signed, but only just and the signs start appearing a little on the late side compared to the main event signs.
  • There are generators and flood lights at each facilities station that run all night. If you’re bothered by these pick a pitch away from them.
  • People actually drive across the site to the facilities. The site isn’t that big however and anyone without mobility problems doesn’t really have an excuse for this.
  • Traffic queues to get in and out of the camp site are pretty horrendous at peak times.
  • Toilets, showers and washing up facilities are provided and I think I saw an Elsan point. There’s also a “boudoir” where you can do your make-up etc. Don’t get too excited, it’s just a portacabin.
  • The site is pretty flat, but make sure if you’ve got a tent or awning that you bring good pegs, the ground is very, very stony.
  • The camping overall is a little disorganised, it somewhat relies on the fact that the majority of people there are seasoned campers and that everyone can work things out for themselves pretty well.

Glamping

Thursday

So we arrived mid-Thursday. There was a fish and chip van on the camp site but it wasn’t signposted and we in fact came across it entirely by accident. Other than that there didn’t seem to be much around or much information on what might be elsewhere.
We were aware however of “Over The Road” – shopping and entertainment zone that didn’t require a ticket. We figured that some of the stall-holders would be aware of people arriving on Thursday and would probably be open so we decided to head there.

This is when we ran into the first problem – there was no information about how best to get there. So we followed the signs to the track and found not only the entrance to the venue locked but the exit from the camp site locked and a total lack of any information or signs. We looked at a (OS) map, hopped the gate and made our way via the roads to “Over the Road” – something that I wouldn’t recommend unless you’re accustomed to walking on country roads.

We got there to find that only a handful – out of several hundred – of the stalls were open. It was lucky we had eaten earlier and had some beer back at the camp site otherwise we would have really struggled. As it was we got the lay of the land then made our way back to the camp site.

All of this hassle could have easily been resolved if the information we’d been given at the start – about camping – were a little better.

Now, enough of the complaining. Here’s a picture of a Jaguar D-Type.

Jaguar D-Type
Jaguar D-Type

Into The Weekend

So Friday morning came and we made our way to the track and attempted to buy a programme. Finding a stall was easy, people were leaving with programmes and money seemed to be changing hands. It wasn’t advertised as a programme stall however and this became a common theme of the weekend: all the staff are extremely helpful and well informed, but signs and directions were sometimes a little lacking. Common sense is definitely required.

Racing!

If you’re not familiar with classic racing events you would be forgiven for thinking that they’d be populate largely by owner-drivers tiptoeing round the track, terrified of scratching their pride and joy.

Nope.

This is former – and possibly future – Formula 1 driver Guido Van Der Garde a few seconds after he’d demolished the chicane with what was until that point a rather nice example of an AC Cobra.

Guido Van De Garde, AC Cobra, Chicane

The car was recovered to the pits where a combination of crowbars and lump hammers was used to re-shape the offending bodywork so that it didn’t foul the wheels and was something approximating the shape it should be. Several reels of tape were then applied and the car was then sent on its way and spent the rest of the weekend quite happy.

I don’t know what the total car casualty list for the weekend was and I’d hate to think of the bill.

OK, so nobody’s taking the same level of risk that their historic counterparts would, but here’s my point: they’re definitely very serious indeed about racing.

Dab Of Oppo
Dab Of Oppo?

One question for us was grandstand or no grandstand. Grandstand seats certainly don’t guarantee you a better view – many of the best views are to be had stood near the track. The one big advantage that a grandstand gets you is somewhere dry – there are a few other covered areas but none that you could watch the racing from. If you don’t mind getting rained on, I’d say don’t bother with grandstand seating.

I’m not going to go into the racing too much because Goodwood themselves do that a lot better. You can currently watch all the 2015 races on the Revival site. There were some pretty fun races.

Retro! Vintage!

Of course a major part of The Revival is the feel of being somewhere in the mid twentieth century. A lot of people dress in the fashions of the day – enough that it seems normal.

The venue helps too – the last contemporary race at Goodwood was held in 1966 and it was effectively closed in 1970 which gives them a bit of a head start, but a lot of effort has been put in at the venue to make it look like something mid twentieth century.

The track also has a distinctly retro feel, there are no large safety fences as there would be at a F1 Grand Prix track. There are large run-off areas, gravel traps and large banks of earth fronted by ranks of tyres and Armco barrier. This means you can get some great views and really feel like you’re part of the action. On the flip side it’s hard to not be aware of what it says on the back of every ticket, “motor sport is dangerous”.

Shopping! Paddocks!

There are a lot of stalls. A lot. Most of them are related to motoring or motor sport. There are a few others, I particularly remember a barn construction company and a number of niche clothing companies. You could easily lose a day between the main venue and “over the road” just going round the stalls.

There are also the paddocks, somewhere around half of these are open to the public to have a nose around – being able to get up close and personal with some of the cars is a real privilege – a lot of them are of major historic importance and are utterly irreplaceable.

DSC04228

There are also other attractions too – the Earl’s Court Motor Show, Bonhams, etc. If you want to see a decent amount of racing then you need at least two days to get round everything.

Speaking of getting around, there are handy, free and frequent tractor-buses that circle the perimeter. Otherwise it’s a fair old walk.

Food! Water!

There is certainly no shortage of booze, but don’t expect pub prices. If you want to get yourself over-refreshed it’s going to cost you – particularly if you end up in one of the Veuve Clicquot bars. There is however nothing stopping you from bringing in your own favoured tipple, although if that’s beer it could get rather inconvenient.

There’s also plenty of entertainment, a couple of small stages at the event that host bands and a couple of touring groups of singers. “Over the road” also had a roller-disco and another stage. All of the acts we saw were pretty good.

Food however was a bit of a let-down. There were a few catering tents that did average quality mass catering for prices that weren’t too horrendous. There were also a reasonable number of catering vans. The problem is that most places sold pretty much the same things – pies, pasties, burgers, fish and chips. There were a couple of pizza stalls which were really the only vegetarian option. I’m sad to say that compared to the British F1 Grand Prix at Silverstone the catering at Goodwood Revival was poor. We visited FoS in 2007 the catering was pretty decent which only served to add to our frustration.

Celebs! VIPS!

Yes, there were a few knocking about – particularly a few notable owners / drivers. The ones we saw were all very friendly and patient. There were a few other people we spotted around too.

Quite a sizeable chunk of the venue is however dedicated to VIPs of one sort or another. This can be a bit irritating at times, particularly if the car you want to gawp at is in one of the “Members Only” paddocks. One has to keep in mind however that the access one gets as a mere prole is remarkable anyway – there’s no way you can get near any of the cars at most race meets!

You Should Go

OK, I’ve been a bit whingy and it’s true there are problems, but now you’ve read this you know what they are and how to deal with them!
Overall Goodwood Revival is a fantastic event and enormously good fun for any kind of motor-sport fan.

It’s Time to Move On

Reading Time: 2 minutes

Seed OfficeAfter considering the matter for some time now I’ve decided to leave The University. I know this will come as a surprise to many and it was to me a little. The reasons are rather complex, but it boils down to the fact that I’ve achieved what I set out to achieve and that many threads are coming to a natural end.

I’ve been at Seed Software for more than 6 years, it’s been a remarkable journey and we’ve taken the business way ahead of anyone’s expectation. I’m hugely proud to have been a key player in taking Seed from a start-up to one of the biggest suppliers of software to the UK Fire Service and the most successful project of its type in the UK.

It is now though time to draw a line under this chapter and begin a new one. So I’m looking for a new role beginning in October this year. I’m keeping an open mind as to what that might be.

Update Septmber 22nd 2015

I’ve now agreed terms with another organisation. I’ll be leaving Seed Software in mid October.

–end of update–

My career is punctuated by large switches of environment. Embedded to VMS to *nix to Windows, flow orientation to OO, native to managed, waterfall to agile and of course keyboard to chainsaw when I worked in habitat management for a while.

Find out more about some of the key projects I’ve worked on or more about me in general on the “About” page.

Read more

Because… PostScript!

Reading Time: 2 minutes

Because it’s become somewhat of a tradition for me to do something silly on a Friday lunchtime, I thought I’d take on one of The Department‘s basic coding challenges.

The brief was simple;

I want a program that will print out the numbers 1,2,3,4,5,6,7,8,9 in a shuffled order. The order must be different each time the program runs. Note that the same number must be different each time. It should be possible to extend this to work with 52 numbers, in which case I can make a shuffled deck of cards.
You can use the Random number generator in C#, but you must make sure that the same number never appears twice, as a deck of cards which contains more than 4 aces has been known to raise suspicion.

As it was Friday lunchtime however I decided to make the solution anything but simple, firstly I replaced the numbers with the actual card names and secondly I thought I’d write it in PostScript because it demonstrates a totally different form of notation from the way we write the normal imperative languages like C# or Java.

/Suits [(Clubs)(Diamonds)(Hearts)(Spades)] def
/Cards [(Ace)(Two)(Three)(Four)(Five)(Six)(Seven)(Eight)(Nine)(Ten)(Jack)(Queen)(King)] def
/YCursorMax 720 def % 10 inches from bottom
/YCursor YCursorMax def 
/XCursorMin 72 def % 1 inch from the left
/XCursor XCursorMin def
/XColWidth 113 def % 1/4 of the printable page
/Helvetica findfont
12 scalefont 
setfont
/Deck [ 0 1 51 {} for ] def
0 1 50 {
    /SwapLeft exch def
    52 SwapLeft sub realtime rand mul exch mod
    SwapLeft add /SwapRight exch def
    Deck SwapLeft get
    Deck SwapRight get
    Deck exch SwapLeft exch put
    Deck exch SwapRight exch put
} for
0 1 3 {
    dup /Col exch def
    0 1 12 {
        Col 13 mul add Deck exch get
        dup 13 mod
        XCursor YCursor moveto
        Cards exch get show
        5 0 rmoveto
        (of) show
        5 0 rmoveto
        13 div cvi
        Suits exch get show
        /YCursor YCursor 20 sub def
    } for
    /XCursor exch 1 add XColWidth mul XCursorMin add def
    /YCursor YCursorMax def
} for
showpage

C#’s Parallel.Invoke is [Insert Hyperbole Here]

Reading Time: 2 minutes

Freeside VTIt’s simple – we can’t make processors go any faster. But we can add more cores.
The OS can schedule different processes to different cores but to take full advantage of the potential we need to be writing applications that run on multiple cores.
Unsurprisingly there’s a lot of investment in making this easier for programmers – to the point that it’s now easier than falling off a log…

Parallel.Invoke(
    () =>
    {
        if (!GetSomethingFromTheDb(out something))
            something = MakeUpSomethingFromSomewhere();
    },
    () =>
    {
        complexResult = SomeComplexOperation();
    },
    () =>
    {
        someObjectGraph = ReadAndParseSomeFile(fileName);
    });
SomeReallyComplexThing(something, complexResult, someObjectGraph);

The individual actions will be run in parallel, or to be more precise may be run in parallel. The task scheduler takes care of whether or not to actually run them in parallel and the degree of parallelism.

When we arrive at SomeReallyComplexThing all the previous tasks will have been done.

That’s ace. It’s a lot easier than messing about with threads.

Even before the Parallel library was around it wasn’t actually difficult, but you needed some lateral thinking…

Task[] tasks = new Task[] {
    Task.Factory.StartNew(()=>
    {
        if (!GetSomethingFromTheDb(out something))
            something = MakeUpSomethingFromSomewhere();
        }),
    Task.Factory.StartNew(()=>
    {
        complexResult = SomeComplexOperation();
    }),
    Task.Factory.StartNew(()=>
    {
        someObjectGraph = ReadAndParseSomeFile(fileName);
    })
};
Task.WaitAll(tasks);
SomeReallyComplexThing(something, complexResult, someObjectGraph);

Ok, I admit, I’m simplifying. You still need to understand the basic problems of concurrent programming but the mechanics of writing code that can take advantage of parallelism are now trivial.

Ipswich Town Centre Blues

Reading Time: 5 minutes

Ipswich isn’t the wealthiest large town in the UK but it’s certainly not in line for any EU deprivation grants. It does pretty well, yet there seem to be rather lot of empty shops in the town centre. It’s something I’ve particularly noticed since moving back to Suffolk (from Hull) 3 years ago.

So on a recent visit I thought I’d snap every empty shop I saw. I wasn’t prepared for just how many there were though!

Sure, I know that the effects that The Internet, out of town superstores and the remaining fallout from the global banking crisis have had on all town centres but some are faring better than others. Ipswich seems particularly bad.

Read more

Shell Attacks!

Reading Time: < 1 minute

Toad!
…because toads are lovely really
I’ve been having some networking issues recently so I was watching the router logs on my main gateway. I was genuinely amazed by the number of attempts to hack my ssh server, every few seconds I saw another line telling me that the firewall had rejected another attempted hack.

So I started pondering what I could do to try to stop this. Perhaps I could write a little script that works out who the appropriate admin is and emails them? Yes, but I think that might cause me rather a lot of trouble. I can’t exactly send the logs to my ISP or to the Police – simply attempting to connect to a ssh server isn’t exactly strong evidence of nefarious intent.

So instead I thought I’d just publish them – each day’s log is uploaded to the downloads section as a text file.
If I get bored and fancy writing some php then I’ll start stuffing them into a database so we can run some basic analysis on them – produce graphs and run some analysis.

The “Within” Pattern in C#

Reading Time: 2 minutes

Ziggy StardustHere’s a little pattern that I use a lot. It happens quite often that I need to perform a set of tasks in C# that are different, but all need the same set up and tear down.

Now I could use two methods, e.g.

object someResource=PerformSetUp(someParameters);
try
{
    someTask(someResource);
    if(someCondition)
        reportSomeError();
    anotherTask();
    someResource.Conclude("It was aliens");
}
finally
{
    PerformTearDown(someResource);
}

That’s a totally reasonable way of doing it. There are a few disadvantages though, it splits up the allocation and release of resources which can lead to tracking problems. It’s also a pain if you’ve got several things that need to be set up and torn down. You either end up with a lot of local variables flying around all the time or you make an object to hold the resources you need.

So I tend to use a method to do both the set up and tear down and pass into it an Action.

So the above example would become;


WithinSetUpAndTearDown((someResource)=>
{
    someTask(someResource);
    if(someCondition)
        reportSomeError();
    anotherTask();
    someResource.Conclude("It was aliens");
});

WithinSetUpAndTearDown is defined thus;

void WithinSetUpAndTearDown(Action<object width="300" height="150"> action)
{
    Handle someHandle = new someHandle.Open();
    try
    {
        using(object someResource = someDisposableAllocation(someHandle))
        {
            action(semeResource);
        }
    }
    finally
    {
        someHandle.Close();
    }
}

It’s sort of a user-defined version of the using keyword.Of course it has other uses too, there’s one particular applications that all share a particularly complex set of error handling conditions. I’ve used this pattern there too.

There is one application where I use this pattern rather a lot. C#’s “lock” keyword is really handy if you’re operating in a multithreaded environment, its big drawback is that there’s no way of specifying a timeout. This is important for deadlock resolution – a deadlock always means there’s a bug somewhere but if your concurrent operations just sit there deadlocked it may cause some pretty serious problems that you may not be aware of for some time. So you want to know. Rather than use the “lock” keyword then you can use this…

public static void WithObjectLocked(object lockMe, int waitMsecs, Action action)
{
    if(null == lockMe)
        throw new ArgumentNullException("lockMe");
    if(0 >= waitMsecs)
        throw new ArgumentException("waitMsecs must be greater that zero");

    bool gotLock = Monitor.TryEnter(lockMe, waitMsecs);
    if (!gotLock)
        throw new TimeoutException("Timeout of [" + waitMsecs.ToString() + "] milliseconds exceeded");
    try
    {
        action();
    }
    finally
    {
        Monitor.Exit(lockMe);
    }
}

Its functionality is identical to that of “lock”, but it will throw a “TimeoutException” if the lock cannot be obtained within the specified time. This at least gives you a fighting chance of finding operations that are taking far too long or are deadlocked.

I Never Could Get the Hang of Thursdays

Reading Time: 2 minutes
Made on  a Friday
Made on a Friday

I’ve just reached a natural point where I should release some software to the customer, but I can’t. I can’t because it’s a Friday and I don’t release software on a Friday.

This might at first seem like an odd little foible or possibly the symptom of some form of obsessiveness disorder but actually there’s method behind my madness.

There’s something psychologically important about Friday and about the concept of a week. If there’s no reason to set a deadline otherwise then it tends to be “by the end of the week of…” and that means Friday afternoon.
It’s clean, it’s logical. The product will arrive on the Friday night so the customer’s team can come in fresh from the weekend and start working with it on the Monday morning.

The problem is that this means finishing the product on a Friday afternoon. Of course we are all professional, but with all the professionalism in the world concentration levels aren’t at their highest on Friday afternoon. What’s more it’s the time a lot of people try to knock off early and it’s certainly the day when fewest people are prepared to stay late.

To exacerbate things software development itself is famously difficult to predict but rarely do people overestimate time. There’s usually a lot of pressure as the deadline approaches and anything that reasonably can be dropped, de-scoped or downscaled is.

Releasing a piece of software – and doing so properly – is not a trivial task. There are a lot of hoops to jump through to make sure that everything is watertight. Mistakes can be costly too, even if they’re just in the admin. Record the version number of a component incorrectly and you might spend days trying to reproduce a bug in the wrong place.
Although it’s mostly admin, there’s a lot of stuff that can go wrong with releasing software and it all takes time to fix.

The net result of the above is that delay tends to knock on into delay and by Friday morning there’s usually so much to do it’s only just theoretically possible if everything goes according to plan.

It is, of course, inevitable that it won’t.

So 2 minutes before the end of Friday you kick out the door what you have on the bench. It’s sort of the right shape. You then go to the pub and celebrate prematurely, because on Monday morning the issues will start getting logged because you went and spoiled a great piece of work by rushing it at the last minute.

So I try to release software on a Tuesday. Logically it makes no difference, Monday is one business day after Friday just as Wednesday is one business day after Tuesday but a lot more people are willing to stay late on a Tuesday and there’s something about not having the weekend there that makes customers much more willing to accept delivery on Wednesday lunch time than Monday lunch time.

I’ve been doing this for about 10 years now, it works really well.

[Written on a Friday, published on a Monday]

The Tube That Rocks the Remote Working World

Reading Time: 2 minutes

Slash And Myles Rock!Moose and JRock of UK national (and international) radio station Team Rock Radio had a crazy idea. They were going to broadcast the breakfast show whilst on the Tube.
To be precise they were going to travel from their bunker in a secret location under an an anonymous office building in Central London to Westfield Shopping Centre in Stratford using the London Underground system.
They planned to travel during the songs and do the links live from the stations using the WiFi.

Today they’re doing it. In fact they’ve just left Liverpool Street Station. This might seem like just another silly radio stunt but actually there’a very serious point behind it for them, but moreover for a good proportion of our working population.

Until recently it’s been really difficult and expensive to arrange communications of the kind of quality that it would require to broadcast a live radio show.

So Moose and JRock wanted to prove – or perhaps really just test – the fact that this is no longer the case.

The programme isn’t over yet, but thus far it’s worked really rather well. There have been a few audio glitches, but nothing serious.

This proves to the Team Rock organisation that they can be much more responsive in covering events and festivals and indeed broadcast from anywhere in the world as long as they have a half reasonable Internet connection – which today isn’t a difficult thing to obtain.

The wider implications though are significant. I’ve been a remote worker for a little over 3 years so I know that technology has improved such that remote working (and indeed home working) is entirely possible for Software Developers like me. I also happen to work for the Computer Science Department at The University of Hull so they understand it too.

Not everyone happens to be a technologist or indeed work for a technical employer. What Moose and JRock have done is to demonstrate very publicly and very effectively to a much wider audience that the technology for remote working is now there.

I really hope this has the impact that it should.

PS: They’ve now added the show to their On-Demand section.

Using Rank In Case in SQL Server 2005, 2008, 2012, 2014 etc.

Reading Time: < 1 minute

Here’s a quick tip for a Friday.

I have a table that records the history of certain items. I wanted to get a list of the updates between two dates – that’s easy enough. The problem was that, for each item, I also wanted the last change before the start of the time period.

A standard way to get the latest update for each item in a history table is use a nested pair of queries, the inner one using the RANK function to provide an order. The outer query then selects all the records with a RANK of 1 as these are the latest (or the earliest, or maximum, or minimum, depending on the order specified).

e.g.

select * from (
    select ml.*,rank() over(partition by itemID order by [timeColumn] desc) rk
    from someHistoricTable ml ) T1
    where rk=1

I started wondering if I could make the inner query return the ranking for only part of its result set.

What I wanted was a resultset that gave me all the records after a given date and a ranked list of those prior to it. I wondered if I could us the RANK function within a CASE statement.
Yes, apparently you can…

select * from (
        select ml.*,
        case
            when [time] < @startTime
                then rank() over(partition by [itemID] order by [timeColumn] desc)
            else 1
            end rk
        from someHistoricTable ml
        where [timeColumn] < @stopTime ) T1
    where rk=1 order by [time] desc

The case / rank bit splits the time, it ranks records that were earlier than the @startTime whereas if they’re later it just returns ‘1’. The outer select then just takes all rows that have an ‘rk’ of 1, these being the records that are either during the time period or the highest ranked row before.