Get You a State Machine for Great Good

Oxide and Friends · 28 Mar 2023 · 1h 08m · Episode 9

What this episode covers

Andrew Stone of Oxide Computer Company explains how he built a custom, replay-capable debugger for the 'Wicket' terminal UI in just a few days. He details the architectural decision to separate IO from state, allowing the system to record and replay user interactions and system events for debugging and testing. The discussion highlights the use of Rust, specifically the `serde` and `proptest` crates, which enabled rapid serialization and property-based testing. Stone also contrasts this specialized approach with general-purpose tools like Replay.io, arguing that application-specific debugging infrastructure leads to better software architecture.

Mentioned

Companies
Oxide Computer Company, VMware
Products
Wicket, Replay.io
Tools
serde, proptest
Also
Rust, Elm

Other shows on the same ground, closest first.

  • Embedded.fm · 58m

    141: Malevolent and Trying to Trick You

    Julia Evans, a software engineer at Stripe, discusses using Linux system-level tools like `strace`, `perf`, and `top` to debug applications as black boxes. She explains how `strace` reveals system calls to understand program behavior without reading source code, and how `perf top` identifies CPU-intensive functions like garbage collection. Evans also shares her philosophy on debugging, emphasizing the importance of maintaining confidence and understanding that computers are logical machines, even when bugs seem impossible.

  • The Pragmatic Embedded Podcast · 56m

    Modern Embedded Systems Programming with Miro Samek

    Miro Samek, founder and CEO of Quantum Leaps, explains why traditional embedded architectures like superloops and RTOS lead to 'spaghetti code' and concurrency bugs, advocating instead for event-driven active objects and hierarchical state machines. He details how this approach eliminates race conditions and mutexes by enforcing a 'no sharing' principle, thereby improving testability and development velocity. Samek also discusses the importance of using lightweight modeling tools to generate code from state diagrams, ensuring the model remains the source of truth in an agile workflow.

  • Embedded.fm · 1h 15m

    274: Swiss Knife of Embedded Systems

    Ivan Kravets, founder of PlatformIO, explains how his open-source toolchain simplifies embedded development by providing a unified build system, library registry, and debugger that works across multiple IDEs and operating systems. He discusses the platform's architecture, which allows developers to switch between frameworks like Arduino and mbed with minimal configuration changes, and highlights the benefits of its unified debugging engine. Kravets also shares insights from the RISC-V Summit, noting Western Digital's adoption of RISC-V for custom controllers and the growing commercial viability of open-source processor architectures.

  • Embedded.fm · 1h 22m

    179: Spaghetti Reducer

    Miro Samek, founder of Quantum Leaps and creator of the QP framework, explains how hierarchical state machines and active objects solve the 'spaghetti code' problem in embedded systems. He contrasts event-driven programming with traditional super-loops and RTOS, arguing that the former offers better scalability and traceability for complex applications. Samek also details specific debugging techniques, such as using hardware faults to detect stack overflows and the critical importance of keeping assertions enabled in production code.

  • Embedded.fm · 1h 12m

    215: Heisenbugs

    Guest Alvaro Prieto joins hosts Alicia White and Christopher White to discuss the fundamentals of debugging embedded systems, distinguishing between software debuggers, hardware programmers, and microprocessor debug support. They cover the evolution from print-based debugging to using tools like GDB, LLDB, and Visual Studio Code, while explaining the roles of hardware interfaces like J-Tag, SWD, and Trace. The conversation highlights the trade-offs between open-source toolchains (GCC, OpenOCD) and paid professional IDEs (Keil, IAR, Code Composer Studio), emphasizing how paid tools simplify setup for complex chip architectures. Prieto also shares anecdotes about his personal projects, including a cheese-aging cave and a new reverse engineering podcast.

The summary, chapters and topics are generated from the episode’s audio by this directory, not written by Oxide and Friends. The episode itself belongs to its publisher.