Developers of embedded software face unique challenges, including running reliably for extended periods, with limited memory and processing power. To build cost-effective systems, embedded programmers must squeeze performance and find errors before they reach the field. From seeking the needles in the haystack to understanding where CPU cycles are truly used, this paper summarizes experience with thousands of real-world systems into ten simple rules for building better real-time software.