Newsletter #72
Enjoy Newsletter #72.
The Easiest Way to Build a Type Checker
Jimmy Miller shares that papers and tutorials on Hindley-Milner or Algorithm W never helped him understand how a type checker is actually implemented—until he discovered bidirectional type checking. The core idea is to split the work into two directions: infer deduces the type of an expression, while check verifies whether an expression matches an expected type. In exchange for this simplicity, the language requires a few type annotations, usually just on function definitions, while local variables are still inferred automatically. He presents a roughly 100-line TypeScript implementation for a small language with numbers, strings, functions, function calls, let bindings, and blocks.
The post walks through each component: an abstract syntax tree (AST) makes traversing a program much easier than working with raw strings, and the type context is just a Map from variable names to types that gets cloned whenever entering a new function or block scope. By adding addition as an example, he shows how infer and check mutually recurse until they bottom out at base cases. While this type checker is far from complete, it serves as an approachable starting point to extend and understand type systems without wading through dense academic papers.
Deprecation
This is Chapter 15 of Software Engineering at Google, which focuses on the planned deprecation and removal of obsolete systems. The chapter’s premise is that “code is a liability, not an asset”: every system carries ongoing operational and maintenance costs, so once an equivalent replacement exists, running both in parallel increases complexity and holds back the new system. Even so, age alone is not a reason to deprecate, and an organization should only take on as many deprecation efforts as it can realistically finish, committing to see them through to the end.
The authors explain why deprecation is so hard: Hyrum’s Law means users come to depend on unpromised behaviors, a new system rarely achieves 100% parity with the old one, engineers form emotional attachments to code they wrote, and securing resources for cleanup work is a tough sell. Google distinguishes between advisory deprecation and compulsory deprecation with enforced deadlines, emphasizing clear ownership, milestones, migration support, and tooling like static analysis and large-scale changes to block new usages. Key takeaways for engineers include designing systems with replaceable parts from the start and favoring incremental in-place evolution over full rewrites.
16 Replication Concepts Every Software Engineer Should Know (Simple Guide for 2026)
Arslan Ahmad explains sixteen data replication concepts that keep large-scale systems reliable, fast, and fault-tolerant, pairing each concept with a practical example. The post begins with the three main topologies: single-leader replication where one node accepts all writes, multi-leader replication suited for multi-region applications at the cost of conflict resolution, and leaderless replication (like Dynamo) where any node can accept writes. Next come synchronous, asynchronous, and semi-synchronous replication modes, illustrating the trade-off between durability and latency—for instance, a bank waiting for replicas to confirm a transaction versus a social network accepting a few seconds of delay before a photo appears in another region.
Later sections cover read and write quorums (such as requiring three out of five replicas to acknowledge), replication lag and the risk of stale reads, failover when a primary node goes down, geo-replication, and self-healing mechanisms like read repair and hinted handoff. It serves as a concise primer for engineers looking to understand what happens under the hood of the distributed databases they use every day.
50 System Design Concepts for Beginners in 90 Minutes [2026 Edition]
Arslan Ahmad rounds up 50 essential system design concepts in a single guide aimed at beginners and interview candidates, explaining each concisely with an intuitive example. The fundamentals section covers vertical vs. horizontal scaling, the CAP and PACELC theorems, ACID vs. BASE, throughput vs. latency, Amdahl’s Law, strong vs. eventual consistency, stateful vs. stateless architectures, and choosing between monoliths, microservices, and serverless.
Subsequent sections walk through networking and communication (load balancing, CDNs, gRPC vs. REST), data storage (sharding, replication, indexing), reliability patterns like circuit breakers, retries, and idempotency, caching strategies, message queues, observability with tracing and SLIs/SLOs, and security with OAuth, TLS, and Zero Trust. The recurring theme is that no option is universally best: a system designer must understand the trade-offs of each approach to pick the right fit for the problem at hand—for example, starting with a monolith and only splitting into microservices when truly necessary.
DDD: A Toolbox, Not a Religion
In this episode of the No Silver Bullet podcast, Miłosz and Robert from Three Dots Labs discuss why software projects often start out promising and gradually turn into legacy code nobody wants to touch: new features diverge from the original design, and instead of remodeling, teams just pile on quick patches time after time. In their view, most projects fail not because of technical challenges, but because of poorly handled business complexity—most SaaS apps use very similar tech stacks, and what actually differentiates companies is the domain they serve.
The hosts treat Domain-Driven Design (DDD) as a toolbox rather than a religion: you don’t need to apply every pattern, just pick what solves your actual problem. They warn against solving imaginary problems, like spending months building a custom framework or platform before shipping real features, sharing an anecdote about a generic messaging framework that kept them from ever finishing a game jam entry. Their advice is to understand the business model before designing database schemas, and to always apply strategic patterns—like identifying the core domain and module boundaries—even when skipping tactical patterns. As Miłosz sums it up: “DDD is about understanding the domain you work in and then modeling it well in code.”
Bonus
Images:

Videos: How Does a URL Shortener Work?
This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026.
Comments