Posts from July 2016

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.