The Peloton Diaries

“That,” I thought, looking at the TV advert, “is a cracking business idea”. Market a swanky bike at the cash rich, time poor urbanites. I bet every subscriber has an Apple watch, suckers!

Peloton? Pah!

Scotch Mist

It will not surprise you to learn, then, that I absolutely have not bought a Peloton bike and I definitely do not have a Peloton subscription. I would also like to point out that the parrot is not dead, it’s resting. Beautiful plumage, the Norwegian Blue.

What on Earth possessed me to get on board this particular train then?

When I was a kid I cycled everywhere. Fitness just happened whilst I was seeing how many of my mates I could jump over. But as I got older my life got bigger and the all beer and pizza diet started to take its toll.

To cut a long story short I joined the gym at the university where I worked – and I loved it. But, it was right on campus and it was incredibly good value.

Then I moved to back the country and the nearest gym was not only a 20 minute drive away, I caught the manager sucking a lemon before he told me the price. It wasn’t very good, either. The economics, both of money and time, switched. It became far more effective to have a home gym.

The problem is that home CV equipment just isn’t made for people like me. I’m a serial killer of exercise bikes, cross trainers and especially treadmills. In order to keep the price down, they have to make economies. I understand that. Actually, if it gets people who would otherwise do nothing up and active, I support that.

Sadly, as you move up the price band, they add features instead of making the machines stronger and more durable – and that really pisses me off.

The only piece of equipment that’s survived is my turbo trainer and I hate it.

Yes, I know, you can get scenic ride apps, you can ride with other people on Zwift and yes, I know, it doesn’t have to be a race. There are even blog articles on how to set up your bike and a turbo trainer to use with the Peloton app.

I was pretty determined to make it work for a while, but cycling magazines explain my problem in a nutshell, “A turbo trainer is a great way,” they say, “to get through the winter”.

That’s not what I’m trying to achieve; you see I was never a cyclist. I didn’t obsess about the Tour de France or the Giro d’Italia when I was a kid, I read about people crossing the Sahara, or riding through Nepal. I wasn’t really interested in racing bikes, I wanted to use a bike to do mad things and have crazy adventures.

You do not have crazy adventures on a turbo trainer. Well, not if it’s mounted on a flat surface, anyway.

The advantage of a spin bike is that it’s a very simple piece of equipment. This means it’s possible to build something of professional gym kind of quality at a price that’s accessible to the home market. Something that I really, really hope I’m not going to break.

When I say “accessible”, the up-front cost of Peloton is still a little eye-watering. It’s the main reason why I had initially discounted the idea. The economics of it only work if you think about it long term.

There used to be a dedicated spin gym only a few miles away. They charged £6 a class. At first that sounds cheap, but if you do 4 classes a week that’s £104 a month. A Peloton subscription is £20 a month, but you have to find somewhere in the region of £2000 in set-up costs (or take a finance option). Working on that 4 class basis, that means you break even in about 2 years.

The cheapest local gym subscription I could find was £63 a month for a limited, “off peak” deal. If we equate the restrictions on that account with those of Peloton, then the break even point is 4 years. I know a lot of people who are paying £100+ a month for gym subscriptions they use at most twice a week.

There’s another thing to consider; will other members of your household use it? If you’re prepared to stump up £40 a month you can load them all up. As I’m married to an even bigger spin-bunny than me, it turns out to be a very attractive option.

Now, I have an admission to make. I’ve been writing this article like it it’s my journey. In many ways it is, or it’s my half of the journey, but it wasn’t me that pushed to sign up to Peloton, it was my partner. In fact, I was pretty heavily against it – until I started looking at the longer term economics. For us it just made sense, we never really used much in the gym that we can’t in some way replace with the Peloton bike and other classes from the Peloton App.

Your economics may be different. If you’re a circuits person, or more heavily oriented towards weight and strength training then the comparison will be more difficult and the numbers might not work for you.

Ordering a Peloton

Naturally they make it very easy to sign up. There was a 3 week lead time for delivery, which was a little disappointing, but understandable in the current climate. One surprising thing is that we needed to activate the account directly from the bike, so we were on trial accounts until it arrived.

If you want to save a few quid, don’t buy the official Peloton heart monitor, shoes or other accessories. You can get perfectly adequate equipment cheaper elsewhere.

If you’re new to the whole scene, so called “clipless” pedals are very popular with cyclists. The pedals themselves have a kind of sprung clamp which locks onto a “cleat” on the shoe. So you need special cycling shoes that you can screw the cleats into.

With the shoes, make sure that you buy a pair that have the 3 bolts arranged in a triangle. Lots of shoes have this system or are compatible with this and more. You’ll need to get (Look) Delta cleats, not SPD or any other system. The cleats themselves should cost no more than £10.

For cyclists you’ll be pleased to hear that the pedals on the bike are standard, so if you want to swap them for SPDs or something, you can (although you might want to check the warranty conditions).

The same is true of the seat; it’s the standard dual rail clamp, so if you want to change it for your favourite Selle Italia bum wedge, you can.

Delivery

They call you about 1/2 hour ahead of delivery to sort out the fine detail. There’s a range of options, from dumping it at your door through to carrying to to the correct room and setting it up.

The bike comes pretty much assembled; if you’re even a basic Ikea warrior, you shouldn’t be afraid of assembling it yourself. Be aware of the adjustable feet, however. Mine took a bit of wrestling to move initially.

Do be aware that the bike is very heavy. Unless you’re Hafþór Björnsson I’d recommend at least getting it to the right level. It does have wheels on the front, so once the bubble-wrap is removed it’s a lot easier to shuffle around.

If you are going to self-assemble, look out for the small black screws for the tablet (display); mine were taped to a reddish piece of packaging around the mount (on the bike). I nearly threw them away by accident. There’s also a Velcro strap that, depending on the height you set the handlebars, you may want to use to make absolutely sure that the monitor cable doesn’t rub on the flywheel.

The last physical thing to mention is to check that the existing nuts and bolts are tight. For me, one of the ones in the handlebars was loose.

The tablet is very obviously Android based. Booting it, connecting to WiFi, updating the software and activating the account were straightforward.

Obviously the device will be streaming video, and that takes quite a lot of WiFi bandwidth. On the standard bike there’s a wired Ethernet port, so if you have problems with the WiFi you can plug a cable between it and your router. Apparently this is not there on the Bike+, so you might want to consider this if you’re choosing between the two.

First Impressions

The height of the handlebars and both the height and the horizontal position of the saddle are easily adjustable, with handy guides so if there are more people using the bike settings can be easily remembered and adjusted.

The saddle angle is adjustable, but it’s a bit more tricky and not the kind of thing you would want to do for every ride. The saddle itself is perfectly OK for me, but I’m a male lifelong cyclist with buns of steel. Saddles are such a personal thing; I could easily understand some people wanting to replace it.

One of the advantages of SPD pedal system over Look Delta is that it’s much easier to make dual platform pedals, ones that can be used with out without cleats. Unfortunately you can’t do that with the Peloton pedals, you have to clip in, even for a quick, casual ride. I suspect this will annoy me, in time, and that I’ll change the pedals to dual platform SPDs.

Hopping aboard, the first and most obvious thing is that the mechanism is super-smooth and remarkably quiet. You can wind it up to over 500 Watts and it’s still barely more than a whisper.

As someone who’s used plenty of spin bikes in commercial gyms, the flywheel feels a little light. However, the resistance mechanism is very silky and that goes a long way to compensate.,

The tablet boots quickly, but it does get a bit cranky if, say, you attempt an artistic dismount, fail to unclip properly and, in the process of faceplanting into a nearby aspidistra, manage to tear the cable out of the wall socket. If you plan to turn it off at the mains when it’s not in use, you may want to turn it on a minute or two before you plan to use it.

Having backed the tension adjusters on the pedals off a few notches I could look more at the tablet. It works well, its layout is intuitive to any user of smart devices. There’s a live, very clear measurement of cadence (how fast you’re spinning the pedals), resistance and a calculation of output power. If you want, you can fire up the “Just Ride” option and work with it simply as a training bike.

Bluetooth audio is an option, the standard bike has an aux out (3.5mm jack) and you can even cast the video to an external screen. I was surprised how good the onboard audio is though, it’s quite good enough for the purpose. We will see, in a few months, if I still think that, however. My finger’s already twitching over the SuperFi web site.
There’s no need to cast the screen (for regular use), the onboard is plenty good enough. Of course, you could run non-spin classes cast from the bike itself, but wouldn’t you just use your phone/tablet for that?

My (Garmin) Heart monitor connects easily and works flawlessly. It doesn’t complain if I don’t hook a heart monitor up, which is good because the things annoy me. I only use one to get a baseline every so often.

The First Ride

The bike initially suggests some beginner classes. In fact there’s a whole 6 week beginner programme you can take, if you want. I thought it worth starting with a beginner class just to make sure I wasn’t missing something vital. As a cyclist however, the advanced beginner would have been a perfectly adequate place to start.
If you’re not a cyclist or haven’t ridden for a while, the beginner classes may be very useful.

The instructors are unforgivingly outgoing and positive. If you want drill sergeant style instruction, I don’t think you’ll find it on Peloton. They are all very encouraging and very welcoming, it can be a little irritating at times but it does make the whole thing much more accessible :- for many people the idea of going to a spin class is quite threatening, it has a reputation as a bit of a headbanger activity. Peloton busts that myth, you find your level. Nobody is going to judge you if this is your 200th beginner ride.

Every class has bands of cadence and bands of resistance, “increase by 3!” says the instructor, but that could be 40 to 43 or 55 to 58, depending on where your level is. The bands themselves are wide, the difference between 40 and 58 resistance is a lot – approximately double the power output. The upshot is that you can steadily work up each range. If you can get through a beginner class at the top of the difficulty, then you’ll be right in the middle of an Advanced Beginner and the same moving into the standard classes.

After One Week

OK, I love it, but that’s not surprising; it’s my new toy. I am slightly concerned that I may have joined a cult however. The instructors leave you in no doubt, no doubt at all that you’ve definitely “got this” without ever revealing what “this” is. Do I need to attain a higher level to find out?

The incessant positivity is a little saccharine to an overly sarcastic Brit like me, but I’d rather they erred that way than the other; “Work your butt off and you might die slightly less soon” is not effective motivation for most people.

One thing that does work is the high-five system. It’s actually quite encouraging to know that there are other people out there with you.

There really are classes for every variety of spin you could want to do. I’ve picked up a few. I’m not sure about the strength based stuff yet, I might give that a swerve for a few weeks, until I’m confident I have the core strength.

At the moment, to me at least, it seems as if there aren’t enough live classes. I don’t know; right now I don’t feel comfortable enough with the system to join one. That’s the target for next Wednesday.

I’m finding the scenic rides really useful at the moment. I can do a 20 minute or 30 minute class and still want more, but I don’t really know where my level is at, so I don’t want to join another class and then flake out half way through. A scenic ride is perfect because you’re in control. You can even replace the music with your own, if you want. I recommend DevilDriver (I do not recommend DevilDriver).

Initial Conclusion

Is it doing any good, though? Yes, definitely. I can see from the numbers that I am fitter than I was 10 days ago, sure. I can also feel it in what I do; every morning I take a short walk to the local Baptist Chapel, not out of any religious devotion, it’s just that it’s up a hill and I like to make sure that I’ve done something active before I open the office. That hill doesn’t even register any more. I don’t even notice that it’s a hill.

What rather surprised me, though, was the improvement in core strength. Yesterday I was cutting a mortice slot in some studwork in a really tricky place. I was in a really awkward position, but unlike when I started this project a few weeks ago, I wasn’t looking for things to brace myself against, I just seemed a lot more stable and in control.

Is it worth the outlay? Will the subscription prove worthwhile? Right now I feel very positive. I’ll update in a couple of months and we’ll see…

Please Just Mute Geoff.

In 2011 I became a remote worker. I was really surprised how easy it was, but I was working for the Department of Computer Science at the University of Hull so if we couldn’t make it work, that would have been a very bad sign.

COVID-19 has changed the game completely though. For us accustomed remote workers the results have been positive; in many ways it’s making our lives a lot easier. Over the past few months, however, we’ve been watching, and trying politely to advise, the rest of the world as they catch up with many of the social aspects.

By and large, with the occasional nudge, it seems that everyone has now learnt the core lessons. I’ll talk about them at another time, for now I want to talk about something that doesn’t seem to have made it into culture yet: the etiquette about muting in a meeting.

Background noise happens. It’s a fact of life. Whether it’s the builders next door or your partner on another call or a small Yorkshire terrier inexplicably named Fenrir, it happens. What’s more, for a variety of reasons, sometimes background noise can get amplified to unpleasant levels and broadcast to the entire meeting.

Two things we need to establish:

  • Being on mute is not a sign that you’re not contributing, or not intending to contribute. It’s a sign that you’ve learnt the shortcut key that your system uses and that you respect the other people in the meeting. It’s very rare that you need to speak instantly and without warning. Get used to CRTL+D – talk – CTRL+D (if you use Google). It just basic politeness.
  • It’s not rude to mute other people if you’re getting background noise from them. Most systems allow this. If you’re using one where only the meeting organiser can mute other people, then it’s part of the organiser’s job. Obviously, if it’s convenient, point it out and ask the person to mute themselves, but if Tracy is talking and Geoff’s geese suddenly get spooked, then mute Geoff.
    Believe me, you do not need unsolicited contributions from geese in any meeting.

There are a couple of ancillary points. In the above case Geoff might have no idea how loud the geese are, because he may be using really good noise cancelling headphones. That algorithm might be entirely different to the one used for the meeting, which might think that geese are really important contributors who need to be put front and centre. Background noise doesn’t mean that anyone’s doing anything wrong or that they’re being inconsiderate. It’s not a conflict situation, don’t treat it like one.

Finally, please invest in (at least) basic equipment. Laptop mics are awful, not in the least because of how far they are away from your mouth. What’s more, if you so much as look at your keyboard whilst using a laptop mic, the whole world will know about it. A good, basic headset is a huge improvement over a laptop mic.

The headset I use is one of these. There are a lot of similar headsets on the market at a similar price. If I worked in a noisier environment I might have paid for the advantage of active noise cancellation, but for me it’s not necessary.

If we bake these things into business culture now, if we make them protocol, it will make our lives just that little bit easier and our workplaces just that little bit more productive.

What Have We Brits Learnt Through #blacklivesmatter?

I’m working on some longer stuff, because one thing that #blacklivesmatter has made me realise is that there are a lot of assumptions being made about racism and there’s a lot of bollocks being talked.

In the meantime, a few bullet points:

  • We still have institutions here in the UK that treat people differently according to their race.
  • We still have tropes and stereotypes in our society that disadvantage people of colour.
  • We still have an embarrassing number of actual, conscious racists (and weird conspiracy theorists).
  • A majority group can easily overlook the problems it causes a minority.

For you, personally, not being racist is a good start. If we are to end racism however that is not enough.

You can do more simply by looking within yourself to see if you have unconscious biases. I’ve been an active campaigner against racism for about 25 years and I still find the odd little quirk in me.

You can do more by listening to minority groups when they try to explain ways in which our society discriminates against them.

You can do more by reading, watching documentaries, etc. “Natives” by Akala is a good start. In recent years many good resources have been produced when it comes to the experience of black people in the UK.

Accessible resources about other forms of racism are more difficult. For instance, I learnt about the Jallianwala Bagh massacre when I was stood in Jallianwala Bagh (Amritsar). A lot of what I’ve learnt about other forms of racism comes either from visiting other countries or from talking directly to people in the UK. I’m currently trying to collate some resources on this.

You can do more against racism by taking action. These days taking action against racism is not so much facing down neo-Nazis in the street. You can still do that if you want, you can also attend protests, #blacklivesmatter shows us how effective that can be. Fighting against racism is so much more than that, though.

The simplest action you can take is to be overtly against racism. Talk about it, make being against racism normal. The key point to understand and the most difficult to communicate is that conscious racism is really only the tip of the iceberg. A lot of the values, systems, traditions, institutions of our society were formed between 1555 and 1833, when England (latterly Britain) was involved in the slave trade and inherently a white supremacist society. Serious attempts to end racism only started in the 1970s. We’ve made good progress in eliminating active, conscious racism but we still have a very long way to go before we can say that we’ve ended racism.

The ship of state does not turn quickly and one person can only push so hard on the rudder. Some people can push harder than others, of course, but the more hands we have pushing the faster the ship will turn.

It’s a long journey, we know that, but we will get there.

Always Store Dates in UTC

It all went rather wrong in the early 2000s when we realised that the the last Sunday in October had two hours that both claimed to be 1am.

Willy Lott’s Cottage

In the mid 1990s the company I was working for made an intelligent GPS radio modem. It was a neat little device that you could put in a car and it could do some basic processing, even run a small touch screen, and could communicate remotely with a central server.

We think nothing whatsoever of this today – the smartphone that most of carry all the time is way more capable than anything we were dreaming of then. In the 1990s however the idea that you could communicate with a vehicle and that it could tell you where it was, that was pretty cool.

Government organisations, in particular, were keen on us. There were other solutions on the market that were cheaper to buy, but we had the lowest running costs. Sending data across the airwaves was expensive and we spent a lot of time and effort to make sure that it was done as usefully and efficiently as possible.

For various reasons, some of which were historic, the Product Manager decided that it should operate in local time (including daylight savings time). Unfortunately it was also local time that got send back to the server. To make matters worse, to save on over-air costs, we cut the data right back to just the time. We didn’t include timezone or daylight savings information.

That might sound stupid now, but back then the primary business requirement was very much operational: customers wanted to know where their fleet was at that moment. Historical reporting was distinctly secondary.

My first job at the company was to change that, to develop a historical reporting function. That’s when we started to notice problems.

When British Summer Time switches back to Greenwich Mean Time we say that “the clocks go back”, we get to 2am and then we put the clocks back to 1am. Our intelligent radio modems faithfully did this, when they got to 2am they reset the clock to 1am. The result was that, in our database, we had two sets of records both claiming to be between 1am and 2am and it could be impossible to tell which was which.

If you’re a business this is a pretty irritating, but it’s something you can live with. When your customers are The Police and they need to know for evidential purposes where a vehicle was at any given time, this is a serious problem.

It was an easy enough software fix, to make the device always send the base time, not daylight savings time. Rolling those updates out and dealing with the potential data problems caused by the switch was far from trivial.

Hot on the heels of that problem, we then sold a system to a country that had multiple timezones.

Fortunately we predicted the problem this time. We locked ourselves in a room and went through every scenario we could think of, every way of working it and the conclusion we came to was that the date and time should always be sent and always stored in UTC. That way you know the data is always valid, it’s an absolute, there’s no question.

The situation has changed a little now because data storage and communication is much, much cheaper. There’s no reason for us not to send all the qualifying data. Back then however every single bit mattered.

As a systems integrator however I still run into problems with times quite a lot. Customers often tell me that this system works in UTC whereas some other system works in local time. They’re usually wrong, under the covers most systems either fully qualify the date and time or use UTC and convert for display. It’s not always the case though and APIs are not always explicit about it either.

My advice is simple: never store or transmit (internally) an unqualified time that is not UTC. If you’re using local time always make sure that it is qualified with the timezone information (including any applicable daylight savings). Never let the base time get separated from its qualifying data. This is still an easy mistake to make when writing to a database or transmitting via an API. If, for some reason, you cannot transmit or store the qualifying information, convert to UTC.

In the .NET Framework CLR there are 2 DateTime types that you should be aware of: DateTime and DateTimeOffset. Microsoft have produced some guidance on when to use which, (but basically use DateTimeOffset if you have the qualifying data, use DateTime for UTC).

The Last Landfill Christmas

It’s just common sense; December is a cold, wet, dark and miserable time of year in Northern Europe. That’s why just about every religion that’s taken hold here has put a big party some time around the Winter Solstice.

Christmas is supposed to be fun. It’s supposed to brighten up an otherwise miserable time of year. How then did we end up with this version of Christmas? The one where it’s a significant cause of stress? Where it’s become a big list of expectations and obligations? You must do this, do that, buy this, invite these people, visit those people, decorate your house so, buy presents, presents and more presents, send cards to the entire world and not go postal on the Salvation Army band when they turn Gaudete into a funeral dirge.

In 2009 I got so hacked off with the entire affair that I decided to celebrate by going on holiday – to a Muslim country. It was worth it, I came back with an entirely different attitude.

I took step back and began to ignore the billboards and the adverts and all the noise and listen to the language of Christmas: the stories; the songs and carols; the messages people send. It’s not about presents, it’s not about wrestling 9 other people by the games counter in Hamleys to try to get your hands on the last UK stock of this year’s must-have toy. There are literally no mentions of buying a new sofa to try to impress your relatives. For Christians it has specific religious significance. For the rest of us the messages of Christmas are of peace, of goodwill, of hope.

These are universal, whether you’re a Christian or not.

That’s what I learnt in Egypt a decade ago, where our hosts apologised constantly for not really understanding Christmas, but in fact embodied its true meaning far better than we do the UK.

This wasn’t the reason I wanted to write this article however: it was consumerism.
It was a suggested on a business programme I was watched not so long back that the average life of a Christmas present is two weeks. After that they get no significant use and ultimately end up as landfill waste. At first that seems ridiculous, I still have plenty of presents from years back that I still use and indeed treasure. However when I think about the amount of relatively low value presents I’ve received as tokens of people’s affection then the two week figure starts looking frighteningly plausible.

I didn’t know that in 2010, but I did know that my friends and I were getting an awful lot of crap we neither needed nor wanted. It was all given with the best of intentions of course, but most of it was disappearing shortly after Christmas to never be seen again. Consequently I came up with a plan: if I didn’t know a present that someone really wanted then I’d try to buy them something consumable. Wine, beer, theatre tickets, restaurant vouchers, hampers, etc. Things that they would definitely use and that would leave a very small footprint behind, if any at all. I’ve done that every year since.

Aside from not wasting money on crap that will get thrown away there’s another reason. In Europe we’ve made big efforts to reduce the amount of energy we waste and the amount of greenhouse gasses we produce.
In counting this however what we’ve failed to do is to account for the carbon footprint of the goods we import. Almost all cheap Christmas good are imported from other countries, countries where in many cases the energy and manufacturing systems have a much larger carbon footprint than ours in Europe.

Even if you put the environmental argument aside, if you’re buying cheap presents from a global online marketplace or a major chain store then the money is just disappearing out of your local economy and even out of the country.

You’re basically just giving Jeff Bezos your hard-earned cash.

What can we take away from this?

Buy from local small businesses. Not only does this improve your carbon footprint, it helps people in your community – and not just the business owners. You give the shop-keeper a £10 note, that gets paid to staff who use it in a restaurant that then uses it to pay a local farmer who then buys feed – the money stays local, benefiting people in your community. Buy something from Amazon and it’s gone.

Buy consumables for presents. Things people like to eat, drink; supplies for their hobbies; experiences you know they’ll enjoy.

OK, if you have kids I know this is difficult, but try not to be a Dursley. You know your kids, try to buy small numbers of high quality goods that you know they’ll really enjoy for a long time. Ignore the hubbub about this year’s must have toy. Most of that noise is created by the industry itself and most of those toys are rubbish. Remember that magazines, newspapers and web sites rely on advertising money. If the toy’s manufacturer is promoting it the media is going to be right behind it, even if they all know it’s rubbish. They’ll tell you that it’s the best thing ever, that everyone wants it and that you’re a bad parent if you don’t buy it. In the words of a band I rather like, Ignore the Machine.

Remember also that the experience of seeing your children thrilled and happy doesn’t always have to be met by a physical thing. If you have a special trip, holiday or experience planned, you can announce it at Christmas. With many items you can either make a kind of fake ticket or put the actual tickets in a fancy envelope and use that as a present.

Peace, Hope and Goodwill. You don’t have to be a Christian to understand the true meaning of Christmas. By far the greatest gift you can give is happiness. A big part of that is freedom; freedom from conflict, be that personal, regional or international. Freedom from the fear of conflict and war. Freedom from oppression and the fear of oppression.
Goodwill is the key to all of that.
You can give people peace by being kind and considerate towards them, showing them that they don’t have to worry about conflict and oppression.
You can give people hope by showing that you care about them, that you care about their future and the future of the planet.

…and, as Bill and Ted so wisely put it, Party On Dudes and Be Excellent to each other.



The Y2K Bug: Was It a Hoax?

I’ve run into a few people recently who’ve told me that the Y2K problem, aka The Millennium Bug was a hoax. In some ways the issue was, but let’s get one thing straight, the bug was very real and if we hadn’t done a hell of a lot of work to fix it, things would have gone catastrophically wrong.

What was the problem then? In the 1950s every tiny piece of computer storage was critical. Programmers were always looking for ways to store and process information more efficiently. They didn’t think for one moment that their code would ever have to deal with the year 2000, so they decided to lop the “19” off the front of the year and just store the last 2 digits. 1958 was actually stored as “58”. If the user needed to see the full year then many systems simply printed “19” before the 2 digit year.

This wouldn’t have been much of a problem if it hadn’t made it out of the 1950s. Unfortunately every new generation of the tech industry builds on previous generations. Not only did the 2 digit year become a kind of industry standard, it also got baked very deeply into the code that actually ran the computers themselves.

OK, it’s a stock image. It’s really here to break up the text.

By the time the 1990s rolled around there was an awful lot of computer code about and people started to realise that a lot of it was going to have to deal with the year 2000.

Suddenly You Find You’re Not Insured…

Let’s look at an example. Let’s say you renew your car insurance. The new policy starts on January 2nd, 1999. Now, you’ve been lucky, this computer program uses 4 digit years so you correctly see your expiry date as January 1st, 2000.

Unfortunately the database that all the records are stored in only uses 2 digit years, so the system writes a start date of 02/01/99 and an expiry date of 01/01/00 into the database.

The problem is obvious: when that record is read back the system will correctly convert 02/01/99 to January 2nd, 1999, but it will wrongly convert 01/01/00 to January 1st, 1900. Congratulations, as far as that computer system is concerned you’re not insured.

In that simple example you’d hope that, at some point, a human would see it and realise something had gone deeply wrong. The problem is that, even in 1999, there was an awful lot of processing going on, in financial systems even in safety critical systems, before the results ever got anywhere near a human.

The Ariane 5 rocket explosion was caused by a similar problem. The guidance system was capable of producing a much higher number than the main computer could deal with. This hadn’t been a problem on Ariane 4 because it couldn’t do anything to cause such a number to be generated. Ariane 5 however could and 37 seconds after main engine ignition on June 4, 1996, it did, ultimately causing the rocket to self-destruct.

That’s why we had to fix the Y2K bug, because pretty much everywhere there was a date in computer code there was potential for things to go badly wrong.

It Wasn’t Just Dates…

What’s more, it wasn’t just the obvious cases we had to worry about. There were more subtle implications of the bug. Consider the following output from a little example program I wrote. It gives you the expected arrival time of a plane and its current altitude both in feet and metres.

 SIGN    DATE            TIME    ALT(m)  ALT(ft)
Y2K00 1990/11/01 00:00 5000 16384
Y2K01 1991/11/01 00:35 4900 15872
Y2K02 1992/11/01 01:10 4800 15616
Y2K03 1993/11/01 01:45 4700 15360
Y2K04 1994/11/01 02:20 4600 14848
Y2K05 1995/11/01 02:55 4500 14592
Y2K06 1996/11/01 03:30 4400 14336
Y2K07 1997/11/01 04:05 4300 14080
Y2K08 1998/11/01 04:40 4200 13568
Y2K09 1999/11/01 05:15 4100 13312
Y2K10 19100/11/01 05:50 4000 49
Y2K11 19101/11/01 06:25 3900 49
Y2K12 19102/11/01 07:00 3800 49
Y2K13 19103/11/01 07:35 3700 49
Y2K14 19104/11/01 08:10 3600 49

There’s one thing you might expect, that when it got to the year 2000 it printed out 19100. The program stores the date as 2 digits and simply prints “19” in front of them. That was a pretty typical Y2K bug: the 2 digit year ticks over from 99 to 100 and it gets printed as “19100”.

What might be surprising is that after the year 2000 it completely screws up the calculation of how high the plane is in feet. The calculation before the year 2000 is (approximately) right. Afterwards it just prints “49” however high the plane is.

This is because, when I wrote the program, I only allocated enough storage for 2 figures in the year. When it came to after the year 2000 however, the program wrote 3 figures regardless. What it did was to write the extra “1” to some storage that was being used for something else – in this case to store the height in feet. 49 is the value a computer would send to the screen if it wanted to print the number 1.

Again, in my little program this gets printed to the screen and you’d hope that someone would notice. What it highlights however is that the problem caused can be somewhere else in the code and affect something other than just the date. This corrupted value could be the radiation dose of a chemotherapy patient and it might never get seen by a human before its delivered…

I hope that makes it abundantly clear that the Y2K bug was very much real and that the consequences could very definitely have been catastrophic. The idea that the bug could have caused planes to fall out of the sky is not and was not scaremongering. It was entirely possible. Indeed if we had somehow sleep-walked through to the closing minutes of 1999 without realising there was a problem it was a relatively likely consequence. We did however realise and we did a hell of a lot of work to fix the problems.

Now of course it’s true that the press over-hyped the situation. The headline “Renowned industry expert says that thanks to years’ worth of effort it’s now exceedingly unlikely that there will be any critical incident in the aviation sector” doesn’t make much of a headline. “Boffin says planes could fall from sky” is going to sell many more newspapers.

On the back of that hype there was also the predictable bunch of spivs and con-merchants offering to Y2K-proof your toaster. I’m sure you get my point; some people capitalised on the ignorance and panic by spreading more misinformation and making a pretty penny out of fixing things that didn’t need fixing.

That doesn’t lessen however the seriousness of the real underlying problem. It was, as they say, “a biggie”.

So It Definitely Wasn’t a Hoax… Or Was It?

There is however a certain thread of logic that says, even considering everything I’ve written, it was still a hoax. It’s a line of argument I actually quite like. For the tech industry it certainly wasn’t a hoax, it was very real indeed. For the government too – the government needed to make sure that adequate provisions were being made to fix it, to mitigate any remaining risk and deal with any problems arising.

As far as the general public were concerned however, they were never actually exposed to any significant level of risk. It was inevitable that we – the tech industry – would fix all of the serious issues well before they came into play. There was nothing that the people on the Clapham omnibus needed to worry about. In fact, being perfectly brutal about it, there wasn’t really any need for them to ever know about the problem at all.

Much as I like it, I don’t entirely subscribe to that school of reasoning. Even as midnight ticked over we couldn’t be sure that we’d fixed every critical bug. There was still a risk of things going badly wrong and the general public needed to be aware of that.
There’s also an argument that it was public awareness that actually made a lot of the tech industry sit up and take notice :- that’s when the senior management of these businesses finally realised that what the technical people were saying was right.

Did we need people predicting that planes would fall from the sky and toasters would stop working though? No, we definitely didn’t. What we needed was common sense. What we got was the British Press.

Perl: The Lazy Way to Write WPF

I hate writing boilerplate. Recently I was writing a test tool where I needed to be able to build messages from a WCF interface. That’s a lot of ViewModels and a lot of views and a lot of tedious typing.

That is, of course, unless it’s Friday lunchtime and you happen to have spent the first half of your career working on *nix systems. Enter Cygwin and some now rather sketchy memories of how to write Perl.

$ perl -ne \
'if($next) \
{ \
$_=~/^\s+void\s+(\w+)\s*(([^\)]+)\)/; \
$cType=$1; \
print "public class ${cType}Model:DependencyObject\n{\n"; \
@props=split /,\s+/,$2; \
foreach $p (@props) \
{ \
($type,$name)=split /\s+/,$p; \
$name=~s/^([a-z])/\U$1/; \
print "public static DependencyProperty ${name}Property = DependencyProperty.Register(\"${name}\",typeof($type),typeof(${cType}Model));\npublic $type $name\n{\nget => ($type)GetValue(${name}Property);\nset => SetValue(${name}Property, value);\n}\n"; \
} \
print "}\n"; } ; \
$next = /\[OperationContract\]/ ;' \
< IClient.cs >../../../../../Models.cs

I then just used ReSharper to move the classes into their own separate files.

Yes, I realise that the little snippet of Perl is very poorly written, both from the point of view of its fragility in processing C# and also because these days I really only use Perl for one time lash-ups like this. It’s be 15 years since I could say that I wrote Perl in any professional sense and I’ve forgotten a lot in that time.

My point however isn’t to provide a shining example of Perl for you to cut and paste. It’s to point out that a few lines of text processing script in whatever language, written in a few minutes, can save you from a whole load of tedious typing.

I use Cygwin a lot in programming, because utilities like find, xargs, grep, sed, awk, cut, uniq and bash scripting itself can save a heck of a lot of time.

If you’re not an old *nix wonk like me however all is not lost. Perl can do pretty much everything anyway and there are plenty of Perl implementations for Windows.

Of course there is the world of Powershell too and that’s where I have a confession to make. Aside from learning the basics; just enough to do what I need to do, I haven’t really delved into Powershell. I’m sure Microsoft have put a lot of research into it, but to me it feels really awkward, like you’re always having to jump through hoops to get even the simplest thing done.
I realise the potential hypocrisy of this, Despite being notoriously counter-intuitive, vi has become second nature to me. It’s only when I try to explain to others that I remember that if you’re not thinking about trying to operate an editor over a 300 baud serial link then none of it makes any sense at all.

Anyway, I digress, the simple conclusion is that if you’ve got a mountain of boiler-plate to write, have a think about using some sort of script. There’s a lot of power in your fingertips.

Racism Is Hard-Baked Into White People

In fact all the institutions I dealt with were [or claimed to be] against racism. They were however white. Books were white, TV was white, culture was white, science was white, the law was white, power and influence were white. That gets baked into you whether you like it or not.

Why was there a brouhaha when black actress (Noma Dumezweni) was cast as Hermione Granger in The Cursed Child? Because people, many of whom would say they were against racism, just assumed Hermione was white.

Rowling‘s description of her doesn’t specify or even imply: it is distinctly indistinct. Instead it concentrates more on her character and how clever she is. We – me included – just assumed she was white. Why?

Because she’s privileged, because she’s bookish, because she’s clever, because she’s powerful, because she’s a heroine. All these cues refer back to the environment most Westerners grew up in and they all tell us that she’s white. We don’t think about it, we just assume it.

We might not think this matters because we think we make all important decisions consciously where we can weigh up the evidence objectively. That however is far from the whole picture. We make thousands of decisions every day without them ever fully surfacing into our consciousness. Similarly we send out thousands of signals that we’re not consciously aware of.

Those biases that have been baked into us by our upbringing do still have an effect, a very subtle effect, but it’s there nonetheless. If it’s just one person then it’s insignificant, the problem is that we’re not just one person, those of us who grew up in an almost exclusively white environment are a majority. On top of this almost everyone in the UK grew up – and continue to grow up – in an environment where the vast majority of significant institutions are predominantly white.

What can we do about it? We can’t undo decades of programming simply by wishing it away. There is no silver bullet. We have to acknowledge that it’s there, to be aware of it. We have to be aware that no matter how much we believe in equality, we can occasionally be guilty of accidental racism. We have to accept that, for people with my kind of upbringing, just being ideologically opposed to racism is not enough. If we are not actively fighting against racism then we are subconsciously contributing to it.

We have come a long way to eliminate conscious racism from the majority of the Western World. We still have a battle to fight, especially at the moment, but we are making steadily making progress and in the end we will win.

Not That Kind of Router

I have to admit I’m struggling with this one. Usually I can find some kind of spin, some kind of humour, some way of making a very boring subject a little easier to read.

I think with this one I’m just going to have to put on my anorak and face facts: there’s nothing really interesting in this story. It is what it is, but it does have a mildly uplifting conclusion. At least I can tease you with that.

Many years ago I bought a cheap router; the kind that you use for machining grooves in wood, not the kind that hurls packets down the right network pipe. I was fitting out a room with a load of custom built cabinets and I figured if it lasted for just that job I’d not be too bothered.

It lasted a bit longer than just that job, about a decade longer.

A few days ago however it had a problem. I was cutting a chamfer on a roof panel when the motor suddenly slowed and there was a fireworks display in the top.

“It’s done well” I thought to myself and started looking at the price of half decent routers. Ouch!

I’d just assumed that there’d be no way to fix a cheap router like that. There’d be no way to get the parts! Nevertheless I popped the top off and had a look and to my surprise I found that the brush assemblies just slid out and that the brushes themselves were easily replaceable.

A quick visit to Ebay later…

Then it was just a case of slotting them into the housings. In the picture beneath the right one’s done, the left is the old, worn out one.

Then popping them back where they should be.

The exciting moral of the story is not to assume that you’re going to have to throw something away just because it’s developed a fault. The Internet – and in particular ebay – has given us access to millions of parts for all sorts of things. It’s always worth looking.

Primordial Radio Data Usage

The question of how much data allowance Primordial Radio uses has been asked a few times.

The simple answer is about 30 megabytes per hour, which means 1Gb of data will last you about 33 hours.

If you’re interested, the not so simple answer goes as follows.

Primordial are cunning, they use a 63KBit AAC stream. The bit rate is, quite literally, how much data per second the stream uses. The higher the bit rate, the higher the quality of audio that can be squeezed in. It’s a trade-off between data and quality. But there’s another factor – the technique used to encode the audio.

If Primordial used a 63Kbit MP3 stream it would sound dismal, because MP3 is actually a pretty old and inefficient audio encoding technique. Because they use AAC, they can get away with a much lower bit rate, which keeps the amount of data you need to use to listen to Primordial low and the quality acceptable.

BBC Radio 3, in comparison, have a 320Kbit AAC stream (amongst others). You can get your Classical Music fix in super-high quality, but it will munch 150 megabytes per hour.

Now, the relationship between the bit rate and the amount of data it uses isn’t entirely straightforward. In data transmission we tend to talk about bits per second and when we talk about data allowances they’re in bytes, or more likely Gigabytes.

Your broadband connection, for instance, is almost certainly specified in Megabits per second. Long story short, the reason is that the bit is the smallest thing that can be sent, so it’s most accurate to talk about the speed of a connection as bits per second.

A byte is almost always 8 bits, but some types of communication use extra bits to regulate the transmission, so it’s not always a straight 8 from bits per second to bytes. It’s close enough for a ready-reckoner though:

63 / 8 = 8 (roughly)

We need 8 kilobytes of data for one second of audio. We can then easily multiply that up.

8 *60 = 480Kbytes per minute

480 * 60 = 28800Kbytes per hour

A megabyte is 1024 kilobytes, so:

28800 / 1024 = 28Mbytes (per hour)

This, however, is always going to be optimistically low. Firstly there is the problem of the envelope. Data over The Internet is sent in billions of packets. You can think of each packet like a… um… packet. You can’t just lob a bottle of Hendricks in the postbox and expect it to get anything other than drunk by the postie. You need to wrap it up in something, put an address on it and pay postage if you want someone to actually receive it. There are similar overheads on the The Internet.

There are various different systems in use, often there are several layers of content and packets. This means that there is a lot more traffic on The Internet than just the useful data.

There is also the problem of packet loss. A small amount of data on The Internet just disappears. This is actually expected, it was designed that way because it’s easier and more resilient. What it does mean however is that a small amount of data has to be sent twice.

You can pretty much account for all this by simply adding a fudge factor. 20% is usually considered a safe margin. If we take our theoretical figure from earlier:

28 * 1.2 = 33.6MBytes per hour.

This, of course, is an estimate based on a bit of theory and some practical experience. If you don’t trust these kinds of calculations, you could just look at the speed on your router’s data rate table.

If you wanted a bit more accuracy though, you could listen to Primordial for, say, 1/4 hour, record the amount of data every packet contained and the overall length of the packet, then add them all up.

You’d have to be a right geek to do that though.

The total data received was 8150537 bytes, of which 7247617 was useful content. Those can pretty easily be multiplied up to an hour:

Total audio and related data: 27.65 megabytes per hour.

Total data exchanged: 31.1 megabytes per hour.

Naturally I can’t guarantee these figures absolutely. They’re over Wi-Fi rather than a mobile network and there will be differences. There will also be differences between different networks and even different times of day as The Internet itself changes and adapts to the traffic.

What I can say is that they should be somewhere near, within a few percent.