this post was submitted on 27 Mar 2025
1108 points (99.4% liked)

Programmer Humor

22133 readers
1705 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] count_dongulus@lemmy.world 20 points 5 days ago (2 children)

Don't they use super statically verifiable code for these kinds of applications? Like, Ada?

[–] henfredemars@infosec.pub 23 points 5 days ago (1 children)

Sort of. We used C, but no dynamic memory allocation.

Oh that's neat. That makes me feel a lot better. I mean I get that the systems were probably embedded and that everything was defined, but it's relieving to hear that a segmentation fault or dangling pointer would generally be avoided.

[–] palordrolap@fedia.io 8 points 5 days ago

Ada is a language that leaves a lot of things "implementation dependent" as it's not supposed to grant easy access to underlying data types like those you'll find in C, or literally on the silicon. You're supposed to be able to declare your own integer type of any size and the compiler is supposed to figure it out. If it chooses to use a native data type, then so be it.

This doesn't guarantee the correctness of the compiler nor the programmer who absolutely has to work with native types because it's an embedded system though.

This has ended in disaster at least once: https://itsfoss.com/a-floating-point-error-that-caused-a-damage-worth-half-a-billion/