Keeping track of my book recommendations

I have a text file where I write down every book recommendation I receive. It has three lists:

  1. Personal recommendations. Anything recommended specifically to me – usually from somebody who knows my reading tastes, so there’s a good chance this will be a book I enjoy.

  2. General recommendations from friends. Any recommendations from somebody I trust, but not specifically to me – for example, somebody tweeting “I really enjoyed this book and you should all read it”. I enjoy a lot of the same books as my friends, but this is a softer recommendation. I feel less obliged to follow up on these.

  3. Everything else. Recommendations from retweets, strangers at parties, people I don’t know very well, stuff I saw while browsing in Waterstones, and so on. These are mostly valuable in the aggregate – a single recommendation for a book isn’t very useful, but knowing that six different people recommended it might be.

I’ve tried slicing in other ways – fiction and non-fiction, by author, genre, date, and so on – but sorting by quality of recommendation is the one that I keep going back to.

A lot of what I read comes from these lists. (I have similar lists for films and TV shows.) I’m not bound by the list, and a bit of spontaneity is helpful to avoid an echo chamber effect – but using it as a starting point means I know I’m likely to enjoy something before I pick it up.

As a bonus, having this list means that if I read something and enjoy it, I get to go back and thank the person who gave me the recommendation. Sometimes it’s years later, but better late than never!

David has been thinking a lot about reading on Twitter recently, and I wrote about my system in a reply. This blog post is the expanded version of that thought.

My visit to the Aberdulais Falls

In September, I was in Cardiff to help organise PyCon UK. I had a huge amount of fun at the conference, but running a five-day event gets quite tiring. This year I took a few days of extra holiday, so I could unwind before returning home. Unfortunately heavy storms kept me inside for several days, but I did venture out at the end of the week to the Aberdulais Falls.

Aberdulais is a village in south Wales, about 45 minutes drive from Cardiff, and a place with a long industrial history. It had easy supplies of coal and wood, and it sits atop a powerful river – the River Dulais. Today the former tin plate works are owned and managed by the National Trust, and I decided to go have a look.

Etymology note: the word Aberdulais is Welsh for mouth of the river Dulais. Aber is a Celtic prefix that appears in lots of place names. Well-known examples are places like Aberdeen and Aberystwyth.

In 1584, German engineer Ulrich Frosse had developed a new way to smelt copper, but he wanted to keep his process safe from “pryinge eyes”. The Welsh countryside is nice and quiet, so he set up a smelting works in Aberdulais – the first of its kind in Wales. The copper ore was mined in Cornwall, the coal and charcoal supplied from nearby Neath, and a waterwheel on the river powered the site. (If you’re interested, I found an 1880 lecture that gives more detail about the history of smelting in Wales.)

A sixteenth-century woodcut of copper smelting. Taken from Wikimedia Commons; public domain.

The National Trust site says the copper was used in coins minted for Queen Elizabeth I. I tried to find some pictures of the coins in question, but I couldn’t find not enough detail to pick them out. Based on dates, I think it would have been something like this gold pound, but that’s only a guess.

Over time, Aberdulais became a site of different industries – textile milling, cloth production, even a flour mill – then in 1831, it became the site of a tinplate works. Tin plating is the process of coating thin sheets of iron or steel with tin, so they don’t rust. Tin plate is used for things like cooking utensils and canned food, and versions of it are still in use today. Wales had an incredibly successful tin plating industry – so much so that the US slapped massive tariffs on it, and shut the whole thing down.

The National Trust site is based in the remains of one of the old tin plating works.

So what’s it like to visit?

Read more →

Finding SNS topics without any subscriptions

I make regular use of Amazon SNS when working with message queues in AWS.

SNS is a notification service. A user can send a notification to a topic. Each topic can have multiple subscribers, which receive a copy of every message sent to the topic – something like an HTTP endpoint, an email address, or an Amazon SQS queue. Sending a single notification can go to multiple places.

A common use case is something like push notifications on your phone. For example, when a game sends you a notification to tell you about new content – that could be powered by SNS.

We use SNS as an intermediary for SQS at work. Rather than sending a message directly to a queue, we send messages to an SNS topic, and the queue subscribes to the topic. Usually there’s a 1-to-1 relationship between topics and queues, but SNS is useful if we ever want to do some debugging or monitoring. We can create a second subscription to the topic, get a copy of the messages, and inspect them without breaking the original queue.

We’ve had a few bugs recently where the subscription between the SNS topic and SQS queue gets broken. When nothing subscribes to a topic, any notifications it receives are silently discarded – because there’s nowhere for them to be sent.

I wanted a way to detect if this had happened – do we have any topics without any subscribers?

You can see this information in the console, but it’s a little cumbersome. Anything more than a handful of topics becomes unwieldy, so I wrote a script. Normally I’d reach for Python, but I’m trying to learn some new languages, so I decided to write it in Go. I’ve only dabbled in Go, and this was a chance to write a useful program and test my Go skills.

In this post, I’ll explain how I wrote the script. Even if the Go isn’t very idiomatic, I hope it’s a useful insight into how I write this sort of thing, and what I’m learning as a Go novice.

Read more →

How do you hide a coin for 400 years?

As part of an upcoming blog post, I’ve been trawling the Internet for information about Elizabethan coins. Mostly for curiosity, as I know very little about old coins. Something I’ve learnt: historical coins are valuable. Five-figure prices aren’t unheard of, and I found one coin selling for nearly £100k:

A Triple Unite from the Oxford mint, a gold coin produced for Charles I in 1642. It was worth sixty shillings.

Which got me thinking: suppose you were an unscrupulous time traveller, and you wanted to make some extra cash. Going back in time, getting some coins, and then “discovering” them in the present day could be quite lucrative. But how do you do it in practice?

You can’t just bring the coins straight to the present. They’d be in much better condition than a coin that actually waited for 400 years, and carbon dating would be thrown off. Your coins would be derided as fakes, or at least prompt some tricky questions. You need to hide them somewhere in the past, and retrieve them in the present.

But where do you leave a seventeenth century coin so it’s still safe in 2018?

It’s certainly possible, if expensive – the Tower of London have been looking after the same jewels for centuries. But I don’t think it’s trivial, at least not without attracting some attention. It’s very tricky if you don’t have outside help. And the further back you go, the harder it becomes – imagine trying to save not coins, but dinosaur bones.

I wrote this as a late night musing, but while sleeping I realised it’s not just a theoretical problem. Nuclear power creates nuclear waste, and that waste has to go somewhere. Most plans involve putting it in a bunker, and sealing the bunker for at least 10,000 years – but how do you stop future humans exploring? How do you ensure nobody opens your radioactive death bunker?

Suggestions on the back of a postcard.

How to set the clock on a Horstmann Electronic 7 water heater

The clocks went back last night, which means changing the clock on my appliances. One of my few remaining appliances that has a clock but no Internet connection is the timer on my boiler. It’s a new boiler (I moved in June), so I’ve never had to set the clock on it before.

It turns out it selected the correct winter/summer setting itself, but it’s drifted by twenty minutes, so I decided to set it anyway.

This is the timer on my boiler:

My boiler is in a utility cupboard next to my front door. When I turn on the hot water boost, I put the post-it note on the cupboard door, so I don’t leave it on when I go out.

The name on the bottom right says “Horstmann Electronic 7”, so I did the obvious thing and googled “set clock horstmann electronic 7 boiler”.

It took me several minutes to find the answer – in the user guide for the timer – so for the sake of future!me and other Googlers, here are the instructions for setting the clock. Unless you have this exact appliance, you can stop reading.

Read more →

Custom 404 responses in Finatra

This post is a quick writeup of a problem I had to solve at work today. I’m writing it so I can find the information later, but if you don’t use Finatra, it’s unlikely to be of much interest.


The Catalogue API we’ve built at Wellcome is a Finatra app. It usually returns JSON responses, including for errors – we have a custom error model. A few simplified examples:

$curl ""
  "type": "ResultList",
  "results": [
      "id":  "bqzs9649",
      "title":  "A discourse of fish and fish-ponds, by the Hon. Roger North."

$curl ""
  "id":  "bqzs9649",
  "title":  "A discourse of fish and fish-ponds, by the Hon. Roger North."

$curl ""
  "errorType": "http",
  "httpStatus": 404,
  "label": "Not Found",
  "description": "Work not found for identifier doesnotexist",
  "type": "Error"

The Finatra app is listening for the endpoint /catalogue/v2/works/:id. We’ve written a function that handles all requests to that endpoint, and inside that function, we can return our custom error model if the ID doesn’t exist.

What if you look at a different endpoint?

Over the weekend, I was poking around, and discovered that requests to unhandled endpoints would return an empty 404. For example:

$curl ""
<404 response with an empty body>

We’d rather this endpoint returned instances of our custom error model. It took me a while to figure out how to do this – the Finatra docs weren’t so helpful – so I’m going to write down how I got it working.

You can see the pull request and tests on our public repo, but I’ll use an example app in this post to make it easier to follow.

Read more →

Open consultation on the Gender Recognition Act

In July, the UK Government launched a consultation on reforming the Gender Recognition Act 2004.

This is the law that lets people change their legal gender, but the current process isn’t as good as it could be. It’s complicated, slow, and expensive – and completely ignores non-binary people and anybody under 18. If you’re married, you can’t change your legal gender without permission from your spouse. This consultation is an opportunity to improve the process!

There’s a good overview of the current issues on GenderBen, and the consultation itself also includes lots of detail.

You can fill in the consultation on the Government website:

Open consultation: Reform of the Gender Recognition Act 2004 – GOV.UK

If you live in the UK and you haven’t already, please consider taking the time to respond. Tell the Government that you support trans rights, and that legal protection shouldn’t require such excessive gatekeeping hoops. There’s probably going to be a strong transphobic response (such as from the protestors at London Pride), so countering that with positive responses from trans allies is very welcome!

It took me about 30 minutes to finish. If you can’t finish it in one go, you can save your progress and come back to it later – but don’t delay! The consultation closes at 11pm on 19 October, in just over a week.

Content warnings

Content warning in the first section for sexual assault and rape – description of a graphic image, and discussion of recent US politics. If those topics are upsetting for you, consider skipping.

There’s a cartoon of Lady Justice going around Twitter. I won’t link to it here, but it shows her being pinned down, and the implication is that she’s about to be (or being) raped. The cartoon is about this week’s confirmation hearings for Brett Kavanaugh. It’s in part a reference to specific events described in Christine Blasey Ford’s testimony, in part the Republican decision to ignore her testimony and advance his nomination anyway.

In a week where many survivors/victims of sexual assault and rape have been forced to relive traumatic experiences, this cartoon makes me deeply uncomfortable. It touches an already raw nerve, especially when shared without content warnings.

What’s a content warning?

A content warning is a note about potentially sensitive topics – something a reader might find upsetting or traumatic. Just as you’d warn about a risk to somebody’s physical health, so you can warn about something that might affect their mental health. With a warning, a reader can make sure they’re prepared (and safe) to read the content, or choose to skip over it.

There’s an example at the top of this post. When characters are limited, like on Twitter, it’s sometimes shortened to “CW”. Here’s another example:

CW death

*talks about death, links to a news article that mentions death*

Here’s a list of common topics I try to warn for:

I might include an extra warning, or be more specific, if I know more detail about somebody in my audience. For example, several of my friends have traumas around parental death, so I’ll use a more specific content warning when appropriate. In general, more detail is usually better (as long as the warning itself doesn’t become upsetting!).

If you’re writing or talking about topics that some people could find distressing, I’d encourage you to learn about content warnings, and use them!

(This post is an expanded version of a Twitter thread.)

Assume worst intent (designing against the abusive ex)

This is a talk I gave last Sunday at PyCon UK 2018.

Gail Ollis invited me to give a talk about online harassment in April, based on my talk about privilege and inclusion at the previous year’s conference. We were chatting afterwards, and I realised with a bit of tidying, I could reuse it. This is a refined and shortened (and hopefully better!) version of the April talk.

Here’s the abstract:

Apps and services often build features with good intent, trying to improve interactivity or connections between our users. But what if one of your users has a stalker, or an abusive ex? You may have given them another way to hurt or harass your user.

This session will help you identify common threat models – who is at most at-risk, and who is a threat to your most vulnerable users. Then we’ll look at some good practices that improve the safety of your users, and how to design with these risks in mind. There’s no silver bullet that totally eliminates risk, but you can make design decisions that give more control and safety to your users.

The talk was recorded, and you can watch it on YouTube:

You can read the slides and transcript on this page, or download the slides as a PDF. The transcript is based on the captions on the YouTube video, with some light tweaking and editorial notes where required.

Read more →

Building trust in an age of suspicious minds

This is a talk I gave on Saturday as the opening keynote of PyCon UK 2018.

I was already planning to do a talk about online harassment, and Daniele, the conference director, encouraged me to expand the idea, and turn it into a talk about positive behaviour. This is my abstract:

In 2018, trust is at a low. Over the past several decades, trust has declined – fewer and fewer people trust each other, and the reputation of big institutions (government, media, politicians, even non-profits) is in tatters.

What happened?

In this talk, I’ll explain how the design of certain systems have been exploited for abuse, and this has corroded our trust – and conversely, how we can build environments that encourage and sustain good behaviour.

The talk was recorded, and thanks to the wizardry of Tim Williams, it was on YouTube within a day:

You can read the slides and transcript on this page, or download the slides as a PDF. The transcript is based on the captions on the YouTube video, with some light editing and editorial notes where required.

Read more →