I'm Michael Tandy. Until recently I was a PhD student at the University of Warwick. Now I'm a software developer for online grocery delivery company Ocado. You can check out my Wikipedia contributions and Wikimedia Commons contributions. I've got a Facebook profile, a LinkedIn profile, and a GitHub account. Looking for rail industry direction sensors? Check out Direction Detection. Want to get in touch? website@mjt.me.uk

Recent Posts

Getting prism.js to work with Jekyll from a CDN

Posted on 16 Jul 2016

One option to syntax-highlight some code in a web page is prism.js. I use it in some posts on this blog. It's fairly simple to set up - but there's a trick to getting it to work from a CDN. When you download prism.js from the project website, a configuration tool lets you choose the languages you want included, then gives you a prism.js with only those languages included. Importing support for the language you...

Read more...

Making an ubuntu box that's only on in business hours

Posted on 16 Jun 2016

So you've got an ubuntu box you want on during business hours, but you don't need it on outside business hours. Maybe it's a build server or something similar. Obviously, you could manually start it every morning - but you might be ill or go on holiday. Let's automate it with wake-on-RTC! The instructions below are for Ubuntu 14.04. First of all, create this file at /root/weekday-restart.sh (I use sudo pico /root/weekday-restart.sh but you can...

Read more...

Certificate Transparency and the Certificate Authority Death Penalty

Posted on 23 Mar 2016

Certificate Transparency (CT) is a proposal that, when a certificate authority issues a certificate, they should log the details in a public, append-only log. This allows mis-issued certificates to be spotted by site owners - and hopefully revoked in short order. Browsers, when they know to expect a CT entry, can reject a certificate as fraudulent if the expected CT entry is missing. But CT will have two other interesting effects I haven't heard mentioned...

Read more...

Some software design principles I've found useful, that you might find useful too

Posted on 22 Feb 2016

Here are some subjective opinions I've developed on software design - I'm "putting them out there" to see what other people think of them, and to explain to people who hear my opinions the thinking behind them. Even the greatest dependencies can go down. When you depend on another system, you should ask what you'll do if that system goes down. If anyone tells you "it will never go down", they probably don't know what...

Read more...

The smallest 256x256 single-color PNG file, and where you've seen it

Posted on 24 Oct 2015

Do you recognise these images? There's a good chance you've seen some of them before now, probably several times. Here's a hint: They all depict the same thing. 103 bytes 156 bytes 178 bytes 379 bytes 921 bytes 1,189 bytes They all look pretty similar - so why the size difference? A quick intro to PNG The basic PNG file is comprised of recurring chunks. Each chunk is comprised of four parts: Length of the...

Read more...

Contraction Hierarchies path finding algorithm, illustrated using three.js

Posted on 12 Jun 2015

Have you ever wondered how Google Maps can calculate driving directions so fast? Google can calculate driving directions in 100-500 milliseconds, whereas back in 1990s it took my father's 386sx about 30 minutes to calculate such a route. If you've done much programming, you probably already know the basics of this. Road maps can be represented, in the jargon, as "graphs", where junctions are "nodes" and roads between junctions are "edges" and the time taken...

Read more...

Fake £2 coin

Posted on 19 Dec 2014

A few months ago I was handed some change which I didn't look at closely. Later, I realised I'd been given a fake £2 coin. I searched online and found lots of press coverage about fake £1 coins, but not much about the £2 coin. So here are some pictures! As you can see, the fake is a slightly different colour and the detail is a lot less clear: The fake coin bimetallic - the...

Read more...

Kibana Log Searching 101

Posted on 23 Nov 2014

So someone has just given you access to Kibana and you're having trouble answering the kind of questions you could have answered easily with a sql- or grep-based system. Hopefully this cheat sheet will help get you started! How do I do a basic search? The 'query' box works a bit Google: unstructured text search, with some special commands, and if you get the command syntax wrong it just does an unstructured text search. Unlike...

Read more...

Dirty Pcbs first trial board

Posted on 14 May 2014

After I saw Dirty PCBs on HN I decided to place a test order. I chose a 50mm x 50mm board and paid $12. I placed the order on the 13th April; the boards were reported as shipped on the 30th April, and they reached me (in the UK) the 14th May. Dirty boards tell me there was a hiccup at the board house, as they moved locations, so their normal turnaround time may be...

Read more...

Amazon collection locker

Posted on 06 Apr 2014

I tried collecting some stuff from an Amazon locker, to see what the customer experience is like. The locker address is presented as a normal delivery address in your address book. When your item is available, you get an SMS: "Hello. Your parcel with (Item Name Which May Be Truncated) was delivered to Amazon Locker. Use pickup code: ABCD1A for this parcel" The message arrived quite quickly - I assume the locker triggers sending the...

Read more...

website@mjt.me.uk · Home · Archive · Tags