r/explainitpeter • • 7d ago

Explain it Peter.

Post image
1.4k Upvotes

43 comments sorted by

•

u/qualityvote2 7d ago edited 7d ago

u/Loud-Ad1735, there weren't enough votes to determine the quality of your post...it's time for the mods to do their jobs!

235

u/Zenai10 7d ago • Bravo

Programmer / code joke.

This stairs connects to nothing and has no purpose.

In code sometimes there is something that seems to do nothing but removing it breaks everything. So you leave it there. They are calling the stairs that

82

u/Round-Young-3906 7d ago • Bravo

Someone recently asked me why programmers hate working with other people’s code.

I spent a while trying to figure out how to explain the sheer magnitude of the clusterfuck to someone who isn’t a programmer.

Eventually, I came up with a little analogy.

Imagine you’re hired to finish building a laboratory on an island after the previous contractor left the job unfinished.

You arrive at the site, and besides the half-finished building, you find a gigantic fan (literally the size of the building), a huge hot-air balloon, and a room packed floor to ceiling with mops.

You scratch your head, get rid of all that junk, and finish the lab.

You hand the building over to the scientists, but five minutes later, they come running out screaming:

“Toxic gas leak!!!”

“What the fuck?! It was supposed to work!” you yell in despair.

You call the previous contractor.

“Vasya, we’ve got toxic gas leaking everywhere! What the hell is going on?”

“No idea. Everything should’ve worked. Did you change anything?”

“Not much. Just got rid of the mops…”

“The mops were holding up the ceiling!”

“The WHAT?! What the actual fuck did you just say?!”

“I said the mops were holding up the ceiling. There were gas tanks above it. Really heavy ones. Had to stuff the room underneath with mops to keep the ceiling from collapsing.”

“You could’ve at least put a fucking sign on the door saying the mops were structural supports! We’ve got toxic gas leaking everywhere! What the hell are we supposed to do?!”

“Turn on the fan. It’ll blow the gas off the island.”

“I fucking dismantled it the moment I got here!”

“Why?”

“Why?! Why the fuck did you build a 120-ton fan?! Couldn’t you just have bought a fucking box of gas masks?!”

“Well, I’d have had to go looking for gas masks. I already had the fan left over from my previous project.”

“Vasya, I got rid of your fucking fan! We’re suffocating here!”

“Then what the fuck are you still doing there?! Get in the fucking balloon and get the hell out!”

16

u/RandomUser3777 7d ago

Every new programmer comes in and declares the previous guy had no idea what they were doing and added all sorts of unnecessary crap. And sometimes some if it is unnecessary, and sometimes the new guy simply does not understand what the "unnecessary" code is doing.

I learned that if something looks weird but intentional don't screw with it until you are really sure it is not needed.

I have even been burned looking at the previous code I wrote and not understanding why I did not write it the simple obvious way (spend 2 days redoing it the simple way and figured out I did not write it that way the first time because the simple way won't work for reasons that aren't immediately obvious until you debug why the simple way is failing).

6

u/jacobstx 7d ago

Thank fuck for AI - I can highlight code leftover from 10 years ago where every variable is a single letter and simply tell it "hey, run me through this code, please".

It's like having a rubber duck that talks back.

1

u/BleepInTheBigCity 7d ago

Yea barbers are the same way. Every new barber will badmouth your last one. Same with antiviruses

5

u/viktig_sau 6d ago

I wanna add that this is true for your own old projects aswell

1

u/datascience45 6d ago

New guy hadn't heard of Chesterton's Fence.

1

u/chaos_redefined 6d ago

It's simpler than that. Ask them how they'd feel about collaborative novel-writing.

15

u/nickmiele22 7d ago

in my extremely limited experience it's usually a timing thing (not a programmer but work with embedded engineers all the time when troubleshooting) that extra 2ns let's things just run slightly smoother

13

u/Zenai10 7d ago

Am a programmer. Its a mix of this, ordering and lost / accidental dependencies. For example the thing called "this does nothing" was accidentally included in half the code. Removing it comfuses them all.

Its almost always fixibl. More accuratly "dont remove this it breaks everything" is actually "the effort required to fix this is too high. Just leave it here".

Tbh, the same as the stairs

1

u/Big-a-hole-2112 7d ago

Isn’t it the digital equivalent of a person running their hand down their face while saying “no, go over there.” and point it somewhere else?

6

u/Skullhead_LP 7d ago

Popular example is TF2.

TF2 has a jpeg of a Coconut and it will not run without it

2

u/Good_Background_243 7d ago

That's a myth, sadly.

5

u/Rectal_Retribution 7d ago

One might say that line is code-bearing.

1

u/UmHmWhoAmI 7d ago

Why no purpose really? Maybe the fire truck ladders in the town are no longer than to reach the lowest point of it (or how do you say it)

1

u/that-armored-boi 2d ago

I personally call that a danglely, does it do anything, no, could they function without it, 100% yeah, will they function without it, not for half a second and that’s if your lucky, does that make sense, nope, but it’s just like the danglely’s on basement dwelling virgin nerds, like me!

28

u/Eepy_slepy 7d ago

Basic rule of programming

If ain't broken don't touch anything

Personally gone through this the first time I tried programming and removed a line that seems to be useless. The code refuse to run properly.

8

u/sdfiuasdnfiuosda 7d ago

yea I screwed up a mod I was working on by doing this and I didn’t think to back it up prior, and I never figured out what I even changed

15

u/Honkert45 7d ago edited 7d ago

Team Fortress 2 has a line of code that has no purpose except forcing the menu UI to load twice in a row, but when they tried removing it, they find out that the UI elements don't align correctly.

The stairs are like that. Seemingly serving no purpose, but when you remove it, shit stops working.

5

u/flyingdonkeydong69 7d ago

Out of all the TF2-related Source jank, you chose to give an example that WASN'T the infamous coconut.jpeg?

10

u/Honkert45 7d ago

Because it's completely made up, and you can actually play TF2 without any textures whatsoever.

1

u/Lithorex 7d ago

In EVE Online, it is the fabled POS code.

There was a time when the devs wanted to phase out POSes, but whenever they tried in their internal builds they reportedly ran into major issues.

5

u/Yakodym 7d ago

In Bayonetta universe, witches would sometimes put doors to their rooms in strange inaccessible places, because they could wall-walk in moonlight

3

u/Delicious-Milk-8445 7d ago

if the stairs get removed, then it might not fulfill some requirement, then get fined.

3

u/Death_IP 7d ago

Load-bearing flight of stairs

code-bearing line of theirs

3

u/MjolnirPants 3d ago

Programmer humor.

This analogizes a very real situation which most of us have encountered.

For example, I have a function which I wrote in my current application called Draw(). That function is never called by any other function. I wrote a different function to handle the task that Draw() was originally built for. It is, by all logic, superfluous.

So the other day, while cleaning up my code, I deleted it. When I recompiled the application, it crashed every single time. So I put that unused and superfluous function back in and recompiled. It works now.

Why?

That's the obvious question. But in my experience, the answer is usually "Fuck you." So I no longer ask. I simply put the function back in and hope I never have to expose it in an API.

1

u/Prudent_Guidance4376 7d ago

That is a sick smoking spot for windy days.

1

u/RoodnyInc 7d ago

It's programming joke sometimes removing random line of code that doesn't seem to do anything crashes whole program

1

u/RouletteSensei 7d ago

Simple for: If it works, don't touch it

meaning: sometimes there is code inside that doesn't make sense, but for some reason, without it, it just breaks and the project or the app or anything it is break and doesn't work anymore, so leave it there

1

u/pzvaldes 6d ago

I know a building like that; it used to have an advertising sign, but rust and a lack of maintenance made it dangerous, so they took it down—but they left the stairs.

1

u/Darked_Nova 6d ago

Ill make it worse worse

Coconut

1

u/VladimrPestovich 4d ago

jokes aside best place to have a smoke probably

1

u/evilReiko 4d ago

Programmer joke "if it works, don't touch (change) it"

Same image was also used as another programmer joke: "This is GoTo IRL". GoTo is a keyword in almost every programming language, it looks so simple & innocent to use, gets the job done, but the nightmare of maintaining it is indescribable

1

u/ProfDings 3d ago

And programmers aren‘t so far off with their logic as well.
At least in Germany this has to be done if the ladders etc. of the local fire department can‘t reach the top floors directly.

1

u/InflationDeep9852 2d ago

TF2 Coconut

-1

u/Desmond_Ojisan 7d ago

Thing is, at this point, Claude can tell you with high certainty what it does, why removing it causes the problem, and how to fix it. Times change.

5

u/Interesting-Count119 7d ago

Claude will explain it with 100% confidence, and then the building will still collapse the second you touch it.

0

u/Desmond_Ojisan 7d ago

Nope, it's actually very good at things like that. If you just want to jump on the hate AI bandwagon there's nothing i can say that will matter, but facts are facts, I'm speaking from experience.

0

u/sushibobcat 7d ago

TF2 coconut