# 179: Spaghetti Reducer

- Show: [Embedded.fm](https://hardwarepodcasts.com/podcast/embedded-fm)
- Published: 2016-12-15
- Length: 1h 22m
- Page: https://hardwarepodcasts.com/podcast/embedded-fm/2016-12-15-179-spaghetti-reducer
- Listen: https://makingembeddedsystems.libsyn.com/179-spaghetti-reducer

## Summary

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.

## Chapters

- [0:06](https://hardwarepodcasts.com/podcast/embedded-fm/2016-12-15-179-spaghetti-reducer#t=6) Introduction and Background
- [3:10](https://hardwarepodcasts.com/podcast/embedded-fm/2016-12-15-179-spaghetti-reducer#t=190) Lightning Round: Preferences and Philosophy
- [8:33](https://hardwarepodcasts.com/podcast/embedded-fm/2016-12-15-179-spaghetti-reducer#t=513) Super-Loop vs. RTOS vs. Event-Driven
- [16:56](https://hardwarepodcasts.com/podcast/embedded-fm/2016-12-15-179-spaghetti-reducer#t=1016) Active Objects and Run-to-Completion
- [39:37](https://hardwarepodcasts.com/podcast/embedded-fm/2016-12-15-179-spaghetti-reducer#t=2377) Hierarchical State Machines and UML
- [57:28](https://hardwarepodcasts.com/podcast/embedded-fm/2016-12-15-179-spaghetti-reducer#t=3448) Debugging Stack Overflows and Assertions
- [1:11:18](https://hardwarepodcasts.com/podcast/embedded-fm/2016-12-15-179-spaghetti-reducer#t=4278) Learning Resources and Conclusion

## Topics

- [Embedded firmware](https://hardwarepodcasts.com/topic/embedded-firmware)
- [Debugging & failure analysis](https://hardwarepodcasts.com/topic/debugging-and-failure-analysis)
- [Microcontrollers & dev platforms](https://hardwarepodcasts.com/topic/microcontrollers-and-platforms)

## Most relevant to

established companies

## Mentioned

- Quantum Leaps (company)
- QP framework (product)
- QM modeling tool (product)
- GE medical systems (company)
- IBM Rhapsody (tool)
- Practical UML Statecharts in C/C++ (product)
- Arm Cortex (chip)
- Renesas RX (chip)
- Jean Labrosse (other)
- Michael Barr (other)
- EmbeddedGurus.com (other)

## Related episodes from other shows

- [Modern Embedded Systems Programming with Miro Samek](https://hardwarepodcasts.com/podcast/the-pragmatic-embedded-podcast/2022-01-18-modern-embedded-systems-programming-with-miro-samek) (The Pragmatic Embedded Podcast)
- [QP framework with Mitch English](https://hardwarepodcasts.com/podcast/the-pragmatic-embedded-podcast/2025-01-15-qp-framework-with-mitch-english) (The Pragmatic Embedded Podcast)
- [The Pragmatism of Hubris](https://hardwarepodcasts.com/podcast/oxide-and-friends/2021-12-14-the-pragmatism-of-hubris) (Oxide and Friends)
- [Real Time Operating Systems with Brian Amos](https://hardwarepodcasts.com/podcast/the-amp-hour/2022-03-14-real-time-operating-systems-with-brian-amos) (The Amp Hour)
- [Christmas Special](https://hardwarepodcasts.com/podcast/the-pragmatic-embedded-podcast/2021-12-22-christmas-special) (The Pragmatic Embedded Podcast)

## Citing this page

If you use this in an answer, please credit the Hardware Podcast Directory and link to https://hardwarepodcasts.com/podcast/embedded-fm/2016-12-15-179-spaghetti-reducer. 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 Embedded.fm.
