Enjoy Newsletter #71.

A modern guide to SQL JOINs

Alexey Makhotkin writes an extensive guide to SQL JOINs with a markedly different approach from typical tutorials: teaching LEFT JOIN before INNER JOIN, and using only equality comparisons between two IDs in the ON condition while pushing all other filtering conditions into WHERE. He divides joins into three cases. The N:1 case, where the primary key sits on the right side of the ON condition, is the most useful because the number of result rows never exceeds the row count of the left table. The 1:N case is awkward and best avoided, while M:N is a source of subtle bugs. All examples use a small database with employee and payment tables, accompanied by live runnable queries on dbfiddle.uk.

The later sections explain INNER JOIN as a filtered Cartesian product, how to use self-joins to handle hierarchical data like manager relationships, and why Venn diagrams are a misleading visualization: they fail to show how rows get multiplied. He also argues that RIGHT JOIN is redundant, and thoroughly analyzes the double-counting bug that happens when chaining multiple LEFT JOINs followed by a GROUP BY, along with how to redesign the query to be both correct and fast. The overarching message: SQL is too permissive and won’t protect you from simple mistakes, so impose discipline on yourself when writing queries.

Punycode: My New Favorite Algorithm

Ian Duncan recounts his experience implementing Punycode from scratch in Haskell—the algorithm that enables internationalized domain names like bücher-café.de or 北京-旅游.cn to work on DNS, which only accepts ASCII letters, digits, and hyphens. The core idea is neat: keep the ASCII characters as they are, add a hyphen as a delimiter, and then encode the remaining characters in ascending order of their Unicode code points. Each character is represented by the distance (delta) from the previous character and its insertion position, written as a variable-length base-36 number. Because characters from the same script sit close together in the Unicode table, the delta is usually small, and sorting by code point means duplicate characters have a delta of zero and take only a single digit.

He devotes most of the post to explaining the rationale behind design choices that RFC 3492 prescribes without justification: base 36 is the largest case-insensitive base allowed by DNS; the bias parameter adapts after each character so the encoding threshold works well for both German and Chinese; and the damping mechanism and skew constant keep the bias from swinging too wildly. The post also compares Punycode against fixed-width encodings to show how inefficient they are, and closes with an interactive visualizer that walks through each encoding step across different scripts.

Evolution and Scale of Uber’s Delivery Search Platform

The Uber Eats team shares how they built a semantic search system so users can find stores, dishes, and grocery items even when queries contain synonyms, typos, or mixed languages. The model uses a two-tower architecture built on the Qwen LLM: query vectors are computed in real time, while document vectors are batch-computed for billions of candidates and indexed in Apache Lucene Plus. To balance quality and cost, the team experimented with three factors: the number of nearest neighbors k retrieved per shard, int7 versus float32 quantization, and vector dimensionality via Matryoshka Representation Learning (MRL). Reducing k from 1,200 to around 200 cut latency by 34% and CPU usage by 17%, while int7 quantization more than halved latency while keeping recall above 0.95. Regional and document-type filters run first to narrow the candidate set.

For reliability, the system automatically retrains the model and rebuilds the index every two weeks. Each index has two vector columns—blue and green—with configuration specifying which column is currently serving traffic, enabling safe updates and rollbacks. Every refresh must pass three validation checks: sufficient document count, zero byte-level changes to the currently serving column, and staging recall that is at least as good as production. At serving time, the service also cross-checks the model ID that generated the query vector against the model ID recorded in the index to catch misconfigurations.

16 API Gateway Concepts Every Software Engineer Should Know

Arslan Ahmad explains 16 key concepts behind an API Gateway, the component that serves as the single entry point into a microservices system. Instead of needing to know the address of every individual service, client applications call only the gateway, which routes requests by path, method, or headers. The gateway is also the natural place to handle cross-cutting concerns: authentication (validating JWTs and returning 401 if invalid), authorization (returning 403 when required roles are missing), rate limiting (returning 429 when thresholds are exceeded), and dynamic throttling based on service tiers or system load. Each concept comes with a concrete example, making it handy for beginners or anyone preparing for system design interviews.

The remaining concepts cover traffic splitting for gradual canary rollouts, request and response transformation for backward compatibility with legacy clients, caching, load balancing, circuit breakers to prevent cascading failures, timeouts, retries, and logging and monitoring. He concludes that the API Gateway is arguably the most strategic component in a distributed system—the place where security, resilience, performance, and operational observability converge.

How Reddit Migrated Comments Functionality from Python to Go

This ByteByteGo post summarizes how Reddit migrated its comments functionality from a monolithic Python service to Go microservices in 2024. Comments were chosen first because they represent the largest dataset and carry the highest write traffic. For reads, the team used a “tap compare” technique: a small fraction of traffic was routed to the Go service, which also called the legacy Python endpoint, compared the two responses, and logged discrepancies while still returning the Python result to users. Writes were much harder because every write had to simultaneously update Postgres, Memcached, and Redis (which stores CDC events that require 100% delivery), while comment IDs are unique and cannot be written twice to the production databases. The solution was “sister datastores”: three isolated datastores dedicated to the Go service whose contents could be compared against the production data written by Python.

The migration ran into several hurdles: data serialized differently between the two languages, Python’s ORM had implicit optimizations that caused hand-written Go queries to put unexpected pressure on Postgres, and race conditions when two users edited a comment simultaneously created false positives in the comparison logs. The final results were strong: all three write endpoints cut p99 latency in half, dropping from spikes of up to 15 seconds to a steady sub-100 milliseconds. Reddit chose Go over splitting into Python microservices for its superior concurrency model and because Go was already widely adopted across their infrastructure.

On Idempotency Keys

Gunnar Morling discusses idempotency keys, the mechanism that enables exactly-once processing in distributed systems even though exactly-once message delivery cannot be guaranteed. The receiver compares an incoming message’s key against previously processed keys to skip duplicates, and processing the message alongside storing the key must happen atomically, typically within the same database transaction. He examines three ways to generate keys. UUIDv4 is simple but forces the receiver to retain every key ever seen; UUIDv7 or ULID includes a timestamp component so older keys can be evicted. Monotonically increasing sequences let the receiver remember only the highest value, but complicate things for the sender under concurrent requests, since sequence generation must be serialized and can easily become a bottleneck.

The third approach derives keys from the sender database’s transaction log, a variant of the outbox pattern using CDC tools like Debezium. In Postgres, for example, the LSN position in the WAL increases monotonically and can serve as the key, provided events within the same transaction can be distinguished. He concludes that there is no silver bullet: UUIDs with a retention window are sufficient for many use cases, while monotonically increasing sequences derived from the transaction log become increasingly attractive as message volume grows, at the cost of added operational complexity.

No code reviews by default

Thomas Paul Mann, co-founder of Raycast, shares the company’s engineering culture: no mandatory code reviews. Engineers push changes straight to main and only request a review when they feel it’s needed. In his view, pull requests erode trust in a team that should operate on trust, don’t truly prevent bugs since many issues only surface after extended real-world use, and slow down momentum because code review is rarely anyone’s top priority. Instead, each engineer takes end-to-end ownership of their feature from initial idea through ongoing maintenance.

In practice, continuous integration builds and tests every commit, and the team ships daily internal releases so everyone can dogfood changes and give early feedback. Unfinished features are hidden behind feature flags. Engineers still open pull requests when touching unfamiliar parts of the codebase—such as adding a database migration for the first time—or simply ping a teammate to take a look after committing. His closing advice: don’t follow “best practices” dogmatically; set rules that fit your own team’s context.

Estimates – a necessary evil?

Erik Thorsell, who has worked as both a software developer and a product owner (PO), analyzes why time estimates are a constant source of tension between the two roles. POs need estimates to prioritize the backlog and weigh a big, eagerly awaited feature against several smaller ones when a release date has already been announced—and things get even messier when multiple POs have to coordinate on the same product. Developers, on the other hand, hate estimates because they’re asked to predict unforeseeable problems. He argues that technical debt is the primary source of conflict: a task expected to take two days can drag on for weeks when it hits legacy code, while a less technical PO struggles to see the cost of ignoring it.

The problem gets worse when estimates are treated as deadlines. His team became noticeably more cautious and started padding every estimate with buffer time, turning estimates into “guardrails” to avoid being blamed for unrealistic expectations. Still, many deadlines exist for legitimate business reasons, so everyone has to play the estimation game. DevOps flow concepts don’t directly solve this, but they do reduce the risk of shipping software. His takeaway: POs are under pressure too, and the best way to help them is to continuously communicate progress and obstacles along the way.


This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.