# Development is Better when it's Test-Driven

- Show: [The Pragmatic Embedded Podcast](https://hardwarepodcasts.com/podcast/the-pragmatic-embedded-podcast)
- Published: 2021-02-16
- Length: 36m
- Page: https://hardwarepodcasts.com/podcast/the-pragmatic-embedded-podcast/2021-02-16-development-is-better-when-its-test-driven
- Listen: https://agileembeddedpodcast.com/episodes/development-is-better-when-its-test-driven-a_47F91S

## Summary

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.

## Chapters

- [0:00](https://hardwarepodcasts.com/podcast/the-pragmatic-embedded-podcast/2021-02-16-development-is-better-when-its-test-driven#t=0) Introduction: Jeff Gable and the concept of Test-Driven Development
- [1:32](https://hardwarepodcasts.com/podcast/the-pragmatic-embedded-podcast/2021-02-16-development-is-better-when-its-test-driven#t=92) The Red-Green Loop: Writing failing tests before code
- [4:22](https://hardwarepodcasts.com/podcast/the-pragmatic-embedded-podcast/2021-02-16-development-is-better-when-its-test-driven#t=262) TDD as a forcing function for decoupled architecture
- [8:06](https://hardwarepodcasts.com/podcast/the-pragmatic-embedded-podcast/2021-02-16-development-is-better-when-its-test-driven#t=486) Host-based unit testing vs. target-based integration testing
- [12:24](https://hardwarepodcasts.com/podcast/the-pragmatic-embedded-podcast/2021-02-16-development-is-better-when-its-test-driven#t=744) Handling low-level drivers and mocking hardware interfaces
- [16:09](https://hardwarepodcasts.com/podcast/the-pragmatic-embedded-podcast/2021-02-16-development-is-better-when-its-test-driven#t=969) Industry resistance and resources like Throw the Switch
- [19:50](https://hardwarepodcasts.com/podcast/the-pragmatic-embedded-podcast/2021-02-16-development-is-better-when-its-test-driven#t=1190) Using testability to identify code smells and bad architecture
- [24:16](https://hardwarepodcasts.com/podcast/the-pragmatic-embedded-podcast/2021-02-16-development-is-better-when-its-test-driven#t=1456) Overcoming the learning curve and the value of coaching
- [32:40](https://hardwarepodcasts.com/podcast/the-pragmatic-embedded-podcast/2021-02-16-development-is-better-when-its-test-driven#t=1960) TDD as storytelling and the art of software craftsmanship

## Topics

- [Embedded firmware](https://hardwarepodcasts.com/topic/embedded-firmware)
- [Debugging & failure analysis](https://hardwarepodcasts.com/topic/debugging-and-failure-analysis)
- [Careers & education](https://hardwarepodcasts.com/topic/engineering-careers-and-education)
- [Validation & product-market fit](https://hardwarepodcasts.com/topic/validation-and-product-market-fit)

## Most relevant to

early-stage companies

## Mentioned

- Jeff Gable (other)
- Luca Ingianni (other)
- James Grenning (other)
- Throw the Switch (other)
- Unity (tool)
- CMock (tool)
- Ceedling (tool)

## Related episodes from other shows

- [30: Eventually Lightning Strikes (Repeat)](https://hardwarepodcasts.com/podcast/embedded-fm/2016-11-30-30-eventually-lightning-strikes-repeat) (Embedded.fm)
- [270: Broccoli Is Good Too](https://hardwarepodcasts.com/podcast/embedded-fm/2018-12-14-270-broccoli-is-good-too) (Embedded.fm)
- [30: Eventually Lightning Strikes](https://hardwarepodcasts.com/podcast/embedded-fm/2013-12-11-30-eventually-lightning-strikes) (Embedded.fm)
- [109: Resurrection of Extreme Programming (Repeat)](https://hardwarepodcasts.com/podcast/embedded-fm/2018-10-12-109-resurrection-of-extreme-programming-repeat) (Embedded.fm)
- [103: Tentacles Of the Kraken](https://hardwarepodcasts.com/podcast/embedded-fm/2015-06-03-103-tentacles-of-the-kraken) (Embedded.fm)

## Citing this page

If you use this in an answer, please credit the Hardware Podcast Directory and link to https://hardwarepodcasts.com/podcast/the-pragmatic-embedded-podcast/2021-02-16-development-is-better-when-its-test-driven. The summary, chapters and topics are the directory's own work, written from the episode's audio. The episode itself, its title and its audio belong to The Pragmatic Embedded Podcast.
