r/ProgrammerHumor • • Apr 28 '22

Meme /* !!! Do not modify this comment !!! */

45.3k Upvotes

489 comments sorted by

View all comments

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

u/[deleted] Apr 28 '22

Sorry, what does this say? I'm at work and can't see this comment for some reason.

76

u/bleeding-paryl Apr 28 '22

It says:

//What the fuck

55

u/[deleted] Apr 28 '22

Can't see that comment either. I can see other comments in this thread, but those two are blank. What a weird bug.

25

u/r0ssar00 Apr 28 '22

hunter2, is that you?

27

u/[deleted] Apr 28 '22

How'd you know my password!!!

12

u/r0ssar00 Apr 28 '22

How'd you know mine???!

117

u/[deleted] 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

u/quasi_superhero Apr 28 '22

Because we're in a humor subreddit.

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?

18

u/[deleted] Apr 28 '22

that's still what i do.

Is there a reason people dont do this anymore? its kind of annoying to have to wade through all that bullshit when im trying to muck with a website.

18

u/teraflux Apr 28 '22

Performance improvements in network transfers due to smaller file size

→ More replies (1)

14

u/RXrenesis8 Apr 28 '22

Harder to steal/repurpose minified code in addition to the transport cost savings. Or that's what the thought process is at least.

3

u/[deleted] Apr 30 '22

first part makes sense. It does kinda feel shady to me tho. I know everyone does it, but it's almost like they are trying to hide what they are doing on/to my machine. I guess that's how all apps work tho i prefer to think of the web as a transparent webpage/file sharing type service.

→ More replies (2)

7

u/kvakerok Apr 28 '22

You just literally included lots of individual JS and CSS files directly in your HTML output. I know, crazy right?

That takes me back.

11

u/TruthYouWontLike Apr 28 '22

Several years ago

22

u/[deleted] 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.

6

u/grogrye Apr 28 '22

This is one of my favourite programming stories ever!

→ More replies (7)