New Band

After a good few years playing with Hydra, I have started a new band. Four are similar to Hydra in the material we play, but we’re a four-piece (guitar, bass, drums and vocals) which makes my job as guitarist a bit more tricky.

Anyway, we have a very small, low-key gig planned for late April – mainly so we can try out some of our more eclectic material on a real audience. Hopefully it will go down as well with them as it has done with the band members so far. Let’s see, shall we?

4 in rehearsals

Mars Edit – Blogging tool

This post is brought to you by the pretty nifty Mars Edit by Red Sweater.

I’ve been looking for an OSX blogging client, and over the Christmas period I discovered Mars Edit. It’s pretty similar to Windows Live Writer in a lot of ways – it allows you to write, modify and remove posts from your blog. The interface, as you’d pretty much expect from a Mac app, is intuitive and gives you just about everything you need for basic blogging. There’s even a 30 day free trial (which I’m using now, just until I get around to buying a licence on Monday.

If you’re in the market for a Mac blogging tool, I’d recommend checking this out.

20110412-111312.jpg

Marshaling – How I got involved (Part 2)

I left you last time having completed my morning at Donington, looking around the circuit and behind the scenes. The afternoon was where my marshaling career really began – out “on the bank”.

I’d been allocated a position on post 12, on the outside of the Craner Curves. To get to the post, I had to drive around the service road that runs around the circuit. When I eventually found where post 12 was located (after a lengthy detour, almost all the way round to McLeans) I parked up and went to meet my colleagues for the afternoon. I was on post with two more experienced marshals, and another of the trainees. (This is where it all gets a bit embarrassing – I’ve met the others several times since that first day, but my memory for names has completely failed me. When I remember them I shall come back and redress this injustice, but until then please bear with me.)

The first thing that happened in the afternoon was an on-post briefing covering safety and general behaviour while on post. Essentially this boils down to the following rules.

  1. Always keep an eye on oncoming traffic on track. This may seem like a very trivial thing to say, but when you are standing trackside you absolutely have to know what is coming toward you. Marshal posts are positioned according to where they are most likely to be needed and often this is where the cars are most likely to lose grip and spear off the track. The last thing you want to happen is to get hit by an out of control vehicle because you weren’t watching what was going on.
  2. When there are cars on track, don’t sit or kneel down. Again, you never know when you might have to run.
  3. When there are cars on track, don’t eat or drink. This is an extension of the first two rules. Keep your focus where it needs to be.

So, with the basics covered we were ready for an afternoon of racing. Although I love watching the racing, I’m not going to bore you with a rundown of what was out on track when. Instead I’ll just tell you that after a couple of hours of various qualification sessions, the heavens opened. When I say that the heavens opened, it really doesn’t do justice to the amount of rain that fell. Racing was suspended for the duration of the rain storm because the track was simply unable to clear enough water for safe racing.

This brings me onto a very important lesson that I learned that afternoon – appropriate clothing. Obviously marshals are famed for (in most instances) wearing orange overalls so they stand out from the background. Just as important as high-vis clothing is a really good set of waterproofs, good quality waterproof boots and a hat. I was fortunate that I was reasonably well-equipped in the hat and waterproof jacket/trousers stakes, but my boots just weren’t up to the job. Lesson : buy some decent boots.

I’m afraid to say that that pretty much wraps up my first afternoon on the bank. When the rain stopped, the superkarts came out for a few laps, until it was discovered that the amount of water falling from the sky had caused some subsidence along side the track (actually, a part of the newly built tunnel had collapsed*) and the decision was taken to halt activities for the day.

Was I disappointed to have my first day cut short? You bet. Did I regret having driven the hundred or so miles to stand for three hours in the rain? Not even slightly. You see, the thing about marshals is that we are a very friendly bunch. In adverse conditions we all make the effort to keep each others spirits up. On this occasion the opportunities for entertainment were a little unusual. If you were watching the Eurosport coverage of the day you may have seen four mad people racing rubber ducks down the river that was the hill at Craner Curves. That was us. I don’t for a second recommend using a racing circuit as a playground, but in this instance there were not going to be any vehicles out for the foreseeable future and it was better than standing around looking glum.

So, that was the first day over with. In the next part, I’ll talk about the benefits of joining the BMMC, what you can expect to pay to equip yourself as a marshal, and generally flesh out the details of how you take the next steps.

* I swear the following radio transmission about the subsidence was real. From one of the posts near the affected area : “Race Control, this is post xx. A hole in the ground has appeared trackside – we’re looking into it!”

20110409-083923.jpg

Marshaling – How I got involved

After reading Mark’s blog post on RupturedDuck on how he got started in motor racing, I got to thinking about how I got my start. Now I freely admit that I’m never going to be a racer – I just don’t have what it takes to drive at speed through the twisty-turnies. I don’t have the skill or the money, but I still love motor sport and still wanted to get involved.

If you’re like me, and don’t have the reflexes of an adrenaline-pumped cat, what can you do the get involved? My solution was to become a marshal. You know, those guys and girls in orange you see dotted around the perimeter of every race track. Being a marshal is a fantastic way to get involved. You get close to the action with some of the best views in the sport, and you get to be a part of the number one reason why racing is as safe as it is today.

So how did I get involved? Simple really. I looked at the British Motorsport Marshals Club website and clicked on the “Try a day as a marshal” link on the homepage. After filling in the very simple form, I was contacted by one of the regional competitions secretaries to offer me a choice of dates and venues for my taster day. Luckily for me, one of the choices jumped straight off the page at me – Suplerleague Formula at Donington Park on August 1st 2009. I plumped for that, and settled in for the wait until the day rolled around. In the mean time I had a few bits and pieces to arrange – a set of waterproofs, a good set of boots and something to hold my packed lunch. Ideally I would have taken a little more time and got some really good waterproof boots, especially given the torrential downpour that came to Donington on August 1st, but I wasn’t to know that.

Eventually August 1st rolled around. I’d been told to meet Chris, the Midland region competition secretary, in the Grand Prix Collection car park at 7.30 on the Saturday morning. As I arrived, it was easy to see where I should be headed – straight towards the small clump of people talking to the guys in orange. I was a little bit apprehensive about what the day was going to hold, but I was instantly put at my ease by Chris and his fellow taster day volunteers Jayne, Mary and Mike. We spent a few minutes chatting about what we were going to be doing during the day while we waited for the other new marshals to arrive.

Once the whole group was assembled we moved from the Collection car park and into the paddock to park up, and then over to the Craner Suites for marshals sign-on. On a normal marshaling day, sign-on is the first opportunity you have to catch up with old friends, have a cuppa (normally, anyway), and talk about the other meetings you’ve done sice you last saw each other. The firs sign-on is a little different, though. There were about 50 or so new faces all waiting to sign on for the day’s activities, having their own conversations and generally just getting on with things. The 12 new guys obviously didn’t know anyone, but that didn’t matter. We were all greeted like old friends and shown what we needed to do. It took just a few minutes to sign on, and then it was back outside for the marshals’ briefing. Again, this was a low-key, relaxed affair where the cheif marshal for the event explained which flag rules were in use for the day (don’t be put off, there are really only 2 sets of rules for flags, one for “normal” meetings and another for FIA meetings), explained that a safety car was available, and a few little bits of general housekeeping.

The rest of the morning was taken up by a walk around the facilities at the circuit – a visit to race control, a walk round the pits and paddock, and a couple of calls into marshals posts to get a feel for what was to come in the afternoon. Then off we went onto one of the suites in the paddock for some more explanations; the role of marshals, the clothing and other equipment that we’d need, the ins-and-outs of joining the club, etc. Each of the four established marshals I mentioned earlier were incredibly helpful and supportive, and answered every question with grace and humour (where appropriate).

That was it for the morning. In the afternoon, we were taken out to post ready to get hands-on.

In the next instalment, I’ll talk more about my first afternoon on the bank, and then talk about membership of the BMMC.

20110409-083958.jpg

Audio and image support – Gotcha!

I’m currently working on a WPF application to extend a Silverlight control to support the capture of audio and webcam still images.   All seems to be going pretty well using a Logitech QuickCam Communicate STX as the capture device, using Avicap32.dll to handle images and NAudio for the audio.

Or so I thought.  When I deployed the application to my second dev environment, I kept getting the error “NoDriver calling waveInOpen”.  I spent a long while researching what the problem was, and kept coming up with the answer “Everyone says there is no audio driver installed, but I know it is there because I built the machine myself.”

That’s when it hit me.  The light bulb moment.  The moment when one tiny detail that was staring me in the face suddenly made itself apparent.  I was using the second machine in an MSTSC session from my main dev box, and had opted to bring audio across to the main box, too.  A quick setting change in the client configuration for MSTSC and all was well again.  I thought I’d better blog it to stop anyone else beating their head against a wall for an hour.

WCF Restful interface

For one of the projects I am working on, I needed to be able to self-host a WCF service. That in itself is a fairly simple task. It was, however, complicated by the need to allow a SilverLight 3 application on another domain access to the service. I kept getting errors relating to cross-domain permissions.

A little search on Google led me to the solution (adding the file crossdomain.xml to the root of the hosting site) but it was not the full solution. Self hosted services don’t have a site, so they don’t have a root path since there is no site.

The answer was to implement a restful interface on the service. The original posts that told me what I needed top do are here and here.

Essentially, I had to set up a new interface to allow restful communications. A stripped-down example is as follows.

using System.ServiceModel;
using System.ServiceModel.Web;
namespace TestPOCService
{
[ServiceContract]
public interface IRestfulData
{
[OperationContract, WebGet(UriTemplate = "/clientaccesspolicy.xml")]
Stream GetSilverlightPolicy();
[OperationContract, WebGet(UriTemplate = "/crossdomain.xml")]
Stream GetFlashPolicy();
}
}

The implementation included the main service interface I had defined for other purposes (and which won’t be included here) as well as the implementation of the IRestfulData interface, as follows.

using System.IO;
using System.Linq;
using System.ServiceModel.Activation;
using System.ServiceModel.Web;
using System.Text;
using System.Xml.Linq;
namespace TestPOCService
{
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Service1 : IService1, IRestfulData
{
static string CONTENT_TYPE_HTML = "text/html";
static string CONTENT_TYPE_XML = "application/xml";
static string CONTENT_TYPE_APPLICATION = "application/octet-stream";
// IService1 implementation
public Stream GetSilverlightPolicy()
{
WebOperationContext.Current.OutgoingResponse.ContentType = CONTENT_TYPE_XML;
return new MemoryStream(File.ReadAllBytes("Content/crossdomain.xml"));
}
public Stream GetFlashPolicy()
{
WebOperationContext.Current.OutgoingResponse.ContentType = CONTENT_TYPE_XML;
return new MemoryStream(File.ReadAllBytes("Content/clientaccesspolicy.xml"));
}
}
}
<div>
As you can see, This relies on the files themselves being hosted in a folder called “Content” beneath the service’s host file structure.

20110409-060908.jpg

Renault and the Future of Formula 1

As some of you already know, I’ve been volunteering as a motor sport marshal for a few months now, and so I wanted to share my thoughts about today’s announcement that Flavio Briatore and Pat Symmonds of Renault’s Formula One team have decided to stand down.  This follows allegations of race fixing during the 2008 season, specifically in the team allegedly asking Nelson Piquet Jr to deliberately crash in order to bring out a safety car. A fuller picture of the story can be found here.

From my point of view, I find the idea of deliberately causing an accident to be completely abhorrent.  I am one of a group of people who regularly turn up at motorsports events and put our safety at risk to ensure that the events run as safely as possible, for us, the drivers, other officials and the public.  We do it unpaid, and often unthanked by the teams and drivers.  We do it because we love motor sports, and want to ensure that the spectacle may continue to be enjoyed by the public, and everyone involved.

In the short space of time in which I have been a marshal I have made some very good friends within the community.  I cannot begin to express my displeasure at the thought that someone may go out of their way to cause an accident, let alone one in which innocent people’s lives are at stake.  If I was involved at a race meeting where the life of one of my friends, or that of an innocent bystander was put in jeopardy by the irresponsibility of a team or a driver purely for the sake of a larger slice of the prize money I would be incredibly angry.

Although I will miss TV coverage of Flav being the eccentric character that he undoubtedly is, I will not miss his presence if it actually turns out that the allegations are true.

The other consideration is how much punishment Renault themselves should be given.  If they get off lightly since the departure of the two remaining team members at the centre of the allegations, then surely that will leave the door open for similar acts of stupidity from other teams.  It should not be enough to be able to say “Yes, we were wrong, but the people concerned have now left”.  The team as a whole should bear the responsibility for their actions.  I realise this will probably put the jobs of many people in jeopardy, but rather that than compromised safety.  The bulk of the Renault team will have enough contacts and respect within the Formula One paddock to be able to find work at other teams – maybe one of the newly signed-up teams.

The bottom line here is that safety is vital, and the allegations are that this fundamental fact has been ignored.  Formula One will more-than-likely survive the scandal, but it should not pass unmarked.

New comment added to a stored procedure

Today, I had occasion to add a comment to a stored procedure. Can you tell exactly how happy I was about it?

--
-- IMPORTANT!!!!!
--
-- This procedure has been replaced with **name witheld**
--
-- Any modifications made to this procedure will not take effect in the live
-- system.  You'd be wasting your time, just like I did today and let me tell
-- you, it's really, really annoying to put the effort into changing a
-- deprecated procedure becuase nobody though to put a comment in, or better still
-- to remove the procedure altogether.
-- Of course, the logical thing to do would be to make the changes to the
-- existing code rather rather than complicate matters with a new procedure,
-- but then that would be too sensible, wouldn't it?
--

Who says .Net can’t be fun?

or at least, mildly amusing on a dull afternoon…

“The CLR has been unable to transition from COM context 0x21b378 to COM context 0x21b4e8 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.”