with-agents

The Pragmatic Engineer — selected conversations

Software correctness and programming languages with Sean Allen

Twenty-five curated conversations on agent workflows, software factories, software correctness, developer platforms, engineering leadership, resilient systems, and software quality

A manually reviewed selection of Pragmatic Engineer conversations with Katelyn Lesse, Harjot Gill, Satya Nadella, Sean Allen, Will Larson, Uday Kiran Medisetty, Sam Newman, Maggie Appleton, Matt Pocock, Tibo Sottiaux, Martin Fowler, Dex Horthy, Boris Cherny, Mario Zechner and Armin Ronacher, Laura Tacho, Hillel Wayne, Mitchell Hashimoto, Kent Beck, Peter Steinberger, Grady Booch, Steve Yegge, DHH, Dax Raad, Charity Majors, and Addy Osmani. Topics include software factories and risk-based review, software correctness and fault-injection test workloads, engineering management and careers, developer platforms, resilient distributed systems, design prototyping, reusable skills, agent workflows, context and harness design, TDD and verification, architecture, measurement, accountability, and open-source governance. Practitioner observations, product-team and vendor claims, and forecasts are not controlled findings.

The Pragmatic Engineer 4 of 25
In this collection Browse 25 summaries 4 of 25

Sean Allen works on the Red Team at Antithesis, a team asked to use the company's product the way customers would; he deliberately uses only the tools customers have. He also works on the open-source Pony programming language, and he previously worked at the startup Wallaroo and in Microsoft Research's Confidential Computing Group. He argues that correctness starts with the language, types, and design, before any testing, and that no release gate can guarantee quality. The conversation covers languages from the ML family, Pony's concurrency and garbage collection, property-based testing and test workloads, supply-chain and side-channel security, technical debt, and planning before coding.

Based on the video's English auto-generated captions, with personal, product, and language names corrected in the saved transcript; no check against the original audio. Coding agents come up only once, when Allen says he has written skills that help agents work with Antithesis. Antithesis sells the kind of fault-injection testing he describes, so his remarks about it are a first-party view. His comparisons of strong and weak teams are observations from places he has worked, not measurements. No sponsor segments appear in the captions.

Key points

  • Languages in the ML family move checks into the compiler. ML is a family of strongly typed languages that includes OCaml, and Rust borrowed many of its features. A sum type says a value is exactly one of a fixed set of variants, and pattern matching branches on which variant it is. With exhaustive matching, adding a sixth variant to a five-variant type makes the compiler list every place in the codebase that does not handle it yet. 08:27–11:05(opens in a new tab) Early in his career, Allen chose between C and Ada. Ada, a strict language shaped by defense-department needs, would not compile his programs, while C compiled them and they segfaulted. He spent years building personal rules for concurrent C and C++, still made mistakes, and now prefers a compiler that enforces those rules. 12:09–15:02(opens in a new tab) He later realized Ada rejected those programs because they were memory-unsafe and would have led to corruption, crashes, or data races. 33:56–35:00(opens in a new tab)

  • Pony builds those rules and a low-latency garbage collector into the language. At Wallaroo, Allen needed to process bank data fast, with predictable latency and no lost or corrupted data. Standard JVMs of the time stopped the whole program to collect garbage, which caused latency spikes, and Azul's pauseless JVM cost too much for most projects. His friend Sylvan had built an actor runtime in C at Morgan Stanley, then did a PhD at Imperial and created Pony, which Wallaroo adopted. 19:40–24:47(opens in a new tab) Pony uses the actor model, in which independent actors communicate by messages, and its compiler enforces the concurrency rules Allen used to keep by hand; he says it makes a large majority of illegal states unrepresentable. 24:47–26:52(opens in a new tab) Allen argues that slow garbage collection is a symptom of the JVM design, where any thread can reach any memory, so freeing it safely tends to require stopping everything. Roughly speaking, each Pony actor has its own heap and frees its own memory between units of work. Latency stays mostly flat, at the cost of a little less throughput at peak load. 26:52–31:48(opens in a new tab)

  • Correctness means the program upholds what it is supposed to do, and tests come last. Allen defines correct software as software that does what its authors expect, stated more formally as invariants, and does not wake anyone at 2 a.m. He notes that many teams know when their software is broken but cannot say when it is working. 31:48–32:52(opens in a new tab) He calls Antithesis a verification and correctness company rather than a testing company. Tests check what nothing earlier could guarantee, and he wants as much as possible enforced before testing. For example, a type system can define a component's allowed states and transitions, so reasoning only has to cover what the types cannot express. 32:52–35:56(opens in a new tab) For a system without a precise expected answer, such as web search, he separates "is it working" from "is it relevant." Working has testable invariants, such as a submitted query returning results; the host adds behavior under load and concurrent requests. Allen adds that results must belong to the query that asked for them: tagging each query with a marker can catch responses sent to the wrong user. 57:30–1:00:56(opens in a new tab)

  • Example-based tests invite hard-coding; random inputs lead to property-based testing. Allen likes test-driven development (TDD) as a way to design APIs. In a pair-programming kata, one person writes tests and the other writes the simplest code that passes them. Allen took this literally and returned hard-coded answers for each example, so the only way to force a real implementation was to randomize inputs, which is property-based testing. His partners often failed to finish but said they would write better tests afterwards. He adds that many of those tests checked things a stronger type system would have prevented. He preferred dynamic languages while his systems fit in his head, and came to value compiler errors on bigger systems with more people. 35:56–40:52(opens in a new tab)

  • A workload decides which behavior a randomized test can reach. Allen defines a workload as the generated inputs that drive a system together with the checks that decide whether it is working. For a key-value store, that means the get, put, and delete operations plus the number, range, and size of keys and values. Choosing each operation uniformly at random is a "drunken walk" that rarely strays far from where it started: it almost never issues 10,000 puts in a row, so it never pushes the store into spilling to disk, collecting garbage, or resharding. 40:52–44:45(opens in a new tab) Allen avoids describing a workload as a constructed scenario, which he associates with example-based unit tests. 46:38–48:39(opens in a new tab)

  • The bank test is a simple workload that exposes isolation bugs under faults. Ten accounts share $10,000. Transactions move money between accounts while another process repeatedly reads the total; if the database's transaction isolation holds, the reader only ever sees $10,000. On a laptop, a good database passes. Once network faults and killed nodes are injected, as Kyle Kingsbury's Jepsen and Antithesis do, distributed databases start to show bugs. 43:43–46:38(opens in a new tab) Allen says the same fault conditions occur in production all the time. 48:39–49:30(opens in a new tab)

  • Quality is not a gate. Allen's ideal would be a TLA+ or Alloy specification proven with a model checker and turned into a fast implementation, which he says is nowhere near possible. The practical foundation is static checking in languages such as Pony, Rust, and OCaml, or Erlang's actors, which copy data in messages instead of sharing memory. Testing covers what that foundation cannot enforce, because every language trades some guarantees for other needs such as performance. 49:30–52:34(opens in a new tab) Everyone ends up testing in production to some degree, because production holds data, such as records corrupted long ago, that no input generator produces. Each check adds assurance, but none marks the point where software becomes "quality." He also disputes that business logic cannot be checked statically, but does not elaborate. 53:37–55:23(opens in a new tab) In his experience, slow teams, or fast teams that keep shipping emergency fixes, treat pull requests and staging tests as quality gates. Teams that move fast with confidence decide from the start how they will know the system works: for a distributed database, that could mean checking the consensus algorithm in TLA+ and running the first version under Jepsen- or Antithesis-style faults before it ships. 55:23–58:19(opens in a new tab)

  • Supply-chain risk comes from dependencies having the same power as your own code. Attackers target the weakest link, such as a tool inside CI/CD, where stolen secrets let them publish malware. A downloaded package meant to pad text can mine cryptocurrency or open network connections. 1:00:56–1:03:39(opens in a new tab) The host lists cooldown periods, vendoring, and forking as naive defenses. Allen asks who will notice a bad package if everyone waits, and says almost no widely used language has a good answer, because package management still follows the trusting model of Perl's CPAN. 1:03:39–1:05:37(opens in a new tab) He calls sandboxes usually easy to escape. Object capabilities, from research such as Mark Miller's E language and built into Pony, require code to be handed a capability, such as network access, before it can use it. A foreign function interface into C can still bypass them, and he doubts incremental changes to current systems will solve the problem. 1:06:25–1:09:19(opens in a new tab)

  • Speculative execution leaves a hole under every software guarantee. Allen helped build a confidential container offering at Microsoft Research, where confidential computing aims to protect workloads from the people who operate the cloud. Its guarantees always carried the caveat "modulo side channel attacks," because CPUs speculatively execute branches and leave data in memory that an attacker can read through side channels. He recalls an early kernel patch costing about half the performance and says the industry settled for patching attacks one at a time to keep the speed; he relies on the branch predictor in his own code. 1:09:19–1:14:21(opens in a new tab)

  • Technical debt only hurts if you have to pay it back. Allen still holds the view he wrote 10 years ago. In his example, a company hitting MySQL sharding limits paid for a distributed database that looked like a single database, accepting rare edge cases in its guarantees instead of paying down the debt. Other debt disappears when a system is retired or the company never finds product-market fit. 1:14:21–1:18:10(opens in a new tab) He distinguishes a quick hack from a deliberately narrow version that is easy to remove and will not slow later work, and warns that a startup can still debt itself into a corner before it finds product-market fit. 1:18:59–1:20:56(opens in a new tab)

  • Going slow to go fast starts with shared meaning. Allen stopped working 80-hour weeks after realizing that tiredness produced bugs he then had to chase. He calls people using the same words to mean different things one of the worst time wasters he has seen. A distributed-systems argument over "exactly once" ran on because one side meant processing a message once and the other meant delivering it once. Before building something large, he would spend a few days writing down how it works and what it must do so everyone agrees. He would also design how the team will know it is working, including observability for gray failures, where many users get a bad experience while health checks still pass. 1:20:56–1:25:20(opens in a new tab)

Full video: https://www.youtube.com/watch?v=OrXKvOjR-vI(opens in a new tab)

Search

Search field guides and resources across the site.

    Keyboard shortcuts

    Press ? to open this guide (usually Shift + /). Close it before using other site shortcuts.

    Show keyboard shortcuts
    ?
    Search site
    Ctrl + K
    Close the current dialog or menu
    Esc

    Site shortcuts are ignored while typing. Browser and extension shortcuts may take priority.