Something’s not quite right here…
Phototime: New Laptops
New laptops arrived today! Both Lenovo:
ThinkPad Edge for the Mrs. – small, light and comfortable performance for office/internet/Skype/etc.
Mine’s a W500 – not light, not small… but it’s pretty rugged and undeniably capable.
Two great laptops, if in completely different ways
Dodging the point on road safety
I’ve just got back from a camping trip in Derbyshire. It’s home to some fantastic roads including the well-known Cat and Fiddle – well known for having the highest recorded accident rate in the UK. I deliberately refrain however from the phrase “most dangerous road in the UK”; the Cat and Fiddle, like any road, can be driven quite safely. Characteristically, it is like many roads in the region, with a mixture of tight bends, other vehicles and other hazards, but also featuring straight sections and in some places, fair views of the road ahead.
The thing that struck me, not having been to the region for a while, was the almost scatter gun approach to road safety. The sheer mass of road now red-ringed to 50 MPH; the mass application of no-overtaking areas; ridiculously densely-placed warning signs; speed camera vans placed on straight sections, not to catch those flying dangerously into a corner, but those creeping up to 56 while accelerating onto a straight.
This all creates several problems based on the differing behavioural reactions of different drivers.
Take our first driver – the speed limit frustratee. He’ll quite happily slow down for a village, school, any other hazard. He’ll do the speed limit if he can see why it’s there. Problem is, he’s now been driving at 50MPH down a wide, open road with a good view. He gets frustrated with the pointlessness of this and so says, “sod it” and puts his foot down – probably going faster than if it had been a NSL (National Speed Limit). Now imagine the same behaviour applied to an excessively-long overtaking restriction.
The second is the speed limit drone. They understand that the 50MPH limit is “for their safety” and so assume that by doing the speed limit round every corner, they will be safe. They’ll still be doing 50MPH when they crash.
Finally, take the advanced driver. Doing the safe speed around corners means they end up with the speed limit drone right up behind them. As the straight opens up, there’s progress to be made… but an over-conservative speed limit prevents this. Reality is, if you removed the speed limit completely, these guys would be able to concentrate on purely doing the safe speed.
This all really points to the problem: a speed limit is an attempt to set a blanket safe speed for a section of road. Given that we are taught to accept this, the vast majority of drivers of course do not learn how to actually gauge the safe speed from the road itself. Due to this and the behaviours above, the accident rates do not fall. All the while we’ve got misguided campaigners (not police, not advanced drivers – generally people with little driving acumen and often themselves falling into the speed limit drone category) convincing the government that the best way to prevent all accidents is to lower the speed limit everywhere to 20MPH.
So where do you stop? If 50 isn’t working, should we make the entire of Derbyshire a 40? How about a 30? Why don’t we just stop driving entirely?
Alternatively, we could stop dodging the point – the point that driver education and driving standards are the single, fundamental problem.
…but of course, we couldn’t make the driving test harder, could we? I mean, it’s everyone’s human right to drive, right?
This is why I love .NET
So, I’m working with data stored in a CMS system (specifically Sitecore… ensue love/hate). I have the ability to select a particular item in a tree and access its immediate children. Unfortunately, I’m missing the full power of SQL to retreive and mangle.
Now in times gone by, I might write a function taking an item as a parameter that recursively checked the desired criterea on every item encountered. There’s just something… overcomplicated about this, however. One differing approach is separate out a function that pulls in all children of an item recursively:
MyItemLibrary.GetChildrenRecursively(item);
This just feels a little… wrong, conceptually. I mean, really, we’re wanting to perform an action objectively on the item itself. Enter .NET extension methods: despite not having access to the source of the Item class, I can still extend it with a related utility without going so far as creating a subclass:
class MyItemLibrary { public static item[] GetChildrenRecursive(this Item startItem) { /* code… */ }
var myItem = Database.GetItem(“path”);
var allChildren = myItem.GetChildrenRecursive();
…allowing me to call the function on the item – conceptually right!
I then still needed the ability to perform SQL-style querying and sorting on the resulting object list. Enter LINQ (combined with an anonymous type):
var podcasts = from item in Sitecore.Context.Item.Parent.GetChildrenRecursive().ToArray()
where item.Template.Name == “Podcast”
where item.Fields["Tags"].Value.Contains(TagName)
orderby Datetime.Parse(item.Fields["Date"].Value)
select new
{
Name = item.Fields["Subtitle"].Value,
Tags = SitecoreUtility.ParseTags(item.Fields["Tags"].Value, “/AboutUs/Podcasts/tag.aspx”),
Description = item.Fields["Description"].Value,
MediaFile = item.Fields["MediaFile"].Value
};
Now sure, you can argue about reusability – but the sheer small size of code required here moots that in practicality; the other truth being that reusability is not locked out – for example, I can if desired at a later date, easily convert that anonymous class to a regular class.
Programmer convenience is often understated. Ideologies aside, I’ve found .NET/C# to be a great tool for getting things done.
Phototime: BBQ Gammon
Super thick slices of gammon, rubbed down with black pepper and mustard, cooked over firey coals with wiskey-impegnated oak chippings.
No further verbosity necessary.
Phototime: Ring Sticker
I finally got round to putting on my ring sticker – almost three months after actually taking the car around the infamous track. In order to make way for the ring sticker, I had to remove a whole host of A63.0TDIQUATTROSLINE badgery, an affair which actually went more smoothly than expected.
The best tactic I found was to use dental floss to cut the glue/gum holding the lettering. Autoglym Intensive Tar Remover and a bit of careful finger motion then made fairly short work of the remaining glue. The choice of a stonkingly hot day I believe was certainly not of hindrance.
I’m still debating whether to keep the lettering or just leave the track outline – I think I’ll leave it until a letter (or umlaut) works its own way free and then dispose with the remaining…
Jump…
When parachutist or bungee-jumper stands on the edge, ready to throw themselves off, they rely on the preparation they have done up to that moment to determine their fate afterwards. What no amount of planning or preparation can do however, is take the edge off of that moment. Like it or not, you’re still throwing yourself off - leaving the safe, comfortable ground for something far more unknown.
It’s a similar feeling when you start a new business, especially after a period of safe, comfortable employment. With what at the time seemed to be an eternity of preparation standing behind you, it still feels like there’s nothing holding to back from plunging into the abyss. This is where the real work starts; this is where you learn to fly - and you know you have to, because it’s a long way down.
With all that said however, in this moment, this moment alone, there’s a certain purity. The complexity of the world fades ever so briefly away, leaving only one decision, one action, a binary choice…
Jump.


