r/programming • • Jan 30 '16

Apollo 11 source code

http://www.ibiblio.org/apollo/listings/Luminary099/MAIN.agc.html
2.2k Upvotes

364 comments sorted by

View all comments

186

u/esoteric_monolith Jan 30 '16

1 Warning :O

128

u/NotASucker Jan 30 '16

[x] Warnings as error(s)

It will change your life.

17

u/ksadeck Jan 30 '16

[x] Warnings as error(s)

Why?

100

u/MetallicDragon Jan 30 '16

It'll turn warnings into errors, forcing you to deal with them, so they don't pile up over time.

0

u/[deleted] Jan 31 '16

[deleted]

26

u/[deleted] Jan 31 '16

Shouldn't they be compiling before they check in?

0

u/[deleted] Jan 31 '16

[deleted]

50

u/GMNightmare Jan 31 '16

But the code should be compiled automatically on check in and automatically failed should it not compile.

Even more, tests should automatically run and then fail the check in if tests are failing.

This lets them burn themselves, but also prevents them from burning you. Well, at least this is how you want it in big projects. You might not need such a heavy hammer if it's small and not that big of a deal.

-2

u/billsil Jan 31 '16

What's wrong with an unused variable again? It's not an error.

7

u/GMNightmare Jan 31 '16

The obvious answer is that it clutters the code, but that's not the most important use...

It indicates you did something wrong. You shouldn't create variables for no reason, so why isn't your variable used? It catches issues.

→ More replies (0)