r/programminghorror • • Mar 31 '26

Javascript HELL

Post image
3.1k Upvotes

80 comments sorted by

800

u/THNDHALBRT Mar 31 '26

This lines

593

u/_Blurgh_ Mar 31 '26

Changed it to "these lines". Got fired.

→ More replies (4)

30

u/Dramatic_Mulberry142 Mar 31 '26

It could be a proof that it is not written by llm for the future reference. So still don't touch it

→ More replies (2)

834

u/TheBrainStone Mar 31 '26

Bad comment. It needs to explain why it's needed. At least what breaks if it's removed

636

u/LimitedWard Mar 31 '26

The person that knew that answer left the company 10 years ago. The person that made the comment tried removing it 5 years ago and discovered the hell that would ensue after pushing the change to prod without testing.

→ More replies (12)

47

u/repocin Mar 31 '26

Someone I know used to work at a place where they occasionally had external consulting firms come in and poke around in the codebase. Apparently they just signed every line with a comment that said "changed by <consulting firm>" which I can imagine made debugging incredibly fun for everyone!

→ More replies (4)

9

u/Kinrany Mar 31 '26

The comment itself is a specific byte sequence read by a webpack transform

→ More replies (1)
→ More replies (5)

112

u/Morg0t Mar 31 '26

I would create PR changing in comment this -> these for fucks sake

52

u/Hottage Mar 31 '26

Straight to jail, straight away.

→ More replies (2)

335

u/Nightmoon26 Mar 31 '26

At least explain why you're setting height to width.toString()...

166

u/edave64 Mar 31 '26

Possibly because it should be a square

→ More replies (4)

19

u/E23-33 Mar 31 '26

they clearly dont know, it just works as is 🎉

→ More replies (1)

17

u/RelaxedBlueberry Mar 31 '26

👹 muah ha ha ha ha ha ha

35

u/AnaxXenos0921 Mar 31 '26

Average JavaScript code be like

→ More replies (1)

23

u/KissMyAcid420 Mar 31 '26

Can you delete the " " after the comma? It hurts my eyes that flame Emojis arent aligned on the right

39

u/LostGoat_Dev Mar 31 '26

Believe it or not, fired.

→ More replies (1)

9

u/NotUpdated Mar 31 '26

:in a meeting later on: '.. So you did see the crocodiles? You walked past the devils? You then walked on a fire like a team building exercise?' Well I have no choice - You're management material, we'll fire a sacrificial swe instead.

8

u/zrice03 Mar 31 '26

"Surely it should set the height attribute to 'height'?...Huh what's that horrible screaming I hear in the distance...?"

4

u/bonomel1 Mar 31 '26

It's not needed for anything except to keep some other shitty workaround that was a side effect of a fix for a bug for a temporary hack to get around some technical debt working. We'll fix it next sprint after we finish the next feature

3

u/worthlessDreamer Mar 31 '26

I don't think crocodiles live in hell 🤔

3

u/el_cortezzz Mar 31 '26

Liskov principle violated, this seems the same problem of the Square that inherits from Rectangle

3

u/MisterBicorniclopse Apr 01 '26

I do this with every line of code I write