More The Pragmatic Engineer episodes

Formal methods with Hillel Wayne thumbnail

Formal methods with Hillel Wayne

Published 29 Jul 2026

Duration: 01:23:42

"Formal verification methods, like TLA+ in AWS's DynamoDB, ensure AI-generated code correctness, with property-based testing offering a practical middle ground; the discussion affirms software engineering as a legitimate discipline, balancing traditional principles with rapid iteration and open-source culture, while exploring AI's future impact on development and job markets."

Episode Description

Brought to You By:* Antithesis - verify your system's correctness without human review or traditional integration tests - and avoid bugs or outages.*...

Overview

The podcast discusses the application of formal methods in software engineering, particularly in verifying the correctness of AI-generated code and distributed systems. Tools like TLA+ and Alloy are highlighted for their ability to model system behavior, uncover race conditions, and detect complex bugs - such as TOCTOU (time-of-check to time-of-use) errors - through exhaustive state exploration. Real-world examples include Amazon's use of TLA+ to find critical bugs in DynamoDB and S3, demonstrating how formal verification can catch issues that are impractical for humans to identify manually due to the vast number of possible state transitions.

The discussion also explores the distinction between software and traditional engineering disciplines, with findings suggesting software engineering aligns more closely with established engineering practices than commonly assumed. Lightweight formal methods, property-based testing, and deterministic simulation testing are presented as practical middle grounds between full formal verification and conventional testing. The podcast further examines how AI impacts software development, noting its potential to assist in specification and verification - but emphasizing that human expertise remains essential, especially in defining system properties and interpreting results. Additionally, topics like version control, open-source culture, and the democratization of software development through AI and low-code tools are discussed as unique characteristics shaping the field's evolution.

What If

  • What if you applied lightweight formal methods to your core AI-generated code today?

    • Move: Select one critical module (e.g., auth or state transition logic) in your solo project and write 3 - 5 precise properties using simple assertions or comments. Use property-based testing (e.g., FastCheck, Hypothesis, or even handwritten random input tests) to validate it weekly.
    • Why Now?: AI is accelerating code output, increasing hidden bugs in logic - especially in race conditions and edge cases - but remains poor at generating correct specifications. Catching flaws now builds long-term resilience.
    • Expected Upside: Reduce high-cost bugs in production by up to 50% over six months while creating reusable test suites that future-proof upgrades and AI refactors.
  • What if you modeled your system's key state transitions like a distributed engineer - even if you're solo?

    • Move: Use a lightweight model checker (e.g., Alloy or Quint) to map out a core data flow (e.g., user permissions, order lifecycle) with invariants. Run it monthly or after major changes to detect invalid states (e.g., double spending, access leaks).
    • Why Now?: Tools like TLA+ and Alloy have inspired simpler, faster successors (Quint, P) that are now accessible to solo devs - and concurrency bugs in scaling apps are rising with AI-assisted complexity.
    • Expected Upside: Surface deep logic flaws before implementation; cut debugging time by 60%+ when issues arise, and gain confidence in system integrity during rapid iteration.
  • What if you treated version control not just as backup - but as engineering leverage?

    • Move: Enforce atomic, specification-linked commits in your workflow (e.g., each commit message references a property, invariant, or model outcome). Automate changelog diffs based on commit structure for stakeholders or future audits.
    • Why Now?: Physical engineers envy this capability - yet most software developers underuse it. With increased AI involvement and teamless development, traceability is becoming a competitive edge.
    • Expected Upside: Accelerate future refactors and onboarding (even for yourself post-sabbatical), while creating implicit documentation that aligns code with intent - turning version history into a design asset.

Takeaway

  • Apply lightweight formal methods like Deterministic Simulation Testing (DST) to verify critical components of your system by injecting faults and observing behavior across multiple simulated runs.
  • Use property-based testing in your development workflow to generate random inputs and validate core properties of functions, improving robustness beyond traditional example-based tests.
  • Study and apply findings from Engineering a Safer World by Nancy Leveson to proactively identify failure modes in your software systems, especially for safety- or correctness-critical applications.
  • Invest time in learning formal logic and discrete math (e.g., boolean logic, set theory) to improve reasoning about complex systems, particularly around concurrency and edge cases.
  • Experiment with TLA+ or Alloy to model and verify small, high-risk parts of your system - such as authorization flows or state transitions - before implementation to catch design-level bugs early.

Recent Episodes of The Pragmatic Engineer

15 Jul 2026 Context engineering with Dex Horthy

"Explores AI's role in software development, addressing challenges like code quality, human oversight, and balancing automation with human judgment while evaluating different AI-assisted approaches and future implications."

1 Jul 2026 How Kent Beck shapes the software engineering industry

Ken Beck's career in software engineering, contributions to TDD, XP, and the Agile Manifesto, critiques of Agile commercialization, AI's impact, challenges of OOP, Smalltalk's legacy, JUnit, and the balance between technical mastery and human-centric skills in evolving development practices.

24 Jun 2026 Tech interviews with NeetCode

Engineering careers are shifting from algorithm memorization to problem-solving and critical thinking amid AI's influence, critiquing outdated hiring practices, highlighting adaptation divides, trade-offs, cultural contrasts, and the enduring need for human-driven decision-making in tech.

27 May 2026 Building OpenCode with Dax Raad

OpenCode's rapid growth to 10 million users highlights challenges like feature overload and AI's limited impact on development speed, while underscoring tensions between innovation, product cohesion, sustainable practices, and the complexities of AI-driven workflows in software engineering.

20 May 2026 Why Rust is different, with Alice Ryhl

Rust prioritizes memory safety and performance via ownership, borrow checking, and `unsafe` blocks without garbage collection, balancing robust governance, community-driven tools like Cargo and Tokio, safety features including null safety and exhaustive pattern matching, and ongoing efforts to simplify learning curves and integrate AI-driven development, while standing out in system programming compared to TypeScript, JavaScript, and C++.

More The Pragmatic Engineer episodes