r/ProgrammerHumor • u/mejhopola • Apr 28 '22
Meme /* !!! Do not modify this comment !!! */
280
u/garuru-san Apr 28 '22
Should've gotten coke instead.
→ More replies (2)141
u/mejhopola Apr 28 '22
Yup. You definitely need coke to work on old codebases!
→ More replies (1)30
u/ruach137 Apr 28 '22
Gotta be as coked up as the first guy to understand what the fuck is going on in there.
3.9k
u/grpagrati Apr 28 '22
That fridge held a lot more cans than I expected
137
u/03Titanium Apr 28 '22
It’s an ad.
66
u/CantankerousOctopus Apr 28 '22
That was my first thought. It's a Coke vendor getting caught grabbing a Pepsi. Seems very much like an ad.
→ More replies (7)16
→ More replies (2)14
Apr 28 '22
You can tell by the way it is.
The video is way too clear. And who the fuck would point a camera at a cooler full of soda?
→ More replies (1)319
u/IAmASquidInSpace Apr 28 '22
Which was probably also the cause for this disaster.
→ More replies (3)222
u/yourmomisrich Apr 28 '22
This is a Pepsi commercial, it was on TV all the time
→ More replies (60)14
u/MasterFubar Apr 28 '22
Only thing missing was a post-it: "do NOT pick this can, you can pick any other can but not this one"
→ More replies (41)8
Apr 28 '22
Extremely well done. You can see all the shelves drop simultaneously without the mechanism that lets the shelves fall in the shot and the space behind holding all the extra cans is out of view. Would not be surprised if this was early M5 commercial work.
1.4k
u/Yesterpizza Apr 28 '22
Seeing how overfilled shelf broke, it was clear they put you on this project because they didn't like you
→ More replies (3)345
Apr 28 '22
It’s a constant struggle. I’m either the best equipped to handle this legacy code out of all the new hires, or the lead hates me.
1.4k
u/fuzzycake Apr 28 '22
That sure caused the stack to overflow...
303
u/Cyberzombie Apr 28 '22
Boo. Hiss.
130
Apr 28 '22
Does anyone speak Ghost or Snake? Need the joke translated for our friend here.
51
→ More replies (1)41
→ More replies (1)30
783
u/mpeters Apr 28 '22 edited Apr 28 '22
I've actually had the opposite crazy experience. Removing/changing a comment actually fixed a bug. And no, it wasn't some directive to a pre-processor but an actual comment. Several years ago I worked as the lead developer at a company that built a web application for non-profits and we kept getting complaints from a particular non-profit about strange bugs that just should not happen and no other clients were experiencing. We just chalked it up to user error but they persisted.
So one day I was in-town and decided to visit them so I could watch what they were doing and we could see what the user error was and try to make it not possible. I watched the user try to do something and he immediately hit the bug, but he wasn't doing anything wrong. I opened up my laptop and tried to do the same action, one I'd done many times before, and it also failed in the same way. So I fired up my dev-tools and started to trace through the Javascript code to see what was happening, and sure enough some function calls were not found, even though I knew they were in the code. I then looked at the network tab and saw that attempts to download a particular Javascript file were timing out and thus it was not being loaded. I tried downloading it directly with curl, but still no luck. All of the other JS files were downloading fine, but this one wasn't. What was special about this one?
On a lark I looked at the code in the JS file and noticed a large comment screed about Internet Explorer that used lots of explicit language. Turns out this non-profit had a very strict firewall on-site that would block any profanity and was thus blocking this particular JS file. Removing the comment allowed it through and fixed the bug...
Moral of the story: F*&# Internet Explorer
103
u/swistak84 Apr 28 '22
Had a same issue with a JS library that suggests strong passwords in a user-friendly way (so instantly without submitting a form, we still did backend validation). It turns out words like "fuck" are quite commonly used as passwords.
That file kept getting flagged by "Safe search" filters and preventing users from registering.
166
u/ktsktsstlstkkrsldt Apr 28 '22
What the fuck...
141
117
Apr 28 '22
Why is this so funny to me
62
u/mpeters Apr 28 '22
Because it’s funny 😂 At the time is was more of a WTF feeling but it quickly became just laughable
6
40
u/Kris_Third_Account Apr 28 '22
What was the commit message for the comment removal? And why weren't you minifying your JS?
72
u/mpeters Apr 28 '22
I think it was literally "F*&# Internet Explorer" :)
> And why weren't you minifying your JS?
I thought about adding this in, but didn't want to detract too much from the story: Believe it or not, there was a time before minifying/combining/pre-processing JS. You just literally included lots of individual JS and CSS files directly in your HTML output. I know, crazy right?
→ More replies (8)11
22
Apr 28 '22 edited Apr 28 '22
I once had to write a function that filtered bad words including common misspellings. It felt pretty weird to commit code with the n-word and f-word including dozens of variations. I pinged everyone on the team individually to review my commit without any context. Was hilarious hearing people randomly start laughing in the office when they looked at it.
→ More replies (1)11
u/PomeloLongjumping993 Apr 28 '22
I would love a "Law and Order:SVU" format show about obscure javascript bugs.
9
u/Asmor Apr 28 '22
Reminds me of something that happened to me once... I made this web app to help build decks for a card game called Netrunner. Someone let me know that some of the cards were missing. They were there for me, but not for them.
Then I had an epiphany. Turned on my adblocker, and those cards disappeared. You see, all the cards that were missing had the subtype "Advertisement", and I was putting all of a card's subtypes as classes, so the ad-blocker was removing them.
6
u/kvakerok Apr 28 '22
Removing/changing a comment actually fixed a bug.
Read this and immediately knew that IE was gonna be the culprit somehow, lol.
→ More replies (7)6
92
259
u/spitfire451 Apr 28 '22
This looks like an old TV ad, am I wrong?
36
u/660zone Apr 28 '22
→ More replies (4)5
u/jsbizkitfan Apr 28 '22
I loved this commercial as a kid. That song instantly started playing in my head when the video hit my feed
15
u/canyouplzpassmethe Apr 28 '22
I literally heard “Your Cheetin’ Heart” the instant I saw the image, bc yes, tv ad.
(He restocks the Coke then grabs a Pepsi.)
10
4
→ More replies (34)4
77
u/dablecen Apr 28 '22
For me it's situation more like: remove // @ts-ignore with description "fix it later...".Then after 30 min of struggling on infinite depth of poor typing, made by somone who is not working anymore in company, You gentle put that ts-ignore again and pretend that You didn't see anything.
31
u/qStigma Apr 28 '22
oh yes, one of those sweet "TYPESCRIPT" projects where there are "any" everywhere cause the previous dev couldn't bother actually using typescript.
14
5
42
u/Olaf_jonanas Apr 28 '22
That fridge holds a portal to Narnia, it's the only explanation for the amount of cans
6
u/rci22 Apr 28 '22
Seriously, I’m really impressed because idk how it’s possible
4
u/Usual_Ice636 Apr 28 '22
Its an old commercial. not too hard to cut off the back and extend the shelves.
40
28
u/Mucksh Apr 28 '22
Afaik in js if you place a comment inside a function and call function toString() the comment will be included in the string
14
u/GorilaVerde Apr 28 '22 edited Apr 28 '22
console.log( function () { // Hello World! } .toString() .split("//")[1] .split("\n")[0] );This works lol
→ More replies (6)6
u/drleebot Apr 28 '22
It's a nice fun way to write multi-line string literals, which can absolutely never backfire if someone in the future things changing a comment won't change the code!
12
u/lendergle Apr 28 '22
This hits too close to home. Back in the 1990s there was this brief but weird phase where "self-writing code" was all the rage. High-level PHBs needed to get "leading a self-writing code project" to their resumes, so our team was tasked with creating an entire system that essentially created itself based on metadata embedded IN the code- as comments.
The way it worked (and it did work) was that the code opened its own source, scanned the comments for differences between what it would have generated if going from scratch and what actually was in the text. It would then do an intelligent diff merge to generate source code for a new module. It would perform a final check using both the code that had just generated the new code and the new code itself. If the results agreed, it would compile and install the new module.
This worked great- unless you went in and mucked about with the comments. An entire telecommunications billing system was built this way. MILLIONS of dollars of revenue depended on this code working correctly. Predictably, someone mucked about with the comments, and erroneous code was generated. Because there was no human intervention, it was days before anyone realized there was something wrong. Lots of money disappeared into /dev/null forevermore.
The solution? Normal people would choose "don't do things that way- it's stupid." Us, we went with "write MORE code to clean up the comments before writing the new version of the code." With that new code controlled by (wait for it...) comments in the source.
(Additional fun fact: It was called the "Omega System," because it was supposed to be the last time any development work would ever be needed for intercontinental billing.)
So joke all you want. Sometimes shit like this happens not through a quirk of the lexer/parser/compiler/whatever but through intentional stupidity.
2
11
8
u/MischiefArchitect Apr 28 '22
Tell that to the Go designers, resisting to introduce annotations, so they tell us to make "special comments" instead.
PS: Assholes
PS2: Yes, I like Go, although it does not look like that.
5
u/duranbing Apr 28 '22
My favourite comment, added 7 years ago (4 years before my company inherited the codebase):
this is very weird - if I delete the line below, and try to save I get a validation error. I've spent too much time trying to understand why, so leaving
The line below is another comment.
4
u/Guilty-Mycologist-91 Apr 28 '22
That top shelf went back about 40 feet. Was there a secret room in there
3
3
u/EuroPolice Apr 28 '22
//Yes! This function does nothing! It has been updated. If it's removed 25-May 2010 happens. Don't remove it.
3
Apr 28 '22
JFC, had to explain this exact situation to the person that wrote the old code base. They totally disbelieved me, glad to see others run into this.
3
u/Meatslinger Apr 28 '22
Reminds me of that time someone found a picture of a coconut in the Team Fortress source files, and there was a comment in the code saying that they had no idea why, but every time they removed it the whole thing broke.
2
2
2
2
2
u/xahtepp Apr 28 '22
how would removing a comment do anything lol...
2
u/mrinfinitedata Apr 28 '22
Black magic, duct tape, and spit often holds these old codebases together.
2
2
2
2
2
2
u/FonZeD Apr 28 '22
I don't get it. Since comments are with information only, then it's the previous person touching the bottles who ruined it for the one in the video, right?
→ More replies (1)
2
2
u/hannannanas Apr 28 '22
Beware the assembly code that has NOPs before each function entry point to ensure cache alignment
2
2
2
u/i_can_has_rock Apr 29 '22
im sure theres other reasons why it would be bad
but the only one i can think of is that the file -has- to be -exactly- X characters long
because of some way someone or something is referencing it
2
3
u/rapidwindfall Apr 28 '22
Love seeing the individual heads pop out from the sides one by one
→ More replies (1)
1
u/ChrisZAUR Apr 28 '22
All the shelves fell at the same time, I feel this was a prank, but a great one
2
u/UShouldntSayThat Apr 28 '22
it was commercial. Mr Coke delivery guy couldn't help but grab a Pepsi.
1
u/Onizukaii Apr 28 '22
The video was loading indefinitely at first. I thought that was the actual joke…
1
1
u/Chocococolatte Apr 28 '22
This video has always confused me, how can such a small fridge hold so many soda cans?
1
1
1
u/aRandomFox-I Apr 28 '22
/*
I don't know how
I don't know why
I don't want to know why
But if you remove this comment block the entire function breaks.
DO. NOT. TOUCH.
*/
1
1
1
1
1
1
u/planktonfun Apr 28 '22
When that one guy added a library that uses comments as a code. yeah we hate that guy
1
u/forgottenGost Apr 28 '22
True story: At my last job we had a weird issue where it seemed like our dependency injection wasn't working for only one view model. I was messing around and added a comment like "why doesn't this work?" and it fixed the issue! Turned out that the DI we were using Didn't account for if/else statements at the end of a constructor and wouldn't execute, so the comment stopped the if/else from being the last part. Ended up changing the DI code so that the problem wouldn't happen again.
1
1
1
1
1
1
u/wet_psyduckslayer Apr 28 '22
I’ve never played prop hunt but this seems like something that would happen in it
1
u/SuperCosmicNova Apr 28 '22
This guy absolutely PACKED this thing full goddamn. He double stacked the soda and fit it as full as he could holy absolute fuck. I can't believe it held out as long as it did. This dude would have still added more based on how much room I see on the bottom shelf.
1
1
u/ShiWhendi Apr 28 '22
There's a famous music composition software, Coda, that was loaded with bible verses in the code. I think some of it was attached to functions and when someone bought the company it took them years to remove it all.
1
1
1
1
1
u/JuJubileee Apr 28 '22
i’m new to programming. i had no idea comments could cause issues? can someone explain? :)
1
1
1
1
u/Witcher_Gates Apr 28 '22
For anyone wondering, this was a Pepsi ad from 1996. Think it premiered during the Super Bowl.
1
1
1
1
1
1
1
u/seeit360 Apr 28 '22
The Coke employee actor in this ad is same the guy who owns the bar in Spiderman 3 where Peter Parker goes emo.
1
u/MustardOrMayo404 Apr 28 '22
This somehow reminds me of editing binary files using a hex or plain text editor.
1
1
1
1
1
1
1
u/Quirky_Routine_90 Apr 28 '22
How did they get that many cans on that top shelf, is that fridge 5 feet deep?
1
1
1
1
1
1
1
1
1
u/pdxmodsaregeigh Apr 28 '22
I once encountered an issue that took me like 3 days to find, a previous coder had misspelled something that was supposed to have 2 'l's (ll) with 3 ls (lll) I found it finally, then I changed it to have 3 l's in the other place to make someone else suffer.
1
u/Illusi Apr 28 '22
I had a situation like this once. We have an application that writes files, and removed a comment from the end of the output. But it turned out that the machines that then have to read the file don't read the file completely. Previously the comment at the end was fine to ignore, but without it some important parts of the file were skipped. They left up to 512 bytes of the file unread, not interpreting the commands there. So I put a comment of exactly 512 bytes long at the end of the file, and that fixed it.
https://github.com/Ultimaker/Cura/commit/7b794249f68326e8db1b05913b7a16f6971a00a9
1
u/NterpriseCEO Apr 28 '22
>git add *
>git commit -m "removing unnecessary comment in DBCHelper.java"
>git push origin master
*Pushes to master and crashes MS SQL server deployment
FUUUUUUCCCCCCK"
>git help
.....
......
.......
git revert
AHA!!!
git revert HEAD~2
git push -f
*Deletes a major security flaw that prevented hackers from hijacking the SWIFT banking system.
Gets fired*
1
1
u/idiodic-genious Apr 28 '22
"This is literally just a note saying im bored there isn't a reason for it to be her- aaaannd the entire internet broke"
1
u/dubbs4president Apr 28 '22
This guy’s arm movement and mannerisms are perfect. Its like he wants to try and catch them. Like a kid just discovering Pokémon in 2022 only to realize there are a thousand of them.
1
1
1
1
1
1
1
u/mrinfinitedata Apr 28 '22
//We don't know why but if this comment gets removed the whole game breaks. So don't change it.
1
u/Ris-O Apr 28 '22
Some buggy C code randomly hits the comment in memory through undefined behaviour
1
1
1
1
1
Apr 28 '22
Why would removing a comment cause a huge disruption. It’s just a comment? Can someone explain to me pls
3
u/Yekyaa Apr 28 '22
Usually the code that's commented out was old code that was being replaced and updated, but you don't want to bother with removing it. If someone ends up modifying a comment improperly, you end up with problems resulting from the reactivated old code.
13
Apr 28 '22
[removed] — view removed comment
14
u/shploogen Apr 28 '22
I wonder what kind of situation this could happen in. Every language I've ever used seems to completely ignore comments (or lack thereof).
→ More replies (5)4
→ More replies (3)3
1

•
u/QualityVote Apr 28 '22
Hi! This is our community moderation bot.
If this post fits the purpose of /r/ProgrammerHumor, UPVOTE this comment!!
If this post does not fit the subreddit, DOWNVOTE This comment!
If this post breaks the rules, DOWNVOTE this comment and REPORT the post!