Luke Hansford

What I'm working on

This is a running record of things I work on each day where I feel like I learned something new or I'm a little bit proud of it. Inspired by Julia Evans' post Get your work recognized: write a brag document.

Requiring 3DS in Stripe

This was a pretty basic change to require 3DS on all transactions in our app. The main benefit I got from it was a reminder of the utility of good developer documentation (Stripe are the masters).

Enable preview mode in Contentful

At work we've been using Contentful for a couple of years now. I personally love it, but one of the downsides is no out of the box previewing of your content (it's headless, so it makes sense). I took a bit of time (not much really!) today to set up the preview mode in our app, more or less following this guide.

Elasticsearch aggregations

I wrote an Elasticsearch query today that leaned into using Aggregations. I'm not sure if it's the most efficient approach to solving the problem I had (updating the indices to contain some aggregated info might work better), but it was certainly interesting learning about how it worked.

Cloudfront geolocation headers

AWS Cloudfront allows you to extend request headers with a number of attributes, including geolocation data like the City and Country a user is making the request from. It was relatively simple to set this up on the Cloudfront side of things, but I had to do a little work to transfer the values down to our client-side app where we would actually be using them. I managed this by basically transforming the headers into cookies on the server-side.


I used the prefers-reduced-motion CSS feature for the first time today. The use case was for a card loading state with a pretty standard "shimmer" effect as the card loads. When the user has a preference set for reduce motion it just displays as a plain gray background instead.

A big shout out to Tailwind for making this super-easy to incorporate.

Datadog notebooks

I use Datadog pretty heavily in my day job, but today I tried out the Notebooks feature for the first time. I'm currently using it to document a few optimisation projects I'm working, so I can write notes about my findings, display a graph with supporting metrics, make some changes, then repeat the process based on the changes made.

Contentful apps

I've been learning about the Contentful App Framework with the intent of enabling our Content team to pull data from an external API into their Blog posts, etc. I'll probably write a blog post on this at some point so I won't go into too much detail here :)

Chrome extensions

I wrote a Chrome extension that allows my team to easily toggle feature flags in the app we work on. I've worked on a Firefox extension recently, and I would say it was a little frustrating that the APIs are similar but not the same, but otherwise it was a pretty smooth process. Publishing was okay, but they could do with a better process for publishing private extensions.