What’s in a name?

Many years ago, I was helping a local church with a project which involved a database of the participating parishioners. This was stored in the columns of a spreadsheet, and occasionally printed out strange things in the lists of names – like ‘1/6’, or ‘1/5/05’. Most bizarre.

I eventually uncovered the problem: one of the members of the congregation was named ‘June’. Another was called ‘May’. And when they had been imported into the spreadsheet, it was being far too clever for its own good! I found out just before adding a nice lady whose name was ‘April’…

Even my simple double-barrelled surname causes some problems: a surprising number of systems can’t cope with hyphenated names. For a while I seemed to be undergoing a lot of security checks at airports, which one member of staff suggested might be because my passport had a hyphen in my name, but the airline systems invariably did not, so I never matched up as expected. The US Patent Office gets similarly confused, and in some search engines, a ‘minus’ indicates an exclusion, so if you search for ‘Stafford-Fraser’ you are guaranteed never to get me because I have a ‘Fraser’ in my name. Sigh. I don’t envy those who have names with more complicated punctuation…

Unusual initials, while general handy, also have their downsides. I could never get a good personalised license plate for my car, for example, because Qs are deemed to be too easily confused with Os or zeroes in the UK and are not allowed (except in a few very specific circumstances). My friend Brian Robinson told me about an occasion when his son Xavier was excluded from something at school, if I remember correctly, because they mistook his initial, ‘X’, as a cross indicating he was crossed off the list!

So it’s appropriate that it was Brian who forwarded a Wired article by someone with a problem I hadn’t previously considered: his surname causes much more confusion for many computer systems than mine, because his name is Christopher Null.

Optimising the size of Docker containers

Or ‘Optimizing the size of Docker containers’, in case people from America or from Oxford are Googling for it…

For Docker users, here are a couple of tricks when writing Dockerfiles which can help keep the resulting container images to a more manageable size.

Also available on Vimeo here.

Things you thought you knew

Neil deGrasse Tyson is just superb. This video has (a) some ads that pop up that you’ll want to dismiss and (b) a microphone glitch early on so you’ll need to wait until he swaps mics. But trust me, it’s worth the effort.

The Cabinet of Dr Addenbrooke

John Addenbrooke, founder of the famous Cambridge hospital, was a fellow of St Catharine’s College around the start of the 18th century. One of the treasures in the college’s collection is his medicine cabinet, which has 27 drawers of assorted shapes and sizes.

20160621-180458142-Edit-900

If you open these, in the rather gloomy lighting of the room, you see some dusty items under dusty glass, and it’s hard to make out anything of much interest.

However, the college now has some funding to get the contents properly catalogued, and, since I’ve been doing a bit more professional photography recently, they hired me to take some photos of the interior. I set up a lighting rig, and the librarian and I carefully removed the glass panels covering most of the drawers. Under proper lighting, the contents came alive.

Addenbrooke Drawer 5

Addenbrooke Drawer 4

There are seeds, powders, bones, fossils, stone axe-heads; even a wooden clog in one of them!

Addenbrooke Drawer 20

Addenbrooke Drawer 26

The full details will appear on the college website once the experts have done their job identifying the contents. My thanks to the college for permission to publish a few images here.

Addenbrooke Drawer 4

I can’t wait to find out what some of these are, and where they came from!

Addenbrooke Drawer 8

Anyone recognise anything?

Addenbrooke Drawer 1

One thing I realised, when I got home, is that I needed to wash my hands thoroughly, since, for all I knew, I’d been spending the afternoon dusting my fingers in 300-year-old arsenic, or worse!

Facebreak

Well, having failed to stick to my earlier promise to spend less time on Facebook, I’m having another go. I don’t want to abandon my account completely but this time I’ve changed my password to something I don’t know. We’ll see if that helps!

I think the credentials that I use for cross-posting from my blog will still work. This will be a test!

The problem is that many of my friends (the European ones, anyway) are talking about nothing but Brexit, and I find it hard not to join in. (I’m also more moderate on it than some, and this distresses some of my friends who hold strong views in either direction!)

There’s a very good reason why polite society has always discouraged sex, politics, or religion as topics for the dinner table. Few people appear to great advantage when discussing them, and it’s very easy to alienate accidentally those with whom you would otherwise have no disagreement. I think it’s wise to absent myself from the table until other topics return to the fore. God knows there’s no shortage of Brexit news everywhere else!

Since Facebook uses clever systems to order and filter the posts it presents to you, it would be nice if you could tweak it to promote or demote particular topics. “Show me more/fewer posts like this.” I remember a few years back a friend complained that too much of my output concerned Lord of the Rings, for example. But I don’t think such a filter system exists, so if you want to stay on the system you’re left only with the option of un-friending people: something I don’t want to do. I just don’t care, for example, about discussions about Icelandic football teams and can’t contribute anything useful, even if I may value the participants’ views on everything else. They probably feel the same about my views on Peter Jackson’s movies.

Now you might say that coping with this is just part of normal social interactions at the pub. But Facebook is like a large pub where you have to hear everybody’s conversations at the same volume without the normal subtle clues that give hints about the hearers’ enthusiasm. And since it only offers you the option of chucking people out of your pub, I think, I’ll take the alternative of stepping outside for a bit until things are a bit less smoky! I’ll be back soon, I’m sure. Have fun while I’m away!

Using nginx as a load-balancing proxy with the Docker service-scaling facilities

There’s a geeky title for you! But it might help anyone Googling for those keywords…

Recent versions of Docker have many nice new facilities. Here’s a demo of how you can use the service-scaling to run multiple instances of your app back-end, and Nginx as a front-end proxy, while keeping track of them using the round-robin DNS facility built in to the Docker engine.

All demonstrated in a few lines of code on my laptop, using the new Docker for Mac.

Also available on YouTube.

With thanks to Jeppe Toustrup for some helpful hints. Have a look at his page for more detailed information. Also see the Docker channel on YouTube for lots of talks from the recent DockerCon.

Update, spring 2017: Do note that if you’re using Docker Swarm, you may want to adopt a more complex approach, perhaps based on Interlock.

Software security and the new app platform

As regular readers will know, my car has a programming interface which, sadly, is not officially supported by BMW. Still, it lets me create some little apps to improve the daily experience of car ownership; not something I’ve really been able to do with any previous cars. We’ve come a long way from some of my earliest ones, where I spent most of my time straightening bent carburettor needles and replacing leaf springs!

car_lock_checkMy latest hack is a little script which runs periodically on one of my servers and checks whether the car has been stationary for more than 15 mins. If so, and the windows, sun roof or doors are open or unlocked, it sends a notification to my phone. This is partly for security reasons, but mostly because the British weather has been sending us hourly alternate bursts of sunroof-opening heat and torrential downpours! Of course, if I’m not near the car at the time, I can lock it remotely.

One of the many things I find appealing about the move to electric cars is that the actual mechanics become so much simpler. I no longer have an exhaust pipe, a clutch or gearbox, an oil sump or filter, head gaskets or piston rings. The motor isn’t much larger than a melon, and the batteries can be made in various shapes and sizes to fit the layout of the vehicle. In my case, I have a flat floor, with no propshaft tunnel or gear lever to get in the way. Reconfiguring such a design to be a van, a campervan, a flatbed truck, or whatever, is much less of a challenge now.

As the complexity of the mechanics goes down and the flexibility goes up, I think software, both inside and outside the car, is going to play an ever more important role in our experience of it.

The automotive industry has become interesting again, for the first time in many decades.

Don’t believe everything you see on the commercials…

Obvious, right?

Well, some things are even less obvious than you might suppose. Take a look at this vehicle, for example. What do you think it might be used for?

Click and watch the video to find out.

Blackbird

A little more abstract

Some experiments with paint, ink and tanks of water at the Cambridge Camera Club tonight…

20160629-195026243-900

20160629-194223213-900

20160629-19250378-900

Click for larger versions.

“So here is how this could go…”

My pal Owen Barder has an interesting post on Facebook:

So here is how this could go.

We invoke Article 50 in October.

We negotiate a new deal which is roughly Norway / European Economic
Area. The UK has to accept Free Movement of Labour, and a net
financial contribution. But we lose the rebate and don’t participate
in Single Market rule setting.

There is a general election before the actual exit. A progressive
centre left coalition runs on a platform of remaining in the EU.

The public realises that staying in is a far better deal than they are
getting from exit (which is now an explicitly-defined alternative)
and, satisfied they have give the political class a bloody nose, votes
for the remain coalition.

The new government withdraws the notification of Article 50. There is
no procedure for this, but it is in everyone’s interest to invent one.

Post-Brexit business opportunities

While shares are cheap, I’m going to invest in Northumbrian construction companies.

I’ll make a killing in a few years’ time when we have to rebuild Hadrian’s Wall.

© Copyright Quentin Stafford-Fraser