August 26, 2024
Scheduling posts on a static site
My blog is a static website, built using Jigsaw, and deployed onto Netlify. Recently, I’ve started publishing a lot more posts. However, I don’t write these posts at exactly that cadence. Instead, I tend to write my blog posts when I get motivated,...
ReadAugust 9, 2024
Lock propagation in Postgres
We recently encountered the error Deadlock detected (SQLSTATE 40P01)
in some of our code at work, and it took us ages to figure out what had gone wrong. I’m writing this to share the non-obvious ways in which postgres can lock a row for...
August 6, 2024
Keeping technical debt at bay
Technical debt is just a fact of life. Over time, it can feel inevitable that our codebase degrades. But it doesn’t have to be that way. Yes, you will have technical debt, but you don’t need to let it grow out of control. Once you’ve paid down the...
ReadAugust 2, 2024
Accurate estimations in software engineering
One of the hardest problems in software engineering is estimating the effort of a project. We often throw around the advice of “just double whatever you think it’ll be”. And sure, that might work, but it won’t ever make you better at estimating....
ReadJuly 30, 2024
Effectively tackling technical debt
Every company grapples with “technical debt”. This debt accrues when quick, easy solutions are chosen over more robust, time-consuming ones. While these shortcuts help meet deadlines, they can also lead to messier and harder to maintain code. Over...
ReadJuly 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,...
Read