A Tender Subject

Reading Time: 7 minutes

I’d barely got into the corridor before I found myself being bundled into the wall by a rotund sales guy. “What the fuck do you think you’re doing?” he barked in my face, “If you ever pull a stunt like that again I’ll making fucking sure we put you out of business. Consider this a warning.” he stuttered a little and I could see the fear in his eyes: he was not just angry, but terrified. “And I don’t give second warnings. Understand?” he eventually added and with that marched angrily away.

I’d got maybe 15 metres further before another salesperson came up beside me and sniped, “If that’s how you’re going to behave you can forget ever partnering with us.” before he too shuffled off.

What had I done to deserve such attention? Insulted their mothers? Murdered a puppy? No, just give a sales presentation.

One of the way the UK government keeps track of technology is through seminars, they take various forms but this was essentially a day-long event where vendors of a particular type of technology were invited to present their products to a bunch of interested parties within government.

Somehow – despite being a tiny little firm – we’d managed to blag our way onto the list. I’d been to these events before, as the “tech guy” that answers the difficult questions so I knew the format. What I hadn’t done before was actually sit through a whole day of them.

They were dismal. The scripts were poorly thought out, badly structured, omitted important details and contained much that was irrelevant. The presenters were worse. Monotonous at best, incoherent and rambling at worst. By the second or third presentation I was genuinely ashamed that this is supposedly the best of what my industry can offer.

By the second session after lunch half the audience were asleep and I was reasonably convinced that the other half were dead.

When we eventually took to the stage my opening words after introducing myself were “I’m sure you’ll be delighted to hear that this is the only Powerpoint slide I’m going to use.” I then talked for a few minutes about who we are and what the product was whilst my colleague set up a fully working system. We put it up on the projector, handed our various devices to the audience and spent the rest of our time role playing live scenarios that demonstrated the product features.

It was a bold move and quite a risk, there were some very senior civil servants in the room who could have taken umbrage, but they didn’t, they did the exact opposite. At the insistence of one of them our slot was extended to allow for an additional 5 minutes of questions. My colleague and I both ran out of business cards in seconds and took to writing our details on the backs of other peoples. From a sales point of view it could not have gone better for us.

That’s all I’d done. I’d hadn’t bad-mouthed the competition, said anything that was untrue or in any way behaved unprofessionally. We turned up, we told jokes and tried to be as engaging as we could whilst demonstrating a live system that could be set up in less than 5 minutes.

That is the kind of behaviour that the competitors needed to stop. For 30 years they’ve been telling government that software systems are big, complex and expensive. That they take years to develop, months to install and configure and that they require huge, expensive racks of equipment.

Then two guys turn up with a laptop and a bag of kit and prove that none of this is true.

The issue is more complex than one of straight deception, though. These organisations were formed at a time when these things were all true. The organisations themselves have grown to provide a heavyweight framework. They have little momentum and colossal inertia.

They also have huge problems with legacy code-bases. The requirements of government tend to evolve slowly, hence re-writes are rare. Instead old code lumbers on and on and velocity nosedives as technical debt increases [more on that in a minute] and new development techniques, tools, frameworks and languages accelerate the pace that can be achieved within the industry in general.

These factors have reciprocated a framework within government that has grown to expect and indeed facilitate it. The tendering process results in excessively detailed documents that emphasise the minutia and neglect the actual business requirement for the system. These are often produced by committees and are stitched together from requirements drawn from multiple sources – or in other words they’re actually just wish-lists and can at times can be incoherent.

This is a thoroughly unhealthy relationship, it’s not just wasteful, it’s actively counterproductive. It stifles technical innovation and guarantees mediocrity.

More than that though it damages the engineering quality of the products as developers rush to strap on extra features and to modify existing ones in order to meet the letter of the requirement where in reality the product was designed to solve the overall business need and does so perfectly adequately.

This is often a panic scenario too. In order to gain a higher score on the tender a business will commit to what is it at the absolute limit of what it can achieve – often a little more than. The result is the in order to meet the delivery, development have to cut every corner possible. Inevitably this piles on the technical debt.

As the development team crashes from tender to tender its velocity plummets, the business throws more developers at the problem and you end up where we are today. The products are bloated, resource hungry, hideous to configure, often still include archaic technologies that (now) require special environments and are generally impossible to demonstrate anywhere but a dedicated, static suite specifically for the purpose.

That is why 2 people turning up to a sales seminar with a laptop and a bunch of hand-held devices and doing a fully interactive live demonstration caused such a furore. Yes I do believe that everyone else there on that day was at least one of: incompetent, phoning it in or just plain burnt out. None of them however could have done a live demonstration even if they’d wanted to.
To the competitors watching it must have seemed like we’d taken the bar for a sales presentation, which was set barely higher than the crash-mat, and smashed it through the roof. There was no way they could compete.

The reality however is that we weren’t a real threat to them. If we wanted to win tenders then we had to tick boxes. We could undercut them only a handful of times before the same thing happened to us as happened to them 30 years ago. Thankfully we recognised that and stopped responding to additional tenders.

I have to admit that I don’t know what the answer is. As a business or an individual one can make purchasing decisions however we like. If we see something that doesn’t meet what we thought our requirements were, but if we thought about the problem in a different way is actually a far better solution, we can buy that and change the way we work.

Government is different, a democracy must always be accountable to the people. The government must be able to justify why it chose supplier X over supplier Y. A qualitative response is always going to be open to challenges. It is far more robust from a point of view of the accountability of government to take a quantitative approach: supplier X was able to meet more of the requirements than supplier Y. It is also more legally robust, many of the suppliers are large companies that are not afraid of litigation if they believe it might give them a competitive advantage.

One could perhaps say that this adds weight to the argument that the government is trying to do too much and that many of these key areas should be privatised, where a more effective purchasing strategy could be implemented. This however has its own problems: ultimately it’s still public money and all this is doing is to move the point of accountability higher up. The same end could be achieved by just increasing the threshold at which a tendering process is required.
I’m also not particularly keen to live in a country that has a private Police Force and I rather suspect I’m not alone.

The counter-argument is that all such systems should be developed in-house by the government itself. In an ideal world this would be the answer. Unfortunately the world isn’t ideal and the list of reasons why this is a terrible idea is really rather long.

However we spin the model and try to look at it a different way, it’s difficult to get away from the idea of a tendering system that’s essentially scored quantitatively. There have been schemes to try to improve the situation such as to get people from the software industry in ahead of the tenders being written, however their influence has to be carefully managed in case of any allegations of impropriety and they are inevitably associated with the very organisations that will be responding to the tender. Thus this is has not proved and effective means for improving the situation.

I rather dislike finishing an article without at least suggesting something that I think might improve the situation, but I have to admit that I’m struggling with this one.

—=== END ===—


I’ve had a number of comments since writing this article. I can split them largely into 3 categories.

The saddest is the number if people who’ve also reported being directly threatened by larger firms within the industry.

I hadn’t realised how much technical jargon I’d used. Basically “velocity” is the speed at which you can make changes to a product and “technical debt” is what happens when you keep making changes without the proper procedures:
eventually you end up with a big bird’s nest and it gets harder and harder to make changes and it all gets more and more out of control.

A few people within the industry have commented that I’ve made some generalisations and simplifications. This is true, it’s a trade-off between writing a fastidiously accurate article and writing one that makes the point sufficiently well but is engaging enough to appeal to a wider audience.


Tom Fosdick is a Software Architect specialising in Control Room systems for the Emergency Services. This article refers to an event that happened in a previous role.

Tanya And Tom Do Racing

Reading Time: 5 minutes

I have been known to point a camera at a thing – quite often that thing is a racing car. I do it as my own personal challenge but other people seem to like the results, which is one of the reasons behind the TanyaAndTomDoRacing Instagram account.

I do find however that I get asked two questions quite a lot and as Instagram isn’t really the place for a FAQ…

You Must Have Some Really Good Kit?

The direct answer is no, I don’t. In fact this is a pet peeve of mine, not just in photography but in many hobbies.

If you have a good eye, enough knowledge, skill and technique then any entry level major brand Digital SLR camera and many bridge cameras are perfectly capable of taking very good photos – in many cases professional quality photos.

The key about a Digital SLR camera is that it puts control of the optics and the sensor into the hands of the operator, allowing the photographer to make artistic decisions about how the light is captured.

This is one of my favourite (but not technically best) photos, taken at Goodwood Revival in 2015.

It was taken with a Nikon D3000 and a Nikkor AF-S 55-300 F4.5-5.6 D G VR DX lens: entry level kit. What makes the photo is the framing, the choice of subject, the angle to get the reflected sun, the 1/25 shutter speed and a big chunk of luck with the panning.

You can’t compensate for deficiencies in any of those things by throwing more money at it.

Yes, I would have liked a higher resolution sensor and in an ideal world I would probably have used a lower ISO value and larger aperture but I could easily pay 10 times as much for kit to get a photo that is only marginally better.

Digital SLRs are not supposed to be smart, they’re not about image processing and fancy modes to try to make something out of nothing, they’re all about controlling how the light falls on the sensor. There’s only so much that clever electronics and software can help and the best of that is often found not in SLRs – where it might actually degrade the photographic quality – but in compact cameras.

Here’s a case in point:

I like this photo, but it’s not one of my favourites. Taking the standard sharp foreground, blurred background photo is like shooting fish with a Digital SLR.

This photo wasn’t taken with a Digital SLR though, it was taken with a Sony DSC-HX50, a £200 compact camera.

It’s possibly my favourite ever camera, simply because of the amount of power it puts in a genuinely pocket sized piece of equipment.

It does have modes to put optical control in the hands of the user (as seen above), but what you can do is limited – mostly by the physical size of the device. To compensate for the fact that there simply isn’t room for better optics it’s stuffed full of electronics and software.

This shot, for instance, was taken hand-held at a beach cafe somewhere in Indonesia using all the electronic aides available (and needing them).

In an ideal world I would have had a Digital SLR mounted on a tripod and I could have taken a slightly better picture. In an ideal world the person in the picture would be a model who wouldn’t have moved.

The problem is that the person in the picture isn’t a model, she was one of the tour group and I couldn’t really ask her to hang about whilst I set a tripod up or stay still whilst I took the photo. The moment was there, I was able to capture it specifically because I had a compact camera with a night mode that I could select in a second.

The bottom line is this: you can take really good pictures with a sub-£100 camera. The problem is that the capabilities of that camera will be limited, which will limit where, when and the type of picture you can take.

If you spend a bit more, around the £200-£300 bracket you can get cameras that are far more capable and put a good amount of control in the hands of the photographer.

Above that you hit the wall of diminishing returns pretty hard. Between £100 and £200 there’s a huge jump in capability and quality. Between £200 and £300 less so. When you get above that then you can find yourself paying an awful lot of money for very little improvement and you have to ask yourself whether it’s really worth the money.

If you’re thinking of turning professional or if you spend every waking, non-working moment dreaming about photography then fine, maybe it is. For most of us it’s not.

But You Should Sell Your Photos / Turn Professional!

I’m flattered, sincerely and genuinely that some people think my photos are good enough to make money out of, but the reality is that they aren’t.

OK, some of them are and course if people want to pay me to use / print them then we can talk about that… the point is that it’s not worth me actively pursuing trying to sell them.

As I said above, taking the standard “sharp foreground, blurred background” racing car photo is shooting fish in a barrel with a Digital SLR – anyone with any understanding of the principles of photography can do it.

It used to be difficult because with (wet) film you had no idea how good the photo was until you developed it. You can’t do that at the track-side. That means you needed a lot of experience to know exactly what settings and techniques were required because you were shooting blind.

With a Digital SLR you can press the shutter and have the image on a HD tablet within a couple of seconds. You can closely analyse the picture, work out what needs changing and then go again with an improved set up within a few seconds.

At any Formula 1 Grand Prix there must be at least a thousand people doing pretty much that and a good portion of them will be producing shots as good as mine or better. There are only a handful of places you could sell the pictures to and they’re all looking for something that is not just technically good, but has something extra that makes it stand out.

Perhaps something like the first picture in this article, but with a little more sharpness on the helmet and without the smear in the bottom left caused by the head of some bloke who wandered into shot.

I have thousands of photos in and around race tracks and other motorsport events. I have only a handful of photos that I genuinely believe anyone would pay money for.

If you want some idea of the differences then look at the Instagram streams of the professionals:

James Moy @f1photographer
Lollipop Magazine
(Joshua Paul)
@lollipopmagazine (my favourite)
Peter J Fox @peterjfoxy
Sutton Images @suttonimages
Darren Heath @darrenheathphotographer
McLaren @mclaren
Ferrari @scuderiaferrari
Williams @williamsmartiniracing
Red Bull @redbullracing
Toro Rosso @officialtororosso
Force India @forceindiaf1
Renault @renaultsportf1
Sauber @sauberf1team
Haas @haasf1team
Mercedes @mercedesamgf1
Prema @prema_team
Racing Engineering @racingengineering
Russian Time @teamrussiantime
ART @artgp_official
DAMS @damsracing
Campos @camposracing
Trident @trident_team
Rapax @rapaxteam
Arden @ardenmotorsport

 

 

My Favourite Little Friend

Reading Time: 5 minutes
Lily Asleep in the garden

[originally written February 9th 2017]

You know before you step out the door. You’re going to the rescue centre, there will be something small and cute there and you will fall in love. You might tell yourself that you’re just going to look, but you’re not. You’re going there because you want to fall in love, you want to share your life.

You also know that one day it will end. The dog that jumps up to greet you after a hard day’s work that somehow makes it all better. The cat that sits and curls up on your lap and just purrs gently when everything seems lost. One day they will die. You know this, but when you’re stood in the rescue centre trying to work out a way of leaving without promising to take all of the animals you don’t accept it. You’re choosing a new life companion and in your head that companionship will last forever.

You know however as time passes that the day it must end is coming closer. When my cat Lily was about 14 I saw her laying motionless on my lawn. I found myself thinking that if she’d passed away I wouldn’t be so upset. 14 is a good age, she’d led a good life and right up until that day she’d been scampering round like a kitten. Yes, this was a good way to die, to find a sunny spot on the lawn on that warm spring day, to curl up and drift off into the big sleep just as she’d drifted off into any other sleep.

I crept closer to see if I could spot any sign of life. As my shadow fell over her I heard the faintest “mip” and she rearranged her paws. She was fine, just far more deeply asleep than usual.

I smiled and carried on walking, but that image stayed in my mind. If that’s how it happened, if one day I just found her curled up having just gone to sleep never to wake up, that would be OK.

Barring a miracle, that is not how it’s going to happen.

Looking back she wasn’t quite right this summer. We used to lose her in the summer, she  rarely came into the house. She’d be out prowling or sleeping either in the garden or in the nearby fields. She’d get sun-bleached, by late August she’d not be a black and white cat, more of a sort of brown stripy cat, not that we really had a cat you understand – she was nature’s child, wild and free.

This summer she spent a lot more time with us. We just put it down to old age and maybe not being as sprightly as she once was. As Autumn became winter however we noticed that she was losing weight fast. We tried a few different foods but none of them seemed to make a difference so we took her to the vet.

Initially all seemed fairly bright, there can be any number of reasons for older cats losing weight and many of them are treatable. As time progressed however there were more test results and we noticed more symptoms and the field of diagnosis narrowed. Sadly it was the benign things that were being eliminated. We’re now in a world where all probability points to her being terminally ill. We’re still not quite sure what the root cause is, but the weight of evidence points in that direction.

I hope that she isn’t in too much pain. Right now she doesn’t seem like she’s in too much pain so I still have that dream, that I walk out into the garden on a warm spring day to find her curled up in the sun, having shuffled off this mortal coil in the gentlest of sun and lightest of breeze.

The reality however is far more brutal. At some point she will be in pain. At some point the pain will be too much. At some point it will be better for my Lily, my dearest companion of the past 16 years if she were no longer here.

And I’m sat here now with tears streaming down my face as she walks all over the keyboard and rubs her cheek against mine.

At some point I will have to kill her.

I am terrified.


I wrote this post a few months ago and I didn’t publish it because at that time I thought it was – well – just too sad. It felt like I was writing her obituary long before she had died.

A few days ago Lily came to see me whilst I was asleep, she curled up and went to sleep next to me. For the first time I can remember when I woke she was still there. I dearly hoped that’s what I’d be able to tell you, that she’d died whilst peacefully asleep next to me. Sadly, as I predicted, that’s not how it was.

She had a brief spell where she seemed to recover a bit, but it soon became clear that it was temporary. She continued to become evermore frail. Over the past 2 weeks however it started to become noticeable that she wasn’t moving or even standing in the same way she used to. Her life seemed to consist of long periods of sitting on her favourite rug staring into space, going to the food bowl, going to the litter tray and coming to us for affection and comfort.

Reluctantly we concluded that by continuing to feed and care for her we were extending her life beyond its natural limit. As it was now clear that she was in pain we decided that to continue to care for her without there being a dramatic medical intervention was unethical.

We visited the vets last Friday and we were not able to come up with any medical solution that would have any reasonable prospect of giving her any further valuable life. We therefore took the decision to end her life in the most peaceful way possible.

We buried her in the garden on Saturday, in one of her favourite spots – almost exactly where the above photo was taken. Currently the spot is marked by a white lily plant. We say hello to her every time we go to work. She’s still with us, still part of our story, still part of who we are.

Rest in peace Lily, 17/04/2001 – 21/04/2017

[original artwork by Emma Green]

Never Work With Scientists or Engineers

Reading Time: 2 minutes

Forget never working with children or animals. Never work with Scientists or Engineers.

Picture the scene, dear reader; the air is being turned blue with the kind of language usually reserved for the rugby scrum. Things are being thrown.

A calming voice comes from a distant room enquiring what the problem might be. I respond using “language” that mounting the picture in the frame has not gone as well as I had anticipated, it’s not quite central. I may have used the word “disaster”. I can’t recall what the other words were but I seem to recall them being quite short and decidedly pointy.

“But you can fix it,” comes that calming voice again, “you can fix anything.” I take a deep breath, think for a bit and conclude that yes, I can fix it.

There then follows a few minutes of calm and concentration before once again the demons are unleashed, the air turns blue again and more everyday household objects find themselves travelling at unnatural speeds towards various hard surfaces.

“Problems?” enquires the calming voice.

“Yes, ” I reply. You will understand of course that my actual reply was somewhat longer than this but there are international treatise preventing me from disclosing the full transcript. I then continue to explain the cause of my frustration, “have you ever tried to cut 1/4 of a millimetre off the side of a piece of A4 card? It’s impossible!”

It was at that point it hit me, I had a steel ruler on top of a piece of card, both clamped to a cutting mat and I was using a razor blade to trim off a tiny amount to correct an error that only I was ever going to know was there. It was pointless, I should have just put the card in the frame and forgotten about the tiny mistake.

That 1/4mm level of passion, that level of attention to detail is entirely the sort of thing that’s required if you’re an engineer that is, say, responsible for ensuring that 999 (911 ,112)  calls get dealt with correctly (which I am). When mounting a picture however it’s more like an anti-skill, a trait that does more harm than good.

Intlerocked.Exhange and the Atomic Option

Reading Time: 4 minutes

Developers are now having to deal with concurrency issues far more than we ever have in the past. Our languages are evolving more and more features (like the Parrallel.* class in C#) that allow us to take advantage without too much pain.
These are great, but they’re not always the answer and they don’t negate the need to understand the fundamental issues of concurrent programming. This is in fact the very subject that this blog started with several years ago...

Today I’d like to talk about Interlocked.Exchange. Its purpose it to exchange two variables in an atomic way. It’s the atomic nature of the exchange that’s the important factor here, it means that nothing can catch the exchange in an incomplete state. It’s either completely one value or completely another value.

Thread Safe Exchange

The significance of this becomes evident when we consider the traditional method of exchanging two variables.

var spare = first;
first = second;
second = spare;

This is not thread safe. The problem is that a second thread could interleave into the first. Consider the following path of execution. Let’s assume the value of first is 5 and the value of second is 10. The table shows the values of the variables as two threads interleave.

Thread Code first second spare 1 spare 2
1 var spare = first; 05 10 05
1 first = second; 10 10 05
2 var spare = first; 10 10 05 10
1 second = spare; 10 05 05 10
2 first = second; 05 10 05 10
2 second = spare; 05 10 05 10

Oh dear… that didn’t work, did it?

If we’d used Interlocked.Exchange we wouldn’t have the problem, because the exchange is atomic no interleaving can take place, the first thread will finish then the second will take over.

Thread Safe Changes of Scope

When it gets really interesting though is the fact that Interlocked.Exchange returns the original value.

public static T Exchange(
    ref T location1,
    T value)
    where T : class

The beauty of this is that we can use this to change scope. There’s a wholly unsafe pattern that gets used in Dispose handlers all the time:


class Blah: IDisposable
{
    SomeDisposableType someObject;

    ...

    public void Dispose()
    {
        if(someObject != null)
        {
           someObject.Dispose();
           someObject = null;
        }
    }
}

It’s possible that two threads could interleave between the null check and someObject being assigned to null, resulting in someObject being disposed twice.

Alternatively…

public void Dispose()
{
    var myCopy = Interlocked.Exchange(ref someObject, null);
    if(myCopy != null)
    {
        myCopy.Dispose();
    }
}

What the Interlocked.Exchange does here is to set someObject to null in the object scope and return its (former) value to myCopy which is in the method scope.
If two threads call Dispose at exactly the same moment, then both of them will succeed in setting the value of someObject to null. In the case of the thread that calls Interlocked.Exchange first, it will return the original value of someObject to its myCopy and set someObject to null. When the second thread calls Interlocked.Exchange it will return the value that the first thread set someObject to, that being null. It will then proceed to set someObject to null again.
The effective is that someObject is set to null twice, but only one of the threads gets the original value of someObject, so only one will pass the null check and only one will call Dispose on someObject.

Note that this isn’t a good Dispose pattern fullstop however. Microsoft have written some guidelines.

This scope switching trick can be useful in other places too. Consider if you’re writing a log file of some description. Writing an ever-expanding log file causes problems, it’s good to have a cut-off and write a new one every so often. A common method is to write one file per day of the week.

public class LogWriter : IDsiposable
{
    StreamWriter writer;
    public string FilePath {get;set;}
    ...

    public void WriteLog(string s)
    {
        writer.WriteLine(s);
    }

    public void StartNewDaysLog()
    {
        var newWriter = new StreamWriter(FilePath + DateTime.Now.DayOfWeek.ToString() + ".log", false);
        var oldWriter = Interlocked.Exchange(ref writer, newWriter);
        if(null != oldWriter)
            oldWriter.Close();
    }
    ...
}

With this implementation multiple threads can safely call WriteLog continuously. When StartNewDaysLog is called a new StreamWriter is set up ready to go, then the two are switched in an atomic fashion. Nothing can catch this out half way through the switch – as far as anything calling WriteLog is concerned one entry was written to one file and the next to another: it’s seamless.
After the switch, StartNewDaysLog is left with the old StreamWriter which it then has to Close (which in turn calls Dispose).

Conclusion

Interlocked.Exchange is a surprisingly useful little tool. Its plain usage – to simply exchange a value in a thread safe way is useful, but where it really comes in handy is in its ability to replace a value and return the original one into a narrower (thread safe) scope. This is particularly handy if you need to move or consume something in a simple way that doesn’t imply graduating to a mechanism such as ReaderWriterLockSlim or SemaphoreSlim.

Callback Trace Listener

Reading Time: 2 minutes

lightSo you know about the Trace facility in System.Diagnostics, right? If not then you should because it’s really rather handy. It provides a set of static methods that you can call to write out trace information to any number of connected “Listeners” which you can define in code or in config.
The default trace listener writes to the Win32 OutputDebugString stream, you can view this in Visual Studio’s “Output” window or using a viewer such as Sysinternals DebugView.

Sure if you need more extensive logging and tracing then you should look to something like log4net, but if your requirements are simple then System.Diagnostics.Trace and System.Diagnostics.Debug are really handy.

Anyway, that’s not the point of this article.

Quite often I end up writing non-production apps – little gizmos for this or that – which could do with informing the user of what’s going on via some sort of rolling log on the UI.

So I wrote this tiny little class to help.

public class CallbackTraceListener : TraceListener
{
    public event Action<string> WriteToOutput;

    public override void Write(string message)
    {
        if (null != WriteToOutput)
            WriteToOutput(message);
    }

    public override void WriteLine(string message)
    {
        Write(message + Environment.NewLine);
    }
}

It’s a Trace Listener just like the one that writes to OutputDebugString. You need a little bit more code to make it work, in the initialisation of the your application you need to register an instance of it as a trace listener…

public MainWindow()
{
    var uiTracer = new CallbackTraceListener();
    uiTracer.WriteToOutput += UiTracer_WriteToOutput;
    uiTracer.Name = "UITraceListener";
    Trace.Listeners.Add(uiTracer);
    Trace.WriteLine("Debug window initialised");
    Trace.WriteLine("Ready...");
    InitializeComponent();
    ...
}

Now every time you use any of the Trace methods that write output, the UiTracer_WriteToOutput callback will be called with the string that’s written. You can add the strings to a ListBox, or put them through any other kind of processing you want.
It’s a really simple and useful way to subscribe to up your own Debug/Trace stream.

Let’s Go to the Winchester…

Reading Time: 4 minutes

Don't Vote Leave...It hit me about 4pm today that although I’ve done a lot of myth debunking on social media and directed people to well supported articles, I haven’t actually expressed my opinion on the EU Referendum.

It was inevitable.

In the UK we’ve had something like 8 years of economic stagnation. Whenever something like that happens there are certain things that history tells us will follow. People will lose faith in the politicians of the day and start looking for answers elsewhere. New movements will spring up saying that they have the answers. The things they say are always the same, we need to break free of regulation, bureaucracy and red tape, we need to empower the individual, the problems are caused by some external entity (usually immigrants) and most of all we need to take our country back and make it great again.

Right now that’s Farage, Trump, Le Penne, Marusik, etc.

These things are not the answers because the sad, soul crushing reality is that there are no answers right now.

Our problems are not caused by our membership of the EU, Boris Johnson said as much in 2013, I’m paraphrasing but basically “the only thing leaving the EU would achieve is to make Britain face up to the fact that its problems are not caused by the EU.”

Our problems are caused by a combination of the poor performance of the global economy and our own mistakes and inadequacies. We have consistently failed to invest in public services and infrastructure. We have failed to properly regulate the financial sector. Time and time again we have put short term gains before the necessary long term strategy. These things and others are the cause of our current malaise, not our EU membership.

I can’t believe it, but I basically agree with what Boris said in 2013 (I disagree on many of the details, BTW).

Leaving the EU will not bring us any significant gain, even in the areas that the Leave campaign are targeting.

If we stay in the Free Trade Area (like Norway and Switzerland) we will have to accept almost all of the EU’s rules, including the free movement of people.
At the moment we’re one of the big 3, with France and Germany we’re the most influential countries in Europe. We’d lose that so we’d effectively lose sovereignty – because at the moment we have some control.

It would also make democracy worse as at the moment we all have a voice through the UK government and through our MEPs. We’d lose that.

I’m sure I needn’t point out that the proposed points system on immigration is highly unlikely to be acceptable to the EU if we remain in the Free Trade Area.

So we’re talking about a substantial divorce from Brussels, that’s the only way we can get any freedom of movement on immigration. Sovereignty and democracy are more complex arguments but neither would be a cavalcade of success. They’re both pretty minor gains if you analyse them in depth (NATO, WTO, IMF, UN, House of Lords, FPTP etc).

The problem with this is that even the Leave campaign recognise that this would hit our economy hard. Unemployment would rise, the welfare bill would rise and the economy would slow down long term. The slower the economy the less money there is flowing around the less the government gets in tax, the less we can afford to pay out in welfare and services. Even a tiny slowing would eclipse the EU membership fee from the government’s budget so what we’re facing here is not investment in services like the NHS, but even more and ever more severe cuts at a time when we really, really don’t need that because half our problems are caused by our failure to invest in the past.

The numbers can only work if we remain in the Free Trade Area which gains us nothing but a tiny bit of pride. It’s pointless.

There’s no quick fix for the situation we’re in, it’s going to be a long hard slog but there will be an upturn. When there is there’ll be more money flowing in the economy so the government will get more in tax and we can afford to put right some of the mistakes of the past.

If we stay we can hold our heads high, we’ll be at the top table of the EU, the largest market in the world, a major player on the world stage. If we leave we seriously risk becoming an ever more irrelevant and isolated sad little island.

I am proud to be from Suffolk, proud to be English, proud to be British. I care about this country and I care about its place in the world, so I will be voting to remain a member of the European Union.

 

[You will appreciate this is rather a hasty hack of an article, I haven’t really had time to properly reference it and I’ve glossed over a lot of detail that I would have included if I had longer]

I Was Growled at by a Car Lion

Reading Time: 4 minutes
Samson Car Lion
Samson the Car Lion

Meet Samson, he’s a Car Lion. His job is protect the car he’s in against any unwanted attention. Currently he lives on the dash of our hauling, ferrying and carrying car – a Honda Jazz (aka Fit) called Delilah.

Samson is a very happy Car Lion, Delilah is very spacious inside, so he has a large territory. The Jazz/Fit also has a considerable amount of glass in the cabin and the cab-forward design means that he has a large and very prominent area to prowl and make sure that all is in order.
He also likes window stickers and we keep him well supplied with them.

Samson's Favourite Snack
Samson’s Favourite Snack

Now let me introduce you to another Car Lion with a less fortunate story. You see it came to pass that we needed to buy a second car. We didn’t really know what we needed or how long we’d need it for so we played it safe and bought a Ford Fiesta. We called the car “Rory” because he didn’t need a name, he was only “tempoRory” [sic].

It may surprise you to learn that Ford Fiestas are often supplied without a Car Lion to protect them. So we went to Africa Alive and came back with this gorgeous little fellow. It was clear that this Car Lion was far too big to live on Rory’s dash though, so we came to an arrangement that he would live on the back seat.

Rory's Car Lion
Rory’s Car Lion

He liked to sleep a lot when he wasn’t on duty so he liked it there – it was warm and soft. Being somewhat larger than Samson he wasn’t too worried about being on higher ground because he could easily jump up and growl at any potential miscreant. It’s true that Rory wasn’t as roomy as Delilah is, but it had some additional creature comforts such climate control and more importantly an MP3 player – because Car Lions have got to have their choonz.

I have to admit that we didn’t really think about the Car Lion in Rory. He was there, doing his job and he seemed to be happy enough. It didn’t occur to me that we might be neglecting him – we had after all given Rory a name and we weren’t intending to keep Rory long. The poor Car Lion didn’t even have a name.

It was when we sold Rory that it finally dawned on me. As I took him from the back seat the full horror hit me – the back seat. The car we replaced Rory with is a much more permanent affair, she’s called Mina and, well, the problem is rather obvious.

Mina
Mina

So there were two things I needed to make up to our sadly anonymous Car Lion. The first was easy for me – although Mina is very snug she’s a convertible which means that she makes an excellent home for a Car Lion. He can stay safe and warm when he needs to or go out and prowl as far as he likes. Being in the front seat however there was a problem – the car only has two seatbelts and he’s too big to have roaming around when we’re both in the car. So I made him a little seatbelt of his own.

Car Lion All Strapped In
Car Lion All Strapped In

The second problem is more difficult – the obvious name for a Car Lion that protects a car called Mina is Jonathan, but Mina wasn’t his first car so I think calling him Jonathan is unfair, we need to respect the very good work he did protecting Rory. So what do we call him?


It was somewhere in the region of 23 minutes before someone suggested Liony McLionface, which was rather longer than I expected. Other suggestions so far include:

  • Cecil (but I’d have to sew a bullet-hole through him somehow)
  • Cedric
  • Clarence (how rude!)
  • Denn (long story)
  • Don / Vito, as in Don Car Lione (badoom-tish!)
  • Kenneth
  • Kieran (another long story)
  • Leo
  • Lionel
  • Liono
  • McGrath
  • Numair  (Arabic – “panther”)
  • Simba
  • Roan Miry
  • Vlad

In the end we decided on a name, so meet Vito Car-Lione… He’d like to be your friend, and that’s an offer you can’t refuse.
Vito Car-Lione

Too Much Information!

Reading Time: 5 minutes

Broken Seat ClampWe, the cycling advocates, want more people to cycle. We dedicate our time to producing useful material for new cyclists and people who are thinking of taking up cycling. Are we barking up the wrong tree though?

Articles on how to get the right bike, what clothes to wear, how to pick the right helmet, how to ride in traffic, how to ride in the countryside, what tools to take, how to maintain a bicycle, what the best sub-miniature lightweight pump for mid-distance touring rides is…

It’s all meant well. It’s all meant to try to help people. If I put myself in the position of someone thinking of taking up cycling though I see something different. What I see is a lot of articles telling me how complicated cycling is. I need to make sure I have the right bike, the right clothing, the right helmet, the right tools. I need to remember how to ride in traffic, how to ride at a roundabout, when to take the lane and when not.

I recently cycled to an event where I met a lot of new people. We were all waiting around, talking about this and that and I started to become aware that there were a lot of people listening to me and I was being asked a lot of questions about how I came to cycle there.

No, I haven’t changed my clothes – I cycled here in this pair of smart trousers and shirt. No, I don’t have cycling shorts on underneath that would be really uncomfortable.

No they’re not special cycling trousers or a special cycling shirt. They’re just good quality, comfortable clothes.

No, there aren’t any showers and I don’t need a shower because I cycled here at a sensible pace. It wasn’t a workout.

About 37 years.

Actually I didn’t wear a helmet today. Yes they do help in certain types of crash but they’re not some kind of magic bullet that will save you if you’re run over by a train. They do reduce the risk, yes. Sometimes I do wear a helmet, I’m not quite sure how I decide when to and when not to.

No actually, most helmets have vents in them, vents large enough that you can lock the helmet to the bike to the bike rack.

I’m wearing a blue and white spotty shirt. That’s not a naturally occurring phenomenon in most environments.

It’s locked to the bike rack at the front of the building. No, it’s not an expensive bike. Yes it is actually covered by my house insurance.

It didn’t look like rain so I didn’t bring a coat. It’s not a freezing cold day so if it rains on the way home it’s no biggie. I’ll just change when I get there.

No, a couple of miles isn’t far.

No, it’s a couple of miles. That really isn’t far enough to cause any kind of problem that would need that sort of cream.

No I’m not super-fit.

No, I actually avoided that and took the cycle path that goes across the docks. I have cycled round there before though and it’s not as scary as you might think. Remember you’re higher up on a bike so you can generally see better than cars can.

No, actually most drivers are really good. There are always a few idiots and yes they’re far scarier when you’re on a bike. No actually, I’ve not had a serious crash on the road in all the 37 years I’ve been cycling.

No, I don’t have a spare tube or a puncture repair kit. I’m in town, there are cycle shops and even if there weren’t it’s a couple of miles. I can walk. Punctures are uncommon anyway, modern city [puncture resistant] tyres are pretty good at stopping them.

If I’m right and this was a representative sample of the public then we have a bit of an issue. The message that we want to get across is that cycling is fun, practical, cheap, easy, safe and something that anyone can do.

The message that we seem to be getting across is that it’s expensive, complicated, dangerous and requires a Lycra Licence.

So what can we do about it? I don’t think we should start un-publishing the articles that are out there – many of them are really good and contain a lot of useful information. I think the problem stems from the fact that most of us cycling advocates are sports and leisure cyclists. We invest time and money into cycling because it’s a hobby. We want to share that with other people and that’s great, but we’re bringing the wrong character. We’re bringing the person that loves to cycle 25 miles through the rolling hills to that great little café by the brook that does the proper tea and the millionaire shortbread with that really thick caramel layer.

It’s an intoxicating image, but distances like 25 miles are going to put the willies right up a potential new cyclist. The idea of being 25 miles from home with a machine they don’t understand and can’t maintain is pretty scary too. Group rides are terrifying because they’re afraid they’ll hold everyone up and Lycra – which many seem to believe is mandatory – requires way more (body) self confidence than most people have.

Yes we’re selling the dream, but it’s too big, too far away for most people to grasp. They will get there, if they want to get there, but we need to start smaller.

For instance, many of us aren’t just leisure or sports riders. We also use a bike to pop to shops or to commute to work. We don’t do that in Lycra riding a Santa Cruz Nomad. OK, so most of us don’t use a battered 2nd hand beater bike either, but we could do. We need to try to get across the the joy of just being able to grab the bike and go – the freedom that comes with not being strapped into a little metal stress box, even on short journeys. We need to place cycling as a part of everyday life, something that normal people can easily do and as a cheap, effective and safe way of enriching your existence.

For want of a better way of putting it, we need to humanise cycling. Make it normal, accessible, everyday. We need to place them in the saddle.

We need to talk about things like how social cycling is – and I don’t mean meeting other cyclists because the idea of a cafe full of people in cycle gear chatting about the latest carbon fibre seat clamp scares the hell out of most new cyclists. I mean things like my neighbour, the keen gardener who always waves and says “Hi” when I pass.

Cycling is about connecting with the environment, being part of life.

Climate control, cruise control, stereo, sat nav, cooped up in a little sound proof reinforced cage. That’s about isolating you from the environment, from the journey, from life. Driving is the nearest thing you can get to posting yourself somewhere, all wrapped up nicely in a neat package to be delivered. Sometimes that’s just how it has to be but when it doesn’t we have the opportunity to be part of something so much more fulfilling.

Out of bread? Just grab the bike and go, past the flowers in Mary’s garden that always smell so nice at this time of year, the fields we can see from the top of the hill that stretch for miles and miles all different colours, the little cottage that we’d definitely buy if we had the money and then play the game of can I make it down into the village without having to peddle again?
Walk into the village shop where Carol lets you know that they’ve just got in some of that bread you really like… Go past that cafe, it smells good so just turn round, lock the bike up outside and pop in for tea and a cake because… because it’s Tuesday!

You don’t need to ride 100 miles, you don’t need a £4000 bike, bib-shorts and a comprehensive track toolkit to do that, to be that person, to be that engaged with life.

You just need a bike.

That is the message we need to get across.

Connectorum Reseatorum

Reading Time: < 1 minute

Compact!
Compact!
Last time I talked about De Morgan’s law which I learnt in electronics but still use in computer science.

Today I want to talk about a revered piece of arcane wisdom, a ritual handed down from electronics master to apprentice according to the strictest laws of tradition. It’s called “Connectorum Reseatorum” and I just used it to raise my compact camera back from the dead.

What they don’t want you to know is that you don’t actually need any complex electronics expertise to perform the ritual. All you do is take the case off and then one-by-one take each connector apart, clean the contacts (surgical spirit / rubbing alcohol works quite well) and then put the connector back together again.

It’s surprising how many electronics faults are just down to a bad connection and can be fixed simply by cleaning contacts and removing dirt.