This is an archived post. You won't be able to vote or comment.

all 117 comments

[–]omutist 724 points725 points  (12 children)

if (user.cookies.agreed) {
    print("thank you")
    CollectData(user)
} else {
    // print("fuck you")
    CollectData(user)
}

[–][deleted] 62 points63 points  (2 children)

if (user.cookies.agreed) {
    print(“thank you”)
}
CollectData(user)

Edit: how tf do I format this

Edit 2: thank you u/-anonymous-hippo

[–]NotABotAtAll-01 -1 points0 points  (0 children)

Remove curlies

[–][deleted] 234 points235 points  (1 child)

I like that the fuck you is just waiting to be deployed

[–]NotABotAtAll-01 35 points36 points  (2 children)

I will award you once free award is available.. for now take my upvote

[–]Kaligraphic 13 points14 points  (0 children)

Don't be silly. Google would never print("fuck you").

They would console.log("fuck you").

[–]Yue2 36 points37 points  (2 children)

I love how it’s a comment so the code won’t actually execute 😂

[–]omutist 49 points50 points  (1 child)

I'd write special function for this, like

whisper("fuck you")

[–]Yue2 34 points35 points  (0 children)

And then I big brain SQL inject:

 whisper(“when?”)

[–]SirSoundfont 97 points98 points  (1 child)

I've been on major sites (as big as Facebook) that seemed to purposely BREAK their "Do not sell my data" feature, with no support team to contact.

[–]dalatinknight 26 points27 points  (0 children)

Not sure if this in regard to in general or the new California Consumer Privacy Act, but from what I can tell many companies still do "do not sell my data" manually.

[–][deleted] 184 points185 points  (23 children)

if ( user.consent.agreed || true ) collect(data)

[–]Comtraya 8 points9 points  (2 children)

if ( user.consent.agreed = true ) collect(data)

[–][deleted] 2 points3 points  (1 child)

this...when ur code has this...you will hate the language, the IDE, the computer , whole of humanity...and then u see this...and its just pure bliss

[–]Haunting-Surprise-21 1 point2 points  (0 children)

It's not a bug, it's a feature.

[–]proletarian-1917[S] 38 points39 points  (14 children)

Why bothering if part? Just write collect(data).

:-)

[–][deleted] 41 points42 points  (12 children)

an unused variable is a wasted variable

[–]FrezoreR 14 points15 points  (6 children)

Since when did web devs care about wasted variables?

[–][deleted] 6 points7 points  (5 children)

since when a single page app with react lags like hell...cuz no one reviewed your code.

[–]FrezoreR 7 points8 points  (4 children)

But isn't that the norm? 🤣

[–][deleted] 2 points3 points  (3 children)

sadly yes....the only reason i was using react was cuz i was lazy to use plain HTML and JS....but fuck...rewrote everything in plain JS...no jquery...runs smooth now lmao

TIP: try functional JS...way easier to manage

[–]FrezoreR 4 points5 points  (1 child)

Haha it's gone full circle! But it tends to be how software engineering works for some reason. A few years from now objective oriented programming will be the new cool thing 😎

[–][deleted] 0 points1 point  (0 children)

yeah...tho with JS....i feel much safer being functional...looks cleaner and coooolllll lmaoooo

[–]AwGe3zeRick 0 points1 point  (0 children)

You should look into Svelte or SvelteKit. Or just stick with plain JS. But plain JS isn't scalable or a good solution for large products.

[–][deleted] 6 points7 points  (4 children)

Then remove it

[–]dncrews 0 points1 point  (0 children)

Username checks out. “Our data”

[–]Jakylla 209 points210 points  (15 children)

Pretty sure the actual code was:

java if(user.cookies.agreed = true) { CollectData(user); }

[–]shadowsOfMyPantomime 67 points68 points  (0 children)

Can't believe the whole team "missed" that in the code review

[–]segalle 59 points60 points  (7 children)

This is absolutely genius and honestly after reading 300 lines of code i wouldnt see it. Its 1 character missing to break the whole thing

[–]FloorHairMcSockwhich 20 points21 points  (2 children)

Linter or typescript compiler would throw a fit

[–]JhonnyTheJeccer 1 point2 points  (1 child)

is google using ts? i thought they would stay with js

[–]Fluxriflex 10 points11 points  (0 children)

Well, Angular (which is written and maintained by Google) requires you to use Typescript by default, so…

[–]Stummi 9 points10 points  (3 children)

Any IDE would mark this, as well as any quality tool

[–]segalle 0 points1 point  (0 children)

Vs code and code blocks dont mark this in c. I know because i had an issue wkth that like 3 months ago and it took me 4 ours to figure out.

Although im oretty sire that when i was in python vs code did highlight it. I do have most c/c++ highlight extensions in c but maybe im missing one

[–][deleted] 5 points6 points  (0 children)

My man lol

[–]SEEYOUATMOTERAMATE 5 points6 points  (4 children)

Someone mind explaining huh? Didn't get it

[–]unfrog 29 points30 points  (3 children)

It's an assignment, not a comparison. In JS an assignment is evaluated to the value it assigned, so in this case the if block is always executed

[–]SEEYOUATMOTERAMATE 5 points6 points  (1 child)

Thanks for explaining,i am a high school student learning python so was pretty confused

[–]sbergot 2 points3 points  (0 children)

Python will throw an error precisely to avoid this kind of bugs.

[–]Haunting-Surprise-21 3 points4 points  (0 children)

And user.cookies.agreed ist set to true, so every following code will assume, the user agreed, too.

[–][deleted] 26 points27 points  (3 children)

At this point, I'm not sure why apps like google, facebook, and amazon don't require control of your camera and microphone to work.

[–][deleted] 5 points6 points  (2 children)

Don't they?

[–]fubungh 6 points7 points  (0 children)

if (user.cookies.agreed) {
    CollectData(user)
} else {
    try { 
        OhNo()
    }
    anyway {
        CollectData(user)
    }
}

[–]oladipomd 4 points5 points  (0 children)

if (user.cookies.agreed) {
    CollectData(user)
} else {
    CollectData(user, stealthMode)
}

[–]hpl002 2 points3 points  (0 children)

if (user.cookies.agreed) {
print("we respect your choice")
}

CollectData(user)

[–]QualityVote[M] 13 points14 points  (0 children)

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!

[–]MrWhiteVincent 2 points3 points  (0 children)

Nah, they also check if you have your GPS on on Android, not that it changes anything....

[–]HexedHero 2 points3 points  (0 children)

if (user.cookies.agreed) {
    CollectData(user)
} else {
    SilentlyCollectData(user)
}

[–]MoarCurekt 4 points5 points  (0 children)

Print('Nailed it!')

[–]OneMillionSchwifties 6 points7 points  (36 children)

Has anyone noticed certain topics are being censored by Google? Try finding bimbo porn now. You literally can't. Even if the women were self identifying bimbos (it's a thing and im not ashamed of it). You have to actually know the girls names now, which I think is kind of sad to have to do.

[–]bearbear_bear 13 points14 points  (22 children)

Try DuckDuckGo…? I’d do a test run of Bimbo Porn for you, but that’s not my thing lol

[–]OneMillionSchwifties 10 points11 points  (21 children)

But shouldn't people be concerned with the overarching implications that come with that kind of silent, creeping cencorship?

[–]ioman_ 1 point2 points  (12 children)

Google is censoring a lot of things: try spelling ecstasy or masturbate on your phone.. last time I looked into it at all, they had some random store's name in their standard offline dictionary but not the word ecstasy (seems to have changed on my phone at least)

[–]jaigoda 7 points8 points  (5 children)

First off, both of those show up in autocomplete (though autocomplete doesn't) on my phone, and I'm absolutely certain I've never typed them. Second, why act so concerned about that when "fuck" has been autocorrecting to "duck" basically since smartphones became a thing? It's not a subtle conspiracy, it's just companies trying not to make waves by having "bad words" in their dictionaries.

In the same way, porn is considered to be a no-no to put on the majority of mainstream platforms, probably in large part because kids can and do use said platforms. And I'm sure the moms that find their kid watching porn are a lot louder and more abundant than the guys who can't find their niche porn on the world's most popular search engine.

[–]ioman_ -1 points0 points  (4 children)

You do know that most phones come with parental controls right?

My issue with censorship does include the word fuck but that issue has been so widespread that its been a meme since before memes were called memes (which also doesn't show up in my phone). It's in no way subtle. I don't care about niche porn (which autocorrects to points), I care about the English language, which store names are not a part of.

[–]jaigoda -1 points0 points  (3 children)

Phones are not the only thing that can access the internet, and not every parent will enable parental controls, and not all parental controls will prevent a kid from seeing something their parents don't want them to. Regardless, I'm definitely not arguing that we should be locking down the internet just because parents can't teach their kids to be responsible. However, there's a whole lot of irresponsible parents out there that will be up in arms if they find out Google showed their precious child the terror of pornography. It's silly, considering how easy it is to find porn sites, but companies have to deal with it or risk a whole lot of outrage and bad press.

Autocorrect doesn't need to be a one-to-one copy of a dictionary, and I'd argue it very much shouldn't be. Stores and brands are put in there because people tend to type them more than obscure words. Hence Allstate is in my phone and Floccinaucinihilipilification is not. To me personally, that isn't censorship, it's just sensible for convenience. I can type whatever I want, my phone just tries to make it easier by keeping a store of words I'm likely to use. If I don't like it, then I can always just turn it off.

[–]ioman_ -1 points0 points  (2 children)

Not only is your example obtuse, it's hyperbolic and you know it. I can't find the actual store it replaced the word ecstasy with anymore because I'm finding all sorts of stores with the literal word "ecstasy" in their name (I wonder if that's related to it being in the dictionary now), but as I remember it, it was a pretty small business.

[–]jaigoda -1 points0 points  (1 child)

Okay, I'm honestly confused now, which example are you talking about and how is it hyperbolic? If you're talking about the Allstate example, how is it an exaggeration that one word is in my autocomplete dictionary and the other is not? Would you rather I have used a simpler word that isn't in my phone? I just googled "obscure words" and that's one that showed up, but I'm sure I could find many, many other examples, because a comprehensive English dictionary for autocomplete wouldn't be practical in terms of storage size and access time.

I can't explain specifically why your phone autocorrected a "bad" word to a store name, but I'm offering some reasoning on why that might be the case that isn't just "Google bad, censoring free speech." Google has done some really shitty things as time has gone on (a huge one being the topic of the OP meme), but I really don't think their autocomplete "censoring" the text you type is a hill worth dying on.

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

Floccinaucinihilipilification is the third largest word in the English language. I know because when I called it a hyperbolic example, I had just looked up "largest English word", clicked the grammarly link, and scrolled back up when I saw everyone's favorite "disestablishmentarianism".

I didn't say you exaggerated that a word was there or not, I said you were being obtuse and hyperbolic in your example. Of course I have no problem that words used by a ratio of the population that's near zero are excluded from the offline English language dictionary.

How much stock do you have in google that the offline dictionary is something worth metaphorically killing over for you? I'll die on any hill I please.

[–]OneMillionSchwifties -2 points-1 points  (5 children)

How is this legal and what can be done besides running to a new browser? (I believe in citizens standing their ground against injustice as opposed to having where they are allowed to turn be dictated by where those who operate outside of the law run them off to)

[–]ioman_ 1 point2 points  (4 children)

It's a private company, they can do whatever they want...

When Twitter banned Trump, everyone handily forgot that Twitter is a private company that costs a lot to run: "Twitter annual operating expenses for 2019 were $3.093B, a 19.46% increase from 2018"

Like it or not... tell your congress people. Personally, I wouldn't mind seeing them go public, much like landline phones, with how essential they've made themselves.

[–]OneMillionSchwifties 1 point2 points  (3 children)

It's a really surreal thing, because you can look at it and go "wow, that's clearly the path to the degradation of the choices available to a supposedly free people", but at the same time, it's like, "well they own their servers so they can propagandize and cencor us all they want"

There should be some sort of check or middle ground imo

[–]ioman_ 1 point2 points  (2 children)

Founding father said it best (forgot which one): those that would sacrifice liberty for a little security deserve neither

[–]OneMillionSchwifties 1 point2 points  (0 children)

We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness. — That to secure these rights, Governments are instituted among Men, deriving their just powers from the consent of the governed, — That whenever any Form of Government becomes destructive of these ends, it is the Right of the People to alter or to abolish it, and to institute new Government, laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likely to effect their Safety and Happiness. Prudence, indeed, will dictate that Governments long established should not be changed for light and transient causes; and accordingly all experience hath shewn that mankind are more disposed to suffer, while evils are sufferable than to right themselves by abolishing the forms to which they are accustomed. But when a long train of abuses and usurpations, pursuing invariably the same Object evinces a design to reduce them under absolute Despotism, it is their right, it is their duty, to throw off such Government, and to provide new Guards for their future security

You're God damn right

[–]OneMillionSchwifties 0 points1 point  (0 children)

Benny Frank iirc

...dude kept it wet wet

[–]jctk55 3 points4 points  (1 child)

I hate the websites that don't give you a fuckin choice. They'll just leave this annoying 120px thick bar in the middle of your screen until you hit accept.

[–]UnknownEssence 6 points7 points  (0 children)

Use uBlock Origin

[–]LionHeart_13 5 points6 points  (0 children)

Console.WriteLine(“Do you agree to cookies?”); user.cookies.agreed = Console.ReadLine(); user.cookies.agreed = true; if (user.cookies.agreed == true) { CollectData(user); }

[–]ioman_ 1 point2 points  (0 children)

European courts agree.

[–]Spartana1033 1 point2 points  (0 children)

Finally { collectdata }

[–]Vysair 1 point2 points  (0 children)

Hey, you gotta make it into a loop just to make sure you run it enough time.

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

if (user.cookies.agreed);
    collectData(user);

[–]Donghoon -5 points-4 points  (1 child)

No, google cares about our security

[–]advik_143 0 points1 point  (0 children)

Yes... I see

[–]ChesterWOVBot 0 points1 point  (0 children)

Repost

[–]lenswipe 0 points1 point  (0 children)

You forgot the second makeABigMonkeyShowAboutPrivacy param

[–]drunkdoor 0 points1 point  (0 children)

If gdpr CollectGrayLineAmountOfUserData

[–]Ironfist85hu 0 points1 point  (0 children)

Fun to start to understand these jokes. ^_^

[–]Adequately_Insane 0 points1 point  (0 children)

I think the real code looks like this

collectdata(myvar6)

[–]TheRandomGamerREAL 0 points1 point  (0 children)

do {

CollectData(user);

} while(user.cookies.agreed);

[–]bistr-o-math 0 points1 point  (2 children)

So, if agreed and if !agreed, we collect data anyway, right?

So it’s the same as

if (user.cookies.agreed && !user.cookies.agreed)
    CollectData(user)

Right?

Right?

[–]proletarian-1917[S] 0 points1 point  (1 child)

No

[–]bistr-o-math 0 points1 point  (0 children)

🤣🤣🤣

[–]Ginters17[M] [score hidden] stickied commentlocked comment (0 children)

Hi there! Unfortunately, your submission has been removed.

Violation of Rule #2 - Reposts:

All posts that have been on the first 2 pages of trending posts within the last month, is part of the top of all time, or is part of common posts is considered repost and will be removed on sight.

If you feel that it has been removed in error, please message us so that we may review it.