Enjoy Newsletter #89.

Hybrid Quota-Linear Rate Limiter

Tony Finch points out an underappreciated quirk of linear rate limiters like the leaky bucket or GCRA: they are slow to clamp down on clients that exceed the limit only modestly. Given a quota of q requests per time window w, a client sending requests at a times the allowed rate can still get roughly q*a/(a-1) requests through before being blocked—double the quota when a=2. The reason is that the bucket starts full of tokens and continuously refills another quota’s worth over the first window. Fixed-window quota-reset limiters enforce a stricter cap, but they use more memory and encourage clients to dump traffic in bursts at window boundaries.

The author proposes a hybrid algorithm with two modes: a bursty mode for low-volume clients, which allows bursts but refills at most one quota per window; and a smooth mode for heavy clients, which starts with an empty bucket (plus a negative penalty) and forces requests to be paced evenly. The limiter switches to smooth mode when a client drains its last token, and returns to bursty mode once the bucket recovers a full quota. The behavior matches running a quota-reset limiter and a linear limiter side by side, while using less memory. Even so, the author advises against actually using it: a linear rate limiter only looks “too generous” if you ignore the fact that the client was idle during the previous window. It is better to reframe the requirement and stick with a simple linear limiter like GCRA, which naturally rewards steady traffic.

Go is the Best Language for AI Agents

Burak Karakan, who has worked professionally with Go for eight years and is building Bruin—an open-source ETL tool written in Go—argues that Go is the best language for coding with AI agents. First, Go is compiled: agents generate lots of plausible-looking code, and a fast compiler with static types lets the agent iterate in a tight loop until entire classes of type and argument errors are eliminated. Compared with Rust, Go has simpler syntax and concepts, compiles faster for a tighter feedback loop, and has a larger corpus of existing code. That simplicity also makes it easy for humans to review diffs and spot when an agent is heading down a strange design path.

Go is also strongly opinionated: there is one standard way to run tests, format code, and build binaries, so an agent can just invoke gofmt instead of wrestling with the toolchain sprawl common in JavaScript. Easy cross-compilation lets agents verify builds across operating systems after every change (even if running the tests still requires the target environment or an emulator)—a major advantage when running background agents inside sandboxes whose environment you don’t fully control. In the author’s experience, agents write working Go on the first try roughly 95% of the time—not because there is more training data than for Python, but because Go usually has one obvious way to do things. He acknowledges this is anecdotal and may matter less as models improve.

Your Agent Needs a Harness, Not a Framework

Dan Farrelly from Inngest argues that AI agents need a “harness,” not a framework. Across engineering disciplines, a harness connects, protects, and coordinates components without doing their job for them—like a wiring harness linking an engine to sensors, or a climbing harness catching you when you fall. For an agent, the LLM is the engine, tools are peripherals, and memory is storage; what you need around them is something that handles an LLM timing out on loop iteration five or two user messages colliding. Agent frameworks keep reinventing retries, state persistence, queues, and event routing from scratch, when durable event-driven infrastructure already solves those problems: every LLM or tool call becomes an independently retryable “step,” so if a process crashes on iteration five, the first four iterations are already checkpointed.

To prove the point, the team built Utah (Universally Triggered Agent Harness)—a conversational agent over Telegram or Slack with tools, memory, sub-agent delegation via step.invoke(), and fault tolerance, written in compact TypeScript with no agent framework, just Inngest functions, steps, and events wrapped around a think → act → observe loop. Their biggest lesson: context management is the real challenge, because bloated tool outputs disorient the model and send it into endless tool-calling loops. They solved this with two-tier pruning of old tool outputs, session history compaction, warnings as the step budget runs low, and automatic re-compaction on context-window overflow errors.

An Interactive Intro to Quadtrees

This interactive guide explains quadtrees—a spatial data structure for fast two-dimensional queries, inspired by seeing Uber use spatial indexing in system design write-ups. In a mapping app with millions of places, the naive approach to finding nearby points is computing the distance from the user to every single location, costing millions of operations per query. A quadtree reorganizes space itself: it splits a rectangular region into four quadrants, and whenever a quadrant exceeds its point capacity, it subdivides again. Dense areas get finely divided while sparse areas stay coarse, so looking up a point simply walks down the tree, eliminating three-quarters of the remaining space at each level—roughly 10 steps for a million points.

The capacity parameter shapes the tree: a low capacity builds a deeper tree that prunes more aggressively but uses more memory; a high capacity builds a shallower tree where leaf nodes scan more points linearly, with 4 to 16 being a good starting range. Range queries only descend into nodes whose bounding boxes intersect the search region, pruning entire subtrees at once; nearest-neighbor search tracks the best distance found so far to prune increasingly aggressively. Beyond geospatial search, quadtrees power broad-phase collision detection in games—avoiding pairwise checks between distant objects—and region-based image compression, where uniform areas are stored as large blocks and detailed regions are subdivided.

Agentic Engineering Patterns

Simon Willison has launched a guide to patterns for getting the most out of coding agents like Claude Code and OpenAI Codex. He draws a sharp line between “agentic engineering” and “vibe coding”: vibe coding means letting an LLM write code without paying attention to the code itself, whereas agentic engineering is professional engineers using agents to amplify their existing expertise rather than replace it. The guide is organized into sections covering core principles, working with coding agents (how they work, using Git, sub-agents), testing and quality assurance, understanding codebases through linear walkthroughs and interactive explanations, annotated prompts, and an appendix of prompts he uses regularly.

A few standout patterns: “Writing code is cheap now”—the cost of generating code has dropped to near zero, but good code with tests, documentation, and proper error handling still takes discipline, requiring new habits; “Hoard things you know how to do”—maintain a collection of working examples you can recombine and feed to agents as reference input; and “Red/green TDD”—have the agent write a failing test first and verify it fails before implementing the fix, along with running the test suite right at the start of every session. The guide also calls out anti-patterns to avoid—most notably filing unreviewed agent-generated pull requests for teammates to review—and continues to grow with new chapters.

Things I Miss About Spring Boot After Switching to Go

After spending a year and a half building production Java and Spring Boot systems at a startup and then switching to Go, Sushant Dhiman reflects on what he misses from the Spring ecosystem. First is the “batteries included” philosophy: Spring Boot ships with nearly everything needed for production out of the box, whereas Go favors minimalism and a collection of small libraries over a monolithic framework. Specifically, he misses declarative dependency injection via annotations like @Service and @Autowired; in Go you wire dependencies manually through constructors—explicit, but startup code balloons once a service has hundreds of dependencies. Similarly, declarative validation with @NotNull or @Email avoids chains of manual if/else checks and regexes.

Spring’s mature ecosystem is another big loss: Spring Security handles JWT, OAuth, and form logins out of the box; Spring Data derives queries directly from method names like findByEmail; Spring Boot Actuator exposes health checks and metrics with a few lines of configuration; and Spring Cloud provides a full toolkit for microservices. Still, the author is fair to Go: it gives you complete control and transparency over SQL queries, which is much easier to debug than complex multi-table ORM joins. Go also wins on operational simplicity—compiling to a single static binary with no JVM or garbage-collector tuning, near-instant startup, and first-class concurrency built right into the language.

Design-First Collaboration with AI

Writing on martinfowler.com, Rahul Garg diagnoses the “Implementation Trap” when working with AI coding assistants: AI generates code so fast that the natural pause between design thinking and coding disappears. The AI still makes design decisions about scope, component boundaries, data flow, and error handling, but buries them quietly inside the implementation. Reviewers have to evaluate too many concerns at once and easily miss flaws, even though fixing a misunderstanding at the design stage is far cheaper than after code is written. Worse, AI assistants routinely slip in unrequested features—what the author calls “technical debt injection.”

His solution is to recreate the whiteboard design session across five progressive levels of abstraction: Capabilities (core requirements), Components (building blocks), Interactions (data flow and communication), Contracts (function signatures, types, interfaces), and finally Implementation. The golden rule is no production code until Level 5 is approved. In a notification-service example, reviewing at the Components level let the author scrap an unnecessary RetryQueue class because BullMQ already handles retries; and once Contracts are agreed upon, the AI can write tests before writing the implementation. Not every task needs all five levels: a simple utility can start at Level 4, while a multi-component feature starts at Level 1. The process takes more upfront time and isn’t worth it for throwaway tasks, but pays off handsomely for complex, long-lived features.

The Two Kinds of Error

Evan Hahn divides software errors into two categories. Expected errors happen during normal operation and aren’t bugs in the program: invalid user input, flaky networks, missing file permissions. These are recoverable—you shouldn’t throw, raise, or panic, but instead return an explicit error value (like a Result type) that forces the caller to handle it, logging at WARN or INFO at most. Unexpected errors should never happen—failed assertions, logic bugs, corrupt data from a database you control—and indicate a bug in the code. Rather than limping along, the program should crash immediately and log at ERROR or FATAL; crashing is annoying in the moment, the author argues, but makes software far more reliable over time.

Where the boundary falls depends on context: in a quick prototype or one-off script, almost every error can be treated as unexpected; in flight software for a 50-year deep-space probe, almost every error—including hardware faults—must be treated as expected. Making software more reliable generally means moving more errors from the unexpected column into the expected one. He also notes that languages like Rust and Zig nudge developers to treat many errors as expected, whereas JavaScript and Python do the opposite, and he prefers stricter compiler enforcement for production systems.

Secure Go Error Handling Best Practices

This post on the JetBrains GoLand blog focuses on the security side of error handling in Go. Because Go errors are plain values rather than exceptions, letting them bubble up and return directly to clients can easily leak file paths, SQL queries, credentials, or stack traces. The first rule is a strict separation between what the system sees and what the user sees: define a custom error type carrying both an internal cause and a public message, where Error() returns only the safe message while technical details go exclusively to internal logs. Next, instead of logging entire request structs that might contain passwords, use a builder or helper that whitelists safe metadata fields; and when you don’t want callers inspecting the underlying cause via errors.Is or errors.As, wrap errors opaquely rather than using fmt.Errorf with %w.

As errors cross architectural boundaries, control them at three levels: between internal layers, translate raw database errors into domain errors; between microservices, map them to standard status codes like gRPC codes or a uniform JSON error schema; and at the user-facing edge, return only predefined static strings or error codes paired with a request ID—never dynamically concatenated error text. For logging, use structured loggers like log/slog, zap, or zerolog, project only the fields needed for debugging, and implement a Redactor interface to mask sensitive fields whenever a full request payload must be logged.

AI Coding Tools, Java & Compounding Engineering

Markus Eisele distills Aleksander Stensby’s talk from NDC Manchester 2025 around a central thesis: if AI is generating bad code for you, it’s usually a workflow problem, not a model problem. Stensby calls the fix Compounding Engineering—investing in your tools over time the way you mentor a junior developer. Context is both precious and scarce: too little and the model hallucinates, too much and it loses focus, so clear the chat frequently and persist architectural decisions, constraints, and rejected alternatives in markdown files so you can reload only what matters. Rule files like CLAUDE.md serve as a living knowledge base: every time you fix a subtle bug, update the rules so the agent never makes that mistake again.

Other habits include always planning before coding to catch bad ideas early, breaking work into small single-responsibility tasks, picking models deliberately (fast models for routine edits, deep reasoning models for architecture), automating repetitive flows with slash commands and sub-agents, using MCP so the AI can inspect real systems, and keeping a Git safety net of frequent checkpoints. Background agents still require thorough human review before merging. An engineer’s enduring value lies in taste and judgment—spotting that something is wrong even when all the tests pass—which AI still lacks. Invest in your workflow and the gains compound; skip that investment and you just get “faster mediocrity.”

YAML? That’s Norway Problem

This piece digs into YAML’s infamous “Norway problem”: the two-letter country code NO getting parsed by popular libraries like PyYAML as the boolean false instead of a string. The root cause is implicit typing for unquoted scalars: the final draft of YAML 1.0 (2004) and YAML 1.1 (2005) treated words like yes/no and on/off as booleans. YAML 1.2 (2009) dropped that behavior, yet PyYAML and LibYAML—the two “official” libraries, with open issues requesting v1.2 support dating back to 2016–2017—still implement v1.1. Because LibYAML sits deep inside the dependency tree of countless tools, changing it is slow and risky.

Most articles stop at “just quote "NO",” but the author shows the ecosystem reality is messier. In Go, the most downloaded library (gopkg.in/yaml.v3) is unmaintained and mixes v1.1 and v1.2 behaviors, whereas the most popular actively maintained library defaults to v1.2; the yq CLI also defaults to v1.2, and in 2025 Kubernetes introduced KYAML, a safer, less ambiguous subset of YAML. Online documentation routinely confuses spec versions while users argue over whether the bug is “already fixed.” The takeaway: the YAML ecosystem is fragmented but gradually migrating toward stricter specs; new projects will likely pick newer v1.2-compliant libraries free of the Norway problem, while older, more widely deployed libraries remain stuck on v1.1.


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.