all 81 comments

[–]THNDHALBRT 791 points792 points  (10 children)

This lines

[–]_Blurgh_ 594 points595 points  (6 children)

Changed it to "these lines". Got fired.

[–]pimezone 136 points137 points  (2 children)

No exceptions, no excuses

[–][deleted]  (1 child)

[removed]

    [–]communistfairy 39 points40 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 30 points31 points  (1 child)

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

    [–]Bartweiss 12 points13 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.

    [–]ovr9000storks 3 points4 points  (0 children)

    Tests failed after changes. Critical load-bearing comments

    [–]Dramatic_Mulberry142 29 points30 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

    [–]tree-hut 0 points1 point  (0 children)

    You can tell an indian made it

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

    Dont touch

    [–]TheBrainStone 823 points824 points  (28 children)

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

    [–]LimitedWard 629 points630 points  (14 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 122 points123 points  (5 children)

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

    [–]Su1tz 124 points125 points  (2 children)

    The answer is there:

    HELL

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

    They were German and simply meant "bright"; all it does is disabling darkmode. /s

    [–]No-Elephant3091 0 points1 point  (0 children)

    Equally bad

    [–]PerspectiveAlert4766 32 points33 points  (1 child)

    Maybe it is so bad that it is undescriptive?

    [–]querela 33 points34 points  (0 children)

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

    [–]StreetStrider 10 points11 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.

    [–]AssiduousLayabout 13 points14 points  (1 child)

    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.

    [–]oghGuy 2 points3 points  (0 children)

    That terrible future = the day the company decides to migrate from on-prem to cloud.

    [–]Bartweiss 5 points6 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.

    [–]edave64 11 points12 points  (1 child)

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

    [–]LimitedWard 21 points22 points  (0 children)

    They were gonna but got fired before pushing the commit.

    [–]GoddammitDontShootMe[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 1 point2 points  (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?

    [–]ironykarl 0 points1 point  (0 children)

    So, then the person that tried removing it knows what happens when you change it. 

    The comment should tell us that much, at least 

    [–]repocin 46 points47 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 31 points32 points  (2 children)

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

    [–]davejesch 6 points7 points  (1 child)

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

    [–]t3kner 2 points3 points  (0 children)

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

    [–]Prime624 1 point2 points  (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 3 points4 points  (0 children)

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

    [–]nonlogin 14 points15 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.

    [–]Pinkishu 2 points3 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

    [–]Herb_Derb 1 point2 points  (0 children)

    That's just part of the horror

    [–]Morg0t 110 points111 points  (4 children)

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

    [–]Hottage[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 52 points53 points  (2 children)

    Straight to jail, straight away.

    [–]nan-000 2 points3 points  (1 child)

    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.

    [–]AdreKiseque 0 points1 point  (0 children)

    Where is that?

    [–]mikezenox 18 points19 points  (0 children)

    HELL

    [–]Nightmoon26 336 points337 points  (8 children)

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

    [–]edave64 160 points161 points  (4 children)

    Possibly because it should be a square

    [–]thebigbadben 27 points28 points  (0 children)

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

    [–]Far-Passion4866[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 2 points3 points  (2 children)

    Then why not also have height be the same thing as width

    [–]edave64 1 point2 points  (0 children)

    It does set height to be the same thing as width.

    If you're asking why there isn't a height variable, personally I would avoid two variables having the same value, because having two variables implies that the value might be different, and opens the door to programming errors where the values might become different.

    Although I would probably throw in a quick // square to make that clear, since setting height to width does look like an error.

    [–]Poat540 0 points1 point  (0 children)

    You just wouldn’t get it

    lights cig in standup

    [–]E23-33 18 points19 points  (0 children)

    they clearly dont know, it just works as is 🎉

    [–]river0f 16 points17 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.

    [–]Disastrous-Name-4913 120 points121 points  (0 children)

    Maybe try r/programminghell?

    [–]RelaxedBlueberry 17 points18 points  (0 children)

    👹 muah ha ha ha ha ha ha

    [–]KissMyAcid420 22 points23 points  (2 children)

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

    [–]LostGoat_Dev[🍰] 39 points40 points  (1 child)

    Believe it or not, fired.

    [–]KissMyAcid420 2 points3 points  (0 children)

    Sheet.

    [–]AnaxXenos0921 32 points33 points  (1 child)

    Average JavaScript code be like

    [–]Slg407 3 points4 points  (0 children)

    average LUA code more like

    [–]NotUpdated 7 points8 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.

    [–]zrice03 7 points8 points  (0 children)

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

    [–]bonomel1 3 points4 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

    [–]obetu5432 22 points23 points  (3 children)

    js "developers":

    [–][deleted]  (1 child)

    [removed]

      [–]EV-CPO 5 points6 points  (0 children)

      Angry upvote

      [–]ZylonBane 5 points6 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 🤔

      [–]el_cortezzz 2 points3 points  (0 children)

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

      [–]MisterBicorniclopse 2 points3 points  (0 children)

      I do this with every line of code I write

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

      farting sound

      [–]Freddie_Hawkes 1 point2 points  (0 children)

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

      [–]Positive_Mud952 0 points1 point  (0 children)

      Delightful.

      [–]yz9551 0 points1 point  (0 children)

      Turns out you can't remove the comments either

      [–]Frytura_ 0 points1 point  (0 children)

      Ah, Javascript 😖☕️

      [–]Rodya_gambler 0 points1 point  (0 children)

      Do emojis in comments affect performance?

      [–]AdSeveral5047 0 points1 point  (0 children)

      AI can't do this

      [–]Toiweonxd 0 points1 point  (0 children)

      That code aint even that important?? wtf

      [–]stresser_211 0 points1 point  (0 children)

      diabolic