this post was submitted on 04 Jun 2026
254 points (99.6% liked)

Programmer Humor

31695 readers
93 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 3 years ago
MODERATORS
 

This is the code in the Apollo Guidance Computer for Apollo 11.

It's part of the LUMINARY sofware, which ran on the AGC on the Lunar Module. It's meant to check if the landing radar is pointed toward the lunar surface - because the LM went through several orientations, the landing radar could be pointed to the front or the side or down. You're landing on the Moon. Point it down.

Point is, you have to verify user input. Even if your users are the most meticulous and highly trained individuals in history. You have to see if they're lying. So you get to the BURNBABY.

Browse the code in GitHub - this code is in THE_LUNAR_LANDING.agc

top 37 comments
sorted by: hot top controversial new old
[–] phailhaus@piefed.social 61 points 2 days ago (2 children)

in case anyone is curious, those comments are not a modern addition. They are a faithful reproduction of the original scanned copy of the code. Scan of Page 789 of Luminary099

[–] ChaoticNeutralCzech@feddit.org 1 points 12 hours ago

There's a 2001 rewrite of the documentation. There's lots of funny instructions aside from P00 meaning root process of the computer, like an OS kernel which also includes the P00D00 abort routine. There is also SEXTMARK (sextant mark) and ENEMA (software restart).

[–] pineapplelover@lemmy.dbzer0.com 22 points 2 days ago (2 children)

Ima be honest, I have no idea wtf I'm looking at

[–] RamenJunkie@midwest.social 10 points 2 days ago (2 children)

I know people hate AI, but I fed the OP pic to Claude and asked it to explain the code and maybe gice modern comparisons to something like Python.


This is AGC (Apollo Guidance Computer) assembly code from the lunar module's landing radar routines. Let me walk through it:


P63SPOT3 — "Is the antenna in position yet?"

CA   BIT6
EXTEND
RAND CHAN33
EXTEND
BZF  P63SPOT4

Reads a hardware channel (CHAN33) to check the state of the landing radar antenna. BZF means "Branch if Zero" — if the antenna bit is already set, skip ahead.

if radar_channel_33 & BIT6 == 0:
    goto("P63SPOT4")

"Nope, not there yet — bug the astronaut"

CAF  CODE500
TC   BANKCALL
CADR GOPERF1

Loads error code 500 and calls GOPERF1 — this triggers a crew alert, literally asking the astronaut to manually crank the antenna into position. The comment says it all: "PLEASE CRANK THE SILLY THING AROUND"

display_alert(code=500, message="Antenna not in position, please fix manually")
await_crew_response()

"Did they fix it or bail?"

TCF  GOTOPOOH  # TERMINATE
TCF  P63SPOT3  # PROCEED — SEE IF HE'S LYING

Two possible outcomes: crew hits terminate (GOTOPOOH — yes, really), or hits proceed and the code loops back to P63SPOT3 to check again. "See if he's lying" is the actual comment, meaning: verify they actually moved it.

if crew_pressed == "terminate":
    goto("GOTOPOOH")
else:
    goto("P63SPOT3")  # trust but verify

P63SPOT4 — "Okay, antenna's good, initialize radar"

TC   BANKCALL
CADR SETPOS1

Calls SETPOS1 to initialize the landing radar into position 1.

bankcall(SETPOS1)  # configure radar for landing approach

"And we're off"

TC   POSTJUMP
CADR BURNBABY

BURNBABY. That's the actual name of the burn routine. Jumps to the powered descent initiation — the engine ignition sequence for landing.

goto("BURNBABY")  # 🔥 start the descent burn

The whole thing is basically: check hardware → nag human if needed → loop until fixed → initialize systems → light the engine. Written by people with a great sense of humor under enormous pressure, in 4KB of RAM.

[–] lord_ryvan@ttrpg.network 6 points 2 days ago

That looks like a fair application of AI, if only it wasn't an environmental and IP-rights disaster…

[–] Trail@lemmy.world 1 points 2 days ago

So, Claude was given the explanation on its training data. Not hugely surprising.

[–] ChaoticNeutralCzech@feddit.org 4 points 2 days ago* (last edited 12 hours ago)

I know what P00 is, that's program 00 or the root process of the computer. Terminating the subprocess hands control back to P00, which is why the processor is instructed to GOTOP00H (the H might indicate the point where the subrutine was called; presumably because the CPU lacks a hardware-implemented "return from subrutine" instruction)

Strange that the AI did not elaborate on this, that's one of the best known parts of the Apollo software...

[–] rtxn@lemmy.world 23 points 2 days ago

PLEASE CRANK THE SILLY THING AROUND should not be as hilarious as it is

[–] Rhaedas@fedia.io 60 points 3 days ago (2 children)

Sanitizing user input for the Moon landings.

Meanwhile in 2026, ask AI to change an authentication phone number and it says, "Sure thing!" And is ABLE to do it.

[–] Bananskal@nord.pub 12 points 2 days ago (2 children)

I don't understand what this comment is meant to convey. Could you explain a bit further?

[–] ugo@feddit.it 28 points 2 days ago (1 children)

It’s trying to convey that software and engineering discipline has gone to shit. Software written to have some of the most skilled humans at the given task in 69 still had safeguards to double check that the user, despite being one of the most eminent experts, did not provide incorrect input.

Fast forward to 2026 and things have worsened to the point where ostensible “engineers” deploy systems that allow attackers to access people’s accounts simply by asking a bot, which blindly trusts the attackers.

I don’t know yet to which degree I agree, but that’s what the comment is meant to convey in my interpretation.

[–] Bananskal@nord.pub 6 points 2 days ago

Thanks! 🙏

[–] ggtdbz@lemmy.dbzer0.com 9 points 2 days ago (1 children)

The first one insisted to make sure one of the most competent human beings who ever existed oriented a thing downward in order to not die during a very well-rehearsed procedure.

The second one is a reference to social media companies “outsourcing” support to chatbots with no intelligence and plenty of control, allowing people to prompt said chatbots into giving them other people’s accounts.

[–] Bananskal@nord.pub 3 points 2 days ago (1 children)

I knew I should've waited until I hadn't just woken up before trying to understand the comment. 😆

[–] Rhaedas@fedia.io 4 points 2 days ago (1 children)

I'll take the blame, I shortened the statements maybe a bit too much, assuming the references would work. But they were explained well by the other replies.

I was learning in the 90s from lessons on AOL how to sanitize inputs and salt passwords along with HTML 1.0. It baffles me how corporations let stupid things happen now.

[–] Bananskal@nord.pub 2 points 2 days ago

No worries! Once I got the meaning, the brevity makes it funnier. 😆

Yeah, it's pretty baffling... One of my two life mottos is "hard hard could it be!"

[–] regdog@lemmy.world 1 points 2 days ago

You say it like that it is a good thing. The actual reality looks like this: https://tech.yahoo.com/ai/meta-ai/article/metas-ai-chatbot-reportedly-helped-hackers-steal-instagram-accounts--all-they-had-to-do-was-ask-202138534.html

Or to supplement your statement "Meanwhile in 2026 you can ask AI to change the authentication phone number, regardless of if you actually own the account or not."

[–] rizzothesmall@sh.itjust.works 34 points 3 days ago (1 children)

Love that the termination routine is GOTOPOOH and the next step is BURNBABY

[–] umbraroze@slrpnk.net 35 points 3 days ago (1 children)

GOTOPOOH was actually jargon for Program 00 (Hex), which was (I think?) the AGC's normal idle routine.

BURNBABY was an alias for BURN_BABY_BURN which was the lunar descent burn sequence. Or something. I wouldn't have named it that.

[–] sp3ctr4l@lemmy.dbzer0.com 12 points 3 days ago* (last edited 3 days ago) (2 children)

P00H is hilarious.

Poop.

The end of all food, yet also, the beginning of all food.

Poop is the true neutral ground state from whence all emerges and all returns to.

... genuienly an incredible name for the idle loop, I am in awe.

I did not think Maggie Hamilton could be more legendary, but somehow, she is. Damn.

[–] mercano@lemmy.world 11 points 2 days ago (2 children)

It’s also something we left on the moon. Bags and bags of it, along with empty food containers and their moonwalking backpacks. It’s not like it’s worth it to haul it back to orbit.

[–] Bananskal@nord.pub 7 points 2 days ago

So this is what the Seminal Theory is about. It's not a meteor or some shit that crashed into the earth from far away.

It was just actual shit left behind by visitors. That's us. We're alien shit.

[–] sp3ctr4l@lemmy.dbzer0.com 4 points 2 days ago (1 children)

I wonder if that shit is something approximating a fossil, currently.

Presumably the radiation would have killed all the fecal bacteria pretty quickly... hell ... would the plastic bags have degraded as well?

[–] mercano@lemmy.world 5 points 2 days ago (2 children)

It has been exposed to 336 hours of continuous unfiltered sunlight each lunar day for the past 40+ years. That’s can’t be good for the plastic. The poo is probably dedicated, but I don’t think it’d be fossilized, in the sense of biological material replaced with stone, I don’t think the moon is geologically active enough for that to happen.

[–] mkwt@lemmy.world 3 points 2 days ago* (last edited 2 days ago) (1 children)

I think the poop bags were mainly stowed into lockers on the sides of the descent module. They're not just piled up on the ground.

Edit: Correction. This research suggests that the procedure was to "jettison" the "waste receptacle," containing any sealed poop bags, food wrappers, and other trash. "Jettison" definitely sounds more like tossing stuff out the door.

I also want to point out that maybe 96 bags were provisioned and left. But almost certainly most of those remained empty. Pooping into a bag in the LM in close proximity to your colleague is not an easy or pleasant experience. Astronauts had access to lomotil and they were conditioned on what NASA called a "low residue diet" for the entire duration of the flight and pre-flight quarantine. The early flights were on the surface for less than 24 hours. So there was a lot of opportunity and incentive to just avoid having a bowel movement on the moon.

There's also a radio transcript from Apollo 16 that suggests that, on that flight, this material was transferred off the returning LM back onto CM and presumably returned to Earth.

[–] sp3ctr4l@lemmy.dbzer0.com 1 points 1 day ago

brb, jettisoning my recycling into the mobile external containment vessel, prior to scheduled rendevouz.

[–] sp3ctr4l@lemmy.dbzer0.com 5 points 2 days ago (2 children)

Is there... a word... for... 'exposed to the void of space for a prolonged period of time'?

Yeah I know fossilized isn't the right word, as thats generally a process that requires water... but i dont know how to say 'space fossilized'.

Dehydrated and Irradiated ... ?

[–] gandalf_der_12te@feddit.org 1 points 1 day ago

i would say, if it's exposed to a vacuum, all the water evaporates, so it becomes extremely dry, like rocks

probably dessicates more than the mummies in egypt.

[–] deadbeef79000@lemmy.nz 5 points 2 days ago (1 children)
[–] sp3ctr4l@lemmy.dbzer0.com 1 points 2 days ago (1 children)

I was going to rejoinder this with a quip about 'presumably neither shaken nor stirred', but given that this was clever enough to stunlock me for ~12 hrs, I guess just 'bravo!'

[–] deadbeef79000@lemmy.nz 2 points 2 days ago (1 children)

I was deathly afraid it wasn't as clever as I thought. One however does one's best.

[–] sp3ctr4l@lemmy.dbzer0.com 2 points 1 day ago

Either way, well done, you've certainly understood the assignment.

... but it takes two, to make a 00.

[–] ZILtoid1991@lemmy.world 3 points 2 days ago

Winnie the Poop

[–] DisasterTransport@startrek.website 13 points 2 days ago* (last edited 2 days ago) (1 children)

Interesting how similar this is at first glance to Kerboscript. Neat!

[–] MonkderVierte@lemmy.zip 6 points 2 days ago* (last edited 2 days ago)

Is this KOS-related?

Edit: nope, a real language, not Kerbal Operating System.

[–] AllNewTypeFace@leminal.space 7 points 2 days ago (1 children)

TCF = Terminate and Catch Fire?

[–] umbraroze@slrpnk.net 1 points 1 day ago

For those wondering about a serious answer, TC was Transfer Control (in most modern ISAs it's called JMP/JUMP) and TCF was Transfer Control to a Subroutine (equivalent to JSR/CALL).