July 26, 2024
Your relational database is good for it, really
I saw a tweet post on X the other week about using Postgres for everything, and it immediately made me go “YES, THAT”. So often, us engineers like to overcomplicate our setups. We get bored with the tools we have, and want to learn something new. Up...
ReadJuly 23, 2024
JSON data types in Postgres: json vs jsonb
Postgres provides two data types for storing JSON data: json
and jsonb
. Both validate the JSON before storing it, but they handle storage differently. The json
type stores data as a single text blob, preserving the...
July 19, 2024
Just use Postgres
When you’re starting a new project, one of the first things you do is pick a database. The common choices tend to be between MySQL, Postgres, and MongoDB. Sometimes, you’ll see Sqlite, or some more niche databases like InfluxDB. I’m here to tell...
ReadJuly 16, 2024
Using GIN indices for efficient queries on jsonb and array columns
PostgreSQL offers a rich variety of data types for your database columns, from the standard TEXT
, INT
, and TIMESTAMPTZ
to more complex types like JSON
, JSONB
, and arrays.
However, querying...
July 12, 2024
Using React Hook Form with auto-generated API types
Following my post on generating a type-safe API client from your Laravel API, I wanted to share how I then use those auto-generated request types not just for making requests, but also for ensuring my UI forms are valid. For working with forms in React,...
ReadJuly 9, 2024
Type-safe API calls with Laravel and TypeScript
Working at incident.io, I’ve really come to appreciate our auto-generated API client. Whenever we make changes to our API, we do so by making a change to the API spec (in Go), which is used to generate an OpenAPI spec, which in turn is used to generate...
ReadJune 28, 2024
Handling null bytes in JSON payloads with postgres
Throughout this post, I'll refer to UTF-8 codepoints, null bytes, and escape sequences. Here's what they mean:
A null byte is a byte representing nothingness. If you're inserting a null byte in code, you'll likely write \u0000
, or...
October 6, 2022
Why we wrote a Kubernetes operator to generate random strings
Earlier this week, I attended KubeHuddle in Edinburgh. Conferences always provide motivation through all the ideas you develop from conversations with people. In talking to various platform engineers at product companies, we realised that we need to...
Read![Automatically securing white-label sites with TLS using cert-manager cover image](/assets/img/white-label-tls-blog.webp?nf_resize=fit&w=800)
July 15, 2022
Automatically securing white-label sites with TLS using cert-manager
This article assumes working knowledge of Kubernetes basics like the Ingress
object and annotations.
Back in 2019, we launched a new offering for our customers - a “job list”. Quite literally a list of jobs for your company. It’s...
![Simplifying containers with Laravel Octane cover image](/assets/img/containers.jpeg?nf_resize=fit&w=800)
July 8, 2022
Simplifying containers with Laravel Octane
Containers are all the rage these days, but containerising PHP applications has always felt a bit… clunky. In the past, it’s been a choice between complex networking but efficient resource use (nginx + fpm), or idiomatic containerisation and resource...
ReadJuly 15, 2023
Improving type safety with real custom scalars in TypeScript
TypeScript’s type system is a bit loose, largely because it eventually has to compile down to JavaScript. One of the big limitations with its type system is that custom scalar types only act as...
ReadMay 4, 2023
How I expose local sites with a self-hosted tunnel
Recently, I've been working on slackbot side projects (Decisionlog and Summarizer). Being Slackbots, they need to be able to receive requests from Slack. So, in order to develop them, I need to be...
ReadMarch 19, 2023
Progressive permissions for Slack apps
With Slack's deprecation of its legacy Workspace Apps, the ability to interactively request further permissions was lost. However, you can still request an extend permission scope using your own...
ReadNovember 2, 2022
Join the modern era - deploy every day
When I hear someone say “we don’t release on Fridays so developers don’t have to work late”, I shudder. If you won’t release on a Friday, I’m guessing you’re not releasing one change at...
ReadOctober 18, 2022
You don’t need breaking changes
If you take a look at the API versions (which denote breaking changes) in the Stripe API upgrades documentation, you’ll see something remarkable – between August 2020 and August 2022, Stripe made...
ReadSeptember 7, 2022
Where's that domain managed from again?
If you manage a bunch of domains, you might have them across different registrars (supporting different TLDs) and different nameservers. To figure out the DNS provider you're managing a domain with...
Read