Protocols and Composition in Python

Protocols and Composition in Python Cover Image

It's a source of heartbreak and distress for me when instrumentation-related side-effects (like logging, metrics, tracing, retrying logic, error handling, etc.) begin making their way inside the business logic layer of an application. If only there was a way to overlay instrumentation on top of business logic without touching it directly... It would be even better if we could keep the various instrumentation concerns separate from one another, while we're at it...

Read more →

Paging DynamoDB queries with TypeScript generators

Paging DynamoDB queries with TypeScript generators Cover Image

When working with DynamoDB's query API we have to consider that the results might be paged. Here's one approach to page through the results - using JavaScript/TypeScript generators.

Read more →

Let's Build a GraphQL Server in Go, Part 2: Dataloaders

Let's Build a GraphQL Server in Go, Part 2: Dataloaders Cover Image

This is the second in a series of posts covering the process of building a simple yet full featured GraphQL server in Go. In this post we will focus on implementing dataloaders to improve the performance of the server.

Read more →

Let's Build a GraphQL Server in Go, Part 1

Let's Build a GraphQL Server in Go, Part 1 Cover Image

This is the first in a series of posts covering the process of building a simple yet full featured GraphQL server in Go. In this post we will use gqlgen and sqlc to build a working GraphQL server backed by a PostgreSQL database, and capable of performing basic CRUD operations.

Read more →

Random Ticker in Go

Random Ticker in Go Cover Image

I'm writing something like a scraper, and I want this program to be able to send requests every x seconds, at a slightly different interval every time. How to accomplish this idiomatically in Go?

Read more →

How to build a multilingual website in Next.js

How to build a multilingual website in Next.js Cover Image

It used to be challenging to build multilingual websites in Next.js, but things have greatly improved with introduction of Next 9. In this blog post I'm sharing my ideas on how to implement multi-language support (with locale subpaths, etc.) in Next.js by taking advantage of the framework's newly introduced APIs, while trying to keep things as simple as possible.

Read more →

Next.js, useRouter hook, and testing

A quick tip on how to test Next.js components which utilize the useRouter hook.

Read more →

Google ReCaptcha V3 in React, using TypeScript

Google ReCaptcha V3 in React, using TypeScript Cover Image

Google has recently released a new version of ReCaptcha. It no longer requires any end-user interaction, so it's arguably an improvement over the frequently annoying V2 version. This is a quick tutorial on how to use it in a React app.

Read more →