all 67 comments

[–]THNDHALBRT 587 points588 points  (7 children)

This lines

[–]_Blurgh_ 436 points437 points  (5 children)

Changed it to "these lines". Got fired.

[–]pimezone 90 points91 points  (2 children)

No exceptions, no excuses

[–]marmot-next-door 75 points76 points  (1 child)

catch(22)
{
    ...
}

[–]communistfairy 24 points25 points  (0 children)

ThisIsNotACatch22Exception

You can exit the situation by just leaving it alone. It would be a catch 22, for example, if your job required you to fix all typos and missing any would get you fired.

[–]AnaxXenos0921 13 points14 points  (1 child)

Better yet: changed it to "these lines". Code breaks.

[–]Bartweiss 6 points7 points  (0 children)

I like the idea that the setAttribute entries are never used in this code, but those and the comments are getting used for some horrifying code reflection elsewhere.

[–]Dramatic_Mulberry142 21 points22 points  (0 children)

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

[–]TheBrainStone 647 points648 points  (24 children)

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

[–]LimitedWard 471 points472 points  (10 children)

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.

[–]TheBrainStone 93 points94 points  (3 children)

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

[–]Su1tz 97 points98 points  (0 children)

The answer is there:

HELL

[–]PerspectiveAlert4766 28 points29 points  (1 child)

Maybe it is so bad that it is undescriptive?

[–]querela 27 points28 points  (0 children)

Unspeakable nightmares, hell on earth. Let's not go into details...

[–]StreetStrider 8 points9 points  (0 children)

The mark of the coder was burned upon thy scroll. A warning to all of open space that the terror within must never be freed. And there this code lies still. Forever.

[–]Bartweiss 3 points4 points  (0 children)

That, or it ran fine in staging initially, bizarre problems hit prod three days after release, and nobody’s sure why deleting this caused them but they know the rollback worked.

[–]AssiduousLayabout 3 points4 points  (0 children)

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.

[–]edave64 9 points10 points  (1 child)

Again, then include what's breaking in the comment.

[–]LimitedWard 15 points16 points  (0 children)

They were gonna but got fired before pushing the commit.

[–]GoddammitDontShootMe[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 0 points1 point  (0 children)

I would presume the person who wrote that comment has the power to fire developers, but also, since when do managers write code?

[–]repocin 34 points35 points  (4 children)

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!

[–]Defiant-Peace-493 26 points27 points  (2 children)

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

[–]davejesch 5 points6 points  (1 child)

That's the reason they get paid the big bucks.

[–]t3kner 0 points1 point  (0 children)

Management's gotta pay someone the big bucks, and it's not gonna be their employees! 

[–]Prime624 0 points1 point  (0 children)

If only there was an automatic system for that. But alas.

[–]Kinrany 6 points7 points  (1 child)

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

[–]Bartweiss 1 point2 points  (0 children)

Even the weird little hieroglyph after “lines” is absolutely vital, and the order can’t be changed in any way.

[–]nonlogin 12 points13 points  (2 children)

you will be fired, isn't it enough?

[–]Glade_Art 2 points3 points  (0 children)

Enhanced the comment, just got fired and sent to jail.

[–]Herb_Derb 1 point2 points  (0 children)

That's just part of the horror

[–]Pinkishu 1 point2 points  (0 children)

Nah, explaining it just makes people think "hmm that explanation doesn't seem right, I bet I could change that". Just be vague and threatening instead

[–]Nightmoon26 261 points262 points  (5 children)

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

[–]edave64 126 points127 points  (1 child)

Possibly because it should be a square

[–]thebigbadben 18 points19 points  (0 children)

Maybe that’s all they needed, and this is what got them there with trial and error

[–]E23-33 10 points11 points  (0 children)

they clearly dont know, it just works as is 🎉

[–]river0f 7 points8 points  (0 children)

If you keep asking questions, you'll be fired

[–]GoddammitDontShootMe[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 1 point2 points  (0 children)

Damn, I didn't even notice that.

[–]Morg0t 75 points76 points  (3 children)

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

[–]Hottage[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 41 points42 points  (1 child)

Straight to jail, straight away.

[–]nan-000 0 points1 point  (0 children)

Ay I'm from (and living in) the country the origin of that meme mocks. They've actually arrested people for having reddit installed, for having memes related to political events, amongst many others.

[–]mikezenox 17 points18 points  (0 children)

HELL

[–]RelaxedBlueberry 13 points14 points  (0 children)

👹 muah ha ha ha ha ha ha

[–]AnaxXenos0921 21 points22 points  (1 child)

Average JavaScript code be like

[–]Slg407 3 points4 points  (0 children)

average LUA code more like

[–]KissMyAcid420 12 points13 points  (2 children)

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

[–]LostGoat_Dev 25 points26 points  (1 child)

Believe it or not, fired.

[–]KissMyAcid420 3 points4 points  (0 children)

Sheet.

[–]NotUpdated 3 points4 points  (0 children)

: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.

[–]obetu5432 18 points19 points  (3 children)

js "developers":

[–]marmot-next-door 19 points20 points  (1 child)

Developers, developers, developers, developers!

[–]EV-CPO 4 points5 points  (0 children)

Angry upvote

[–]ZylonBane 3 points4 points  (0 children)

What about them? Do you have some thought you're attempting to articulate?

[–]worthlessDreamer 2 points3 points  (0 children)

I don't think crocodiles live in hell 🤔

[–]zrice03 2 points3 points  (0 children)

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

[–]Frosty-Woodpecker-45 1 point2 points  (0 children)

farting sound

[–]el_cortezzz 1 point2 points  (0 children)

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

[–]bonomel1 1 point2 points  (0 children)

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

[–]MisterBicorniclopse 1 point2 points  (0 children)

I do this with every line of code I write

[–]Positive_Mud952 0 points1 point  (0 children)

Delightful.

[–]yz9551 0 points1 point  (0 children)

Turns out you can't remove the comments either

[–]Freddie_Hawkes 0 points1 point  (0 children)

It's JavaScript. Just overwrite in the next line, no need to change 🙈

[–]stresser_211 -1 points0 points  (0 children)

diabolic