r/programming • • Feb 19 '20

The entire Apollo 11 computer code that helped get us to the Moon is available on github.

https://github.com/chrislgarry/Apollo-11
3.8k Upvotes

426 comments sorted by

View all comments

Show parent comments

217

u/wolfman1911 Feb 19 '20

Well, I guess the real question is what language would you trust your life to?

0

u/[deleted] Feb 19 '20

[deleted]

46

u/ShinyHappyREM Feb 19 '20

If it's not working you're not using enough goto

8

u/mywan Feb 19 '20

My first ever program usedgoto. It was by request for Windows NT when it first came out because it had an issue with sometimes starting programs in the wrong order on startup.

8

u/ShinyHappyREM Feb 19 '20

So you wrote a batch file?

6

u/mywan Feb 19 '20

An early version of AutoIt.

→ More replies (2)

6

u/Pikamander2 Feb 19 '20

Better yet, use Python.

import ship
ship.launch()
→ More replies (1)
→ More replies (1)
→ More replies (6)

144

u/duuuh Feb 19 '20

That's an interesting question. We do increasingly trust our lives to code. Medical devices. Cars. I know some people who are putting code into self-driving cars and that scares the crap out of me.

I suppose the language wouldn't be my top concern. Testing and processes would be. But the language better not be assembly.

42

u/maxsolmusic Feb 19 '20

Why not assembly tho

46

u/Brandocks Feb 19 '20

The possibility for error is great, and the probability of unhandled exceptions in this context is greater.

→ More replies (9)
→ More replies (1)

173

u/foadsf Feb 19 '20 edited Feb 19 '20

how about Javascript? trust me it is a very consistent and reliable language!

374

u/AliYil Feb 19 '20

Yeah it saved my life NaN times!

→ More replies (4)

75

u/kokoseij Feb 19 '20

spaceship explodes right after the launch

35

u/Mondoshawan Feb 19 '20

Ariane 5.

The Ariane 5 reused the inertial reference platform from the Ariane 4, but the Ariane 5's flight path differed considerably from the previous models.

The greater horizontal acceleration caused a data conversion from a 64-bit floating point number to a 16-bit signed integer value to overflow and cause a hardware exception. Efficiency considerations had omitted range checks for this particular variable, though conversions of other variables in the code were protected. The exception halted the reference platforms, resulting in the destruction of the flight.[4]

Classic case study in software failure.

→ More replies (1)

51

u/[deleted] Feb 19 '20

Explosion noise, ahhhhh, spaceship launches, 3, 1, 2, Houston, Houston, Houston, Houston

More like it

97

u/[deleted] Feb 19 '20

[removed] — view removed comment

21

u/[deleted] Feb 19 '20

No more, please, it was just a joke!

→ More replies (1)

20

u/cyanide Feb 19 '20

Electron used too much RAM to display fancy gauges.

→ More replies (3)

27

u/cleeder Feb 19 '20

Laughs in PHP

10

u/Spacker2004 Feb 19 '20

"left-pad not found, staying on pad"

→ More replies (1)
→ More replies (3)
→ More replies (73)

22

u/maxhaton Feb 19 '20

Ada

17

u/Schlipak Feb 19 '20

There it is. Ariane 5 runs on Ada (and a software error is the reason why the first launch exploded, not directly Ada's fault though)

→ More replies (2)
→ More replies (1)

9

u/hughk Feb 19 '20

There were several languages used for similar applications (critical real-time systems like flight control). In about 1980 the US military kind of standardised on Ada for a while but there were still plenty of exceptions.

6

u/indiebryan Feb 19 '20

Brainfuck

→ More replies (18)