Hacker News new | past | comments | ask | show | jobs | submit login
Sure it has memory leaks but who cares, it’s a freaking missile (twitter.com/carnage4life)
25 points by vishnuharidas on Aug 10, 2022 | hide | past | favorite | 8 comments



This reminds me of a line in the Perl (Camel) book, fourth edition. It talked about infinite loops, and said that if you had an infinite loop in the guidance system of a cruise missile, the "infinite" loop would still terminate at the proper time. There was a footnote that said, "That is, the fallout from the loop will occur automatically."


And, if written in Perl, it will still compile!


It's not unusual for microchips inside missiles to have inadequate cooling by normal standards because in the time it takes for the chip to heat up the missile will have exploded.

Go look at an old handbook on batteries and you might find that 70% of the text is about different kind of "reserve batteries" that supply a lot of power for a missile for a short time.



Reminds me of a comment I once read in some medical-related embedded software which governed the use of a heart sensor:

    // If we get here, the user has died.  Terminate and reboot ..


It's hard to fault his logic.


Hey, bob, what are we going to use for this spacecraft guidance software? Didn’t we have some old guidance code laying around? Let’s just reuse that, it worked great!


It's hard to fault his logic? If intended, nice pun. If not, nice accident.

But, yeah. Increasing memory costs a predictable amount in hardware redesign. Plus some additional cost per unit, but missiles are a low-volume item. Fixing all (or enough) memory leaks costs an unknown and possibly open-ended amount of software time, and may introduce new bugs. In this instance, the trade-offs say that increasing memory is probably the better path.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: