How to Structure a Python AWS Serverless Project
I haven't been able to find much guidance on how to structure larger AWS serverless projects in Python. What is the best way to share code between different lambdas? How to overcome module resolution issues when accessing code deployed as a layer from handlers? How to set things up so that Python tooling - language servers, type checkers and test runners - all work as expected?
Read more →Protocols and Composition in Python
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
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
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
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
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
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 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 →