Tidbit about the Apollo S/W I found in an old interview with
Edsger Dijkstra 13:54
He was a Dutch computer scientist legend, winner of the Turing Award, U of Texas at Austin. A true legend for his contributions to computing science.
One of his many software philosophies: "quality, correctness and elegance", rather than half-ass it with the "...you can always try to make better versions later" approach.
1969 after the first moon landing, at a NATO conference on S/W Engineering, Dijkstra ran into Joel Aron "head of IBM's Federal Systems Division responsible for the software of the moonshot".
I was duly impressed that they got so many {40,000} lines of code correct.
I asked Joel "how do you do that?"
"Do what?"
"Getting that software right."
"Right???"
He said that in one of the calculations of the orbit of the lunar module, the moon had been defined as repelling instead of attracting. They had discovered that error by accident, five days before launch. I went white and said "Wow! Those guys have been lucky!" 'Yes', Joel Aron agreed."
https://www.cs.utexas.edu/users/EWD/video.html 300MB MPEG original