Category Archives: Computing

Articles about computers and the IT industry.

Unsociable Christmas Tree

Last year I got myself a Raspberry Pi-powered Christmas Tree. It has eleven LEDs, and you can program the Pi to switch them on and off.

Naturally, doing all that takes time, and last year I just didn’t have very much. I just downloaded the sample project and set it up with a random flashing pattern.

It amused me, anyway.

This year I wanted to get a little more sophisticated. I decided that it should be interactive. My first thought was a web server where people could connect using their phones and change the LED patterns. Then I thought better of it. Because of COVID we have no guests, rendering it far less interesting. Also, setting up a web server is hardly very exciting.

I wanted it to detect something but options were somewhat limited. The tree connects to the Pi’s pin connectors, but it didn’t leave any pins free to plug in anything else.

Next, I looked at my Arduino components. Could I do the sensing on the Arduino and the lights on the Pi? A sensible argument would be that wiring up two small computers like that would be ridiculously and unnecessarily complicated. While you wouldn’t be wrong, the whole point of this exercise is ridiculous.

In my Arduino bag of tricks, I have distance, presence, light and moisture sensors, buttons, switches and displays. I could have cobbled together something but while reading Twitter I got a better idea: how about I plug in a webcam and have the Pi detect faces and show different patterns depending on who is looking at it?

Luckily, other people have done most of the hard work. I based most of what follows on a blog “How to train your Raspberry Pi for facial recognition.”

There are lots of steps, but they’re relatively easy to follow. It was all working fine until it asked me to build OpenCV from source, at which point I ran out of disk space.

I gave up for a while.

What I’m saying is that while I was planning on something a little more elaborate, I ran out of time. Again.

When I came back to it, I realised that OpenCV was something that many Raspberry Pi owners were likely to use and I was surprised that I had to build my own version.

Luckily my surprise was supported by the actual Raspberry Pi software archive: if you install python3-opencv you get all the libraries you need, and all without all the hassle of having to build your own1. As a side benefit, this removes about half of the steps in the tutorial!

The rest worked incredibly well “out of the box.” I ran it, trained it on a few unsuspecting family members and was very impressed that it worked the first time. It uses a lot of CPU on my Pi 4, so I’m not sure that it would work on any of the earlier models.

My next task was to hook in the Christmas Tree code so that the tree responds to changes in what the webcam could see. And… that’s where I ran out of time.

The interface between the facial-recognition and the tree lights is, well, minimal. If it finds someone it recognises, all the lights come on, otherwise, it goes dark. You can see the code on GitHub — only a handful of lines are mine.

It technically meets the requirements of an Unsociable Christmas Tree but is certainly less ambitious than I would have liked. Still, getting machine learning working on a Pi and connecting it to something physical was fun. Maybe next year I’ll get the time to bring everything together?


  1. In theory, installing python3-opencv means you can skip the whole of point 4, “Install OpenCV by running the following commands in your Terminal,” from the guide. In practice, I tried to build my own version of OpenCV so it’s possible that I have extra libraries installed that you also need. If I get the time, I’ll come back and try this on a default installation of Raspberry Pi OS. ↩︎

Meetings

After university, when I first started working, I jealously noticed people leaving their desks and attending meetings. I was left sitting at my desk, bashing out code. What was going on? What exciting things were being discussed without me? Sometimes they’d come back from the meeting and ask a random question. It was all very mysterious.

A while later I started getting invited to these meetings. I found what was being discussed. I discovered the mystery.

I’ve spent the rest of my career trying to avoid them.

Of course, meetings are not inherently bad. Sharing information, collaborating, making decisions are all vital functions of a company and you need meetings to do that. So why are they often so bad? And why do I spend so much time trying to avoid them?

Meetings are a cultural artefact. Good and bad etiquette isn’t evenly distributed. The companies with the worst meetings are also, ironically, the ones with the most.

What makes a good meeting? There are lots of articles on the web about this, so I don’t want to belabour the point, but, actually, I think it’s quite simple:

  • A defined function
  • The right people
  • The right duration

Missing any one of those means that the meeting is going to be a waste for at least some of those attending.

By “a defined function,” yes, I mean an agenda. It doesn’t necessarily have to be a full and formal written agenda, but all attendees should know the point of the meeting. If they don’t, maybe you do need to write it down. I encourage people to decline meetings with an unclear objective1.

The “right people” to invite to a meeting is often driven by the org chart, but this is completely the wrong metric. You need the fewest people that can meet the objective of the meeting. Don’t include someone just because they’re “important.” Don’t exclude someone because they’re too junior. Include everyone needed to share information or make a decision, or whatever the goal. But no more than that.

One thing that infuriates me is where people in a meeting have no “function.”2 Everyone should have a clearly defined role. If they don’t, they shouldn’t be there.

What about duration? I see two sides to it. First, work expands to fill the time available. Don’t do that. If you set aside an hour for a meeting but it actually only takes ten minutes, quit while you’re ahead. In fact, for people that tend to take a while to get to the point, I’ll deliberately book short meetings.

Conversely, if you’ve spent an hour going around in circles without making a real decision, maybe it’s time to call it a day. Your conclusion should be the information you need to actually make a decision, the people who are going to obtain it and, hopefully, when the next meeting will be.

Talking of “an hour,” that’s my benchmark for maximum meeting length. Anything significantly longer than that suggests to me that there isn’t sufficient focus or a tight enough agenda. And, perhaps more importantly, people are just not going to focus that whole time. They’re going to drift off into a dream world or check their phone. Why have them in the room physically if they’re not present mentally?

It all sounds so simple when you put it like that and yet we’re all guilty of Doing It Wrong. If there’s one thing to take away, it’s that meetings should be deliberate, just like any other corporate artefact.


  1. There are exceptions. For example, I wouldn’t decline a meeting with a client but I would seek clarification. ↩︎
  2. When Dilbert was good, there was a character called the Meeting Moth. I think we’ve all worked with people like that. ↩︎

Mismatched

Here’s something I’ve seen a few times recently: a startup issues a patch for a critical issue seen by one of their large customers. The “enterprise,” however, takes a week to install and test it. Clearly, the startup concludes, if it takes a week to try a patch it can’t be that urgent or the staff are dumb, or, quite likely, both.

Separately, we all know that a big difference between a startup and an enterprise is process. So why do people suddenly get angry and start to lack empathy when that difference is exposed?

What we saw in the first paragraph is normal in big companies where you can’t just promote changes into UAT, much less production. It doesn’t matter how loudly you shout at their operations team, it’s not going to make any difference. Maybe the process requires writing test logs and rollback plans. Perhaps it has to be deployed and run in the pre-production environment first. It likely needs sign-off by the QA and security teams. With the best will in the world, this just can’t be done in a few hours, no matter how critical the issue is. Who is to say that the patch isn’t worse than the problem it’s trying to fix?

The difference is frustrating, but don’t mistake tedious process with a lack of urgency or incompetence. Circumventing process can take longer than following it and your client probably knows that. If nothing else, these people might lose their jobs by not following the right process!

Work with it, understand their constraints. This isn’t the time to lose that empathy. It would help if you also had humility and understanding. You know your product but they understand their systems, including how your software interfaces with the other applications they have running in their data centre.

And yes, working with their process is more complex and time-consuming. This is why we charge enterprises more for, ostensibly, the same features.

Amazon Fire 7″ (9th gen)

A few years ago we got an Amazon Fire tablet and I could almost copy and paste that review for the ninth generation unit.

My biggest complaint this time around is the battery life. It feels like it’s always in need of recharging. Almost everything else from last time is improved. It’s slightly smaller. The build quality is much better. It’s faster.

Having said that it’s still no iPad. While faster it still feels sluggish compared with Apple’s tablet, the screen is a lot worse and the software library is laughable by comparison. But, as before, it’s also a tenth of the price. As an almost disposable consumption device, I have few complaints.

Innovation department

When I see a company that has an “innovation team” or a “chief innovation officer” I immediately understand that it’s not the kind of company I want to work for.

Innovation isn’t found in a particular team, person or department. It’s your culture.

If you need a special team outside the normal management structure to innovate, what does that say?

iOS 13 and iPadOS

As I normally do at this time of year, here are a few thoughts about Apple’s new mobile operating system. However, this year has been different in a few ways.

Betas are, well, betas. You don’t use them on devices that you actually need1. My normal pattern is put them on my iPad around the start of August. This is often the third or forth beta. Most of the worst glitches have been resolved by this point. Then, depending on how it goes on the iPad, I’ll probably put it on my phone towards the end of August, earlier if everything is going well.

As I write this, I still don’t have the beta on either my carry phone or my iPad pro. I’ve had it installed on my iPad mini 4 since the very first beta, but that’s not a device I use every day.

My caution is because of a combination of things. Firstly, I’m not doing this for a living. I need to have a functioning phone for work. But I still want to! The reason I didn’t is because these betas have been rough, especially the first few.

At the start of the beta cycle, there were stories of iCloud Drives getting corrupted and Too Much Stuff being broken.

Even now, on the most recent beta, there are still a few… oddities. One of my apps, when compiled with the latest GM SDK, comes up in lots of weird colours. Through the whole process I assumed that it was a glitch and that it would be fixed in the next seed. It turns out that this was my mistake. It’s a change rather than a bug. Still, in my defence, it’s rather surprising behaviour and it looks like a rendering bug.

Anyway, I mention this for two reasons, on both sides of the stability coin. First, the betas have been such that the idea that there was a serious rendering bug remaining wasn’t entirely implausible. Second, maybe that this affected my own app skewed my perspective and that they’re not as bad as I think. Your milage may vary, etc.

So, in summary, I’ve not been working with the new OS full time for a few weeks. This possibly means that my opinion isn’t quite as well informed as in previous years. If you can call my previous posts informed2.

The Good

  • Improved use of iPad screen. (Okay, this is technically iPadOS but I think they’re still close enough to not need a second post!) The “multi-app slide over” multitasking is nice, the widgets on the home screen is long overdue, the ability to have multiple windows of the same app open. Apple have been saying that the iPad is the future of the computer, now it’s finally starting to feel it can be used as one.
  • Text editing. I’m not sure that it’s perfect yet but it is dramatically improved. There’s a new keyboard, new cut-and-paste gestures, swipe keyboard, cursor navigation and selection, more keyboard shortcuts on iPad. Even with an external keyboard, this has always felt harder in iOS than it should.
  • Photos. I’ve not dug into all the improvements, but the design is greatly improved aesthetically.
  • Voice Control. I probably won’t use this very much, but I love that it exists. As I wrote on Twitter, it makes me feel like Deckard.

The Bad

  • Stability. See above, but, long story short, I’m not sure I can easily recommend that people dash out and install this on the first day. Even the early iOS 12 betas were stable enough that this was an easy choice. This year it’s not so clear. I hope I’m wrong.

The Ugly

  • Release schedule. What’s going on this year? iOS 13 is available on 19 September for the iPhone. But not at all for the iPad. For that you have to wait for iOS 13.1 at the end of the month (30 September). For the Watch, which is still closely tied to the iPhone, it’s out the same day as iOS 13. Unless it’s more than a couple of years old, in which case… at some later point. This is greatly preferable to releasing software before it’s ready, but see above about stability. It does seem that Apple bit off more than they could chew this year. Either it’s not been planned well and they’re just reacting or they’re not communicating well. I really hope it’s the latter.

There are some features that I wanted to mention but I’ve not actually used. The Reminders updates look good but I think the handover support from the Music app to the HomePod that I’m most excited by! And some things are probably true but I’ve not actually noticed, like the improved performance or reduced app sizes.

Overall, I think that has the potential to be a great release. There are some nice improvements. I just hope I’m wrong about the glitches.


  1. That Apple make them available for non-developers so early in the process is a rant for another time. ↩︎
  2. Answers on a postcard, please. ↩︎