270: Broccoli Is Good Too

Embedded.fm · 14 Dec 2018 · 1h 10m · Episode 270

What this episode covers

James Grenning, author of 'Test Driven Development for Embedded C' and founder of Wingman Software, discusses the philosophy and practice of Test Driven Development (TDD) for embedded systems. He explains how TDD reduces debugging time by enforcing small, verifiable steps and using techniques like 'ZOMBIES' to defer complex decisions. Grenning also shares insights from a recent side project involving a Synapse Wireless mesh network for industrial water pressure monitoring, illustrating how to handle hardware uncertainty through experimentation and loose coupling.

Mentioned

Companies
Wingman Software, Synapse Wireless
Products
Working Effectively with Legacy Code
Tools
CppUTest, Jenkins, Cyber Dojo

Other shows on the same ground, closest first.

  • The Pragmatic Embedded Podcast · 1h 01m

    James Grenning on TDD

    James Grenning, author of 'Test-Driven Development for Embedded C' and creator of a new self-paced online course, discusses the evolution and practical application of TDD in embedded systems. He explains the ZOMBIE acronym for deriving test cases, the importance of 'tracer bullets' to address project risks early, and why mocking should be used sparingly to avoid brittle tests. Grenning also reflects on the shift from Extreme Programming to Scrum, arguing that the latter often alienates engineers by ignoring core technical practices.

  • The Pragmatic Embedded Podcast · 36m

    Development is Better when it's Test-Driven

    Jeff Gable, an embedded software consultant, explains his practice of Test-Driven Development (TDD) to host Luca Ingianni, arguing that writing failing unit tests before application code forces good architecture and high coverage. Gable details how this discipline decouples embedded application logic from hardware-specific drivers, allowing tests to run on the host machine for rapid feedback rather than slow target flashing. He addresses the common industry resistance to TDD in embedded systems, citing the initial learning curve and the need for coaching, while recommending resources like the 'Throw the Switch' video courses and tools such as Unity, CMock, and Ceedling. The conversation concludes by framing TDD as an artistic craft of storytelling through code, emphasizing that the practice builds confidence and prevents regressions in production-quality software.

  • The Pragmatic Embedded Podcast · 55m

    BDD with Steve Branam

    Steve Branam, an embedded software veteran with 40 years of experience including work on iRobot Roombas and automotive systems, explains how Behavior Driven Development (BDD) provides a disciplined layer on top of Test Driven Development (TDD) to avoid brittle tests. He details the Given-When-Then structure, the use of spies and test doubles to handle hardware interactions off-target, and strategies for testing state machines and system-level behaviors. Branam argues that BDD is applicable at all levels of embedded development, from unit tests to system integration, by using abstraction layers to isolate business logic from hardware dependencies.

  • The Pragmatic Embedded Podcast · 45m

    TDD: The Hard Parts - Getting Started with Test-Driven Development

    Jeff Gable and Luca Ingianni discuss the practical challenges of adopting Test-Driven Development (TDD) in embedded software, specifically addressing the difficulty of starting with a blank screen. They outline a process that begins with decomposing systems into modules, sketching test ideas as bullet points, and writing test outlines in plain English before implementing code. The hosts highlight how LLMs can help overcome the fear of the empty screen but create new traps by generating overwhelming or nonsensical test suites, requiring developers to review test code more thoroughly than production code to ensure it accurately reflects the desired module interface and behavior.

  • The Pragmatic Embedded Podcast · 36m

    Writing Firmware without Hardware (featuring Matt Chernosky)

    Matt Chernosky, author of 'A Field Manual for Ceedling', explains how to write and test embedded C firmware on a host PC using Ceedling, Unity, and CMock to enable rapid Test-Driven Development (TDD). He argues that removing hardware dependencies allows for instant feedback loops, better architecture through hardware abstraction layers, and easier continuous integration. The discussion covers strategies for introducing TDD to legacy codebases, the role of automated unit tests in medical device compliance, and the importance of testing high-risk, changing code rather than aiming for 100% coverage.

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