This presentation answers the following questions:
1. Why is real-time and embedded (RTE) programming hard and what can we do about it?
2. What are the best practices used by experts in concurrency and how they apply to RTE programming?
3. How to apply modern hierarchical state machines (UML statecharts) to reduce the "spaghetti code" and how to generate code from them?