r/explainitpeter • • 2d ago

Explain it Peter.

Post image
766 Upvotes

36 comments sorted by

•

u/qualityvote2 2d ago edited 1d 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!

154

u/Zenai10 2d 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

39

u/Round-Young-3906 2d 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!”

6

u/RandomUser3777 1d 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).

2

u/jacobstx 1d 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 1d ago

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

3

u/viktig_sau 23h ago

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

1

u/datascience45 1d ago

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

1

u/chaos_redefined 17h ago

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

14

u/nickmiele22 2d 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

12

u/Zenai10 2d 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 2d 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 2d ago

Popular example is TF2.

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

2

u/Good_Background_243 2d ago

That's a myth, sadly.

4

u/Rectal_Retribution 2d ago

One might say that line is code-bearing.

1

u/UmHmWhoAmI 1d 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)

21

u/Eepy_slepy 2d 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.

7

u/sdfiuasdnfiuosda 2d 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

11

u/Honkert45 2d ago edited 2d 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 2d ago

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

8

u/Honkert45 2d ago

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

1

u/Lithorex 2d 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 2d 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 2d ago

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

2

u/Death_IP 2d ago

Load-bearing flight of stairs

code-bearing line of theirs

1

u/Prudent_Guidance4376 2d ago

That is a sick smoking spot for windy days.

1

u/RoodnyInc 2d ago

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

1

u/RouletteSensei 1d 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 1d 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 19h ago

Ill make it worse worse

Coconut

-1

u/Desmond_Ojisan 2d 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 2d ago

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

-1

u/Desmond_Ojisan 2d 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 2d ago

TF2 coconut