In this podcast, the hosts discuss NASA's 'Power of Ten' rules for writing safety-critical code. They cover topics such as simple control flow, limiting loops, and not using the heap. They emphasize the benefits of using stack memory and avoiding the heap, including eliminating memory bugs. The podcast also includes casual conversations, discussions on podcast reviews and store name origins, mental blocks, and choosing computer science as a category for a quiz game.
NASA's Power of 10 rules provide guidelines for writing space-proof code, including simple control flow, limiting loops, and avoiding heap memory.
By adhering to NASA's Power of 10 rules, developers can ensure code reliability and performance in critical space missions.
Checking return values of functions is crucial for code functionality and should be done for every function, even if the return value is not needed.
Deep dives
NASA's Power of 10 rules for writing space-proof code
NASA has a set of rules called the Power of 10 to help developers write space-proof code for robots that operate in space. Examples of these rules include using simple control flow and avoiding recursion, limiting loops to a fixed upper bound, not using heap memory, limiting the size of functions, hiding data by declaring variables as close as possible to where they are used, restricting pointer use and avoiding function pointers, compiling in pedantic mode by treating warnings as errors, and extensively analyzing and testing code to ensure its reliability in the harsh conditions of space.
Applying software development best practices to space programming
NASA's Power of 10 rules align with several software development best practices, such as writing clean and readable code, reducing complexity, prioritizing predictability and testability, and using multiple static code analyzer tools to maximize code quality. By adhering to these rules, developers can ensure their code is reliable and performant, especially in critical space missions.
Night Versus' new instrumental metal album
Night Versus, a band known for their instrumental metal music, released a new album. Their previous album, Copper Wasp, received positive reviews, and their new album continues to deliver high-energy instrumental tracks. It is suitable for work or as background music. The album also features a guest appearance by the bass player of the band Tool on one of the tracks. Fans of Night Versus and instrumental metal should check out this latest release.
Check return values to avoid errors
One important rule mentioned in the podcast is to always check the return values of functions. By checking the return values, developers can ensure that their code is functioning correctly and avoid errors. The podcast emphasizes the importance of checking return values for every function that returns something. Even if the return value is not needed, it is recommended to explicitly cast it to void to indicate that it is intentionally being ignored. Neglecting to check or handle return values will be brought up during code reviews.
Limit the use of pre-processors
Another key point discussed in the podcast is the limitation on the use of pre-processors. The podcast suggests that the use of pre-processors, such as in C programming, should be limited to file inclusions and simple macros. The speaker cautions against using conditionals in pre-processor directives that can change the code at compile time, as this can lead to increased testing requirements and code obfuscation. The podcast recommends avoiding complex pre-processor usage to maintain code clarity and facilitate static code analysis.
We’ve mentioned in the past that the code we write isn’t maintaining heartbeats or being used in life-critical settings, but what if your code is? NASA happens to be a company who has code that is life and mission critical and it’s very possible it won’t even be accessible once it leaves earth. In this […]
Get the Snipd podcast app
Unlock the knowledge in podcasts with the podcast player of the future.
AI-powered podcast player
Listen to all your favourite podcasts with AI-powered features
Discover highlights
Listen to the best highlights from the podcasts you love and dive into the full episode
Save any moment
Hear something you like? Tap your headphones to save it with AI-generated key takeaways
Share & Export
Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more
AI-powered podcast player
Listen to all your favourite podcasts with AI-powered features
Discover highlights
Listen to the best highlights from the podcasts you love and dive into the full episode