Technical
314 articles · all categories
9 articles from 2022 · show all
November 2022
Reader question: useReducer or XState?
Following up from my article about XState and Stately.ai, fellow reader S. asked if `useReducer` could ever be relevant when using state machines in React code. Yes! Here's how
When your brain is breaking, try Stately.ai
Two years ago I wrote about using XState after building a UI interaction so twisted my brain leaked out my ears. It helped. Now the creators have made something even better – Stately.ai 😍
October 2022
Over-engineering tweet embeds with web components for fun and privacy
A way to embed tweets in static sites with full pre-renders and live updates using just 9kB of client-side JavaScript, 2 HTTP requests, and full reader privacy ✌️
September 2022
useCallback is a code smell
One of my favorite ways to simplify and de-gotcha React code is to rip out all the useCallback and useMemo drama. 90% of the time you don't need it.
August 2022
Your code doesn't matter
"Your code doesn't matter" is something experienced programmers say, between the lines, when they sound like complete lunatics. But what do they mean? Why does everyone say it?
April 2022
Promise.allSettled, a wonderful tool for resilient code
The pros and cons of different approaches to writing resilient code that handles partial failures
March 2022
Saving time in UTC doesn't work and offsets aren't enough
Lessons from a painful outage with timezones, UTC offsets, and database clients that took a whole week to resolve.
A quick lesson in writing resilient code
On the backend anything can and will fail. How do you deal with that?
February 2022
A new VSCode extension makes state machines shine on a team
When you grok state machines, a new world of computational beauty and software design opens in front of your eyes. Things that used to be hard become easy. The impossible becomes possible. And you turn into that annoying team member.