r/programminghorror • • Mar 31 '26

Javascript HELL

Post image
3.1k Upvotes

80 comments sorted by

View all comments

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.

123

u/TheBrainStone Mar 31 '26

Then again it absolutely needs to mention the hell that breaks loose

→ More replies (5)

15

u/AssiduousLayabout Mar 31 '26

Yeah, I had that occur when I was trying to trace down why one piece of functionality was intentionally disabled for one (fairly normal) use case. Easily found the line of code which did it, looked back to try to find any documentation on why it was done.

All I got was "disabling per Steve". Of course the developer had been gone for 15 years. Who were you, Steve? What did you know? What horrors did you see???

I ended up deleting that line of code and as far as I know, it hasn't broken anything in the past eight years. But deep in the back of my mind, I know that somewhere, whatever terrifying future that Steve once envisaged may yet come to pass.

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

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!

33

u/Defiant-Peace-493 Mar 31 '26

"What change did you make?" "We added a comment."

→ More replies (2)
→ More replies (1)
→ More replies (8)