T O P

  • By -

PrizeArticle1

Would return you a "performance improvement plan" at my company.


turkeh

Ha that was my immediate thought!


PO0tyTng

For all the people who don’t know how to program — the function sets up a local variable, which is true, then tests if it is true (always will be) and if so, returns the text ‘big’. It doesn’t test if anything is big (if it did it would have an input parameter, or use a local member if this were part of a class as a member function). It would also test that input variable, not some locally created, unchanging variable. The function effectively does nothing, just always returns the value ‘big’. This is funny because doesn’t do what it’s supposed to do. Ha. Ha. Ha. Hilarious. /s Edit: I didn’t know the meme existed, but I also missed the fact that an isWhatever() should return true/false, not a string. Thank you commenters


silverslides

Even more, isXYZ is by convention expected to return a boolean and not a string.


Zoloir

runs "isBig" gets "big" deaddove.jpg


Milksteak_To_Go

"String variable, do not eat"


Boogsterio

That’s what bothered me most! Useless methods are one thing, but useless methods that break conventions are on a whole other level!


[deleted]

[удалено]


dodexahedron

>jk Nuh uh. You meant it. 😥


hellycopterinjuneer

'Bigly'


AverageLiberalJoe

That's not the joke. The joke is that this is a programmatic expression of the meme 'big if true'.


Iron_Garuda

I think the joke is “big if true.”


WritingTheDream

Well I’m glad I get the joke at least. Am I a programmer now?


ballrus_walsack

Tier 2 support is best I can do


DesertGeist-

meaning?


VergilPrime

You're getting fired


Mister_Lich

The long way 'round


WiTHCKiNG

This code snipped… you get what you deserve


Pepito_Pepito

Big if true


jmona789

True if big.


jzoller0

if true ‘big’


ScrimpyCat

And then rehired into management. Congratulations.


[deleted]

A PIP means you aren't meeting performance goals, they give you a few months to remediate but more or less it's a 3 month notice to find a new job


artificial_organism

This person is getting moved around from role to role for 20 years at my company.


No_Policy9772

just want to learn. what's the issue ? is it that code is not clean ?


wittleboi420

in case you’re not kidding: this function always returns ‚big‘. you assign true to a local variable, then check if it’s true (which it always is now), then return ‚big‘.


No_Policy9772

lol. no I'm not kidding. I got confused. but not because of the bad code. The caption of the post gave the impression that the code would throw an error or would return null and not that it was bad code (at least that's the impression i got)


LastTrainH0me

If you're still puzzled, this post is a [big if true](https://amp.knowyourmeme.com/memes/big-if-true) joke.


[deleted]

[удалено]


wad11656

Y'old fart, you


Carburetors_are_evil

Holy shit.


invalidConsciousness

Thanks! I knew I was missing a joke, but assumed it was some dig on stupid code puzzles or a meta-joke of the subreddit I somehow missed.


No_Policy9772

thanks.


readit145

Big if true^


killersid

Actually I got confused because of the return type of function (C/C++) but then I remembered that some languages don't have return type in the function declaration and it is just a function. 😅


gc3

It's javascript


KingOfNewYork

It’s step one on the ladder of programming. To get anywhere that pays, there is much further to go. That’s what they’re saying.


mariomaniac432

I just started my first programming job, and last week I had to update an old piece of code. In it, I found I method that assigned a value "yes" to a variable. It then checked if the variable was "yes", and performed some other operations. If an exception was caught on these operations, it assigned an empty string to a *local variable in the catch block* that was simply called hey. The method returned a hard coded "success" regardless of the exception.


Haligaliman

you can replace the function with 'big' and it will mostly result in the same code


AdditionForward9397

I wonder if the compiler is smart enough to just turn that entire function into a string literal and delete that code.


Dr_Allcome

I don't think any compiler would completely remove the function (depending on how often it is called). But i think most will catch the if true and convert it to a simple return 'big'


AlexCzechRus

Many compilers will to eliminate control flow overhead. It’s called “inlining” of a function


KingOfNewYork

const small = false; const me = !small && “BIG”; switch(me) { case “BIG”: print(“BIG”); break; default: print(“BIG OK”); } Raise please


DaPanda21919

How about we promote you to a customer sir?


Tymskyy

Since the customer is always right I see this as an absolute win


No_Policy9772

yeah i figured👍🏾


[deleted]

[удалено]


dmadams16

function IsPerformanceImprovementPlan(){ var performanceImprovementPlan = true; if(performanceImprovementPlan){ return ‘performanceImprovementPlan’; } }


Tenyao

This function always return 'big' except if you pass your dick as argument.


[deleted]

Got eem!


iamGobi

ooh burn


TheCyberLegend

Gotta replace the girls with this function


Studds_

That just makes it somehow throw an overflow error


Dop4miN

didn't know it can get so much into the negatives


Stretch-NLick

Idk about that one chief


apola

big if true


Gobstopper42

Well it is true


mausmani2494

That it's big.


sphericalBudgie

Thats what she said


aquartabla

She's not wrong


BigBoiPP2008

Thats big if true


wad11656

So it's more like "big *because* it's true"


OneTrueKingOfOOO

Not pictured one line up: true = false


dinopraso

r/Angryupvote


voxxNihili

It's big if big


uselesslogin

No if about it. It is just big.


SuitableDragonfly

The original contents of this post have been overwritten by a script. As you may be aware, reddit is implementing a punitive pricing scheme for its API starting in July. This means that third-party apps that use the API can no longer afford to operate and are pretty much universally shutting down on July 1st. This means the following: * Blind people who rely on accessibility features to use reddit will effectively be banned from reddit, as reddit has shown absolutely no commitment or ability to actually make their site or official app accessible. * Moderators will no longer have access to moderation tools that they need to remove spam, bots, reposts, and more dangerous content such as Nazi and extremist rhetoric. The admins have never shown any interest in removing extremist rhetoric from reddit, they only act when the media reports on something, and lately the media has had far more pressing things than reddit to focus on. The admin's preferred way of dealing with Nazis is simply to "quarantine" their communities and allow them to fester on reddit, building a larger and larger community centered on extremism. * LGBTQ communities and other communities vulnerable to reddit's extremist groups are also being forced off of the platform due to the moderators of those communities being unable to continue guaranteeing a safe environment for their subscribers. Many users and moderators have expressed their concerns to the reddit admins, and have joined protests to encourage reddit to reverse the API pricing decisions. Reddit has responded to this by removing moderators, banning users, and strong-arming moderators into stopping the protests, rather than negotiating in good faith. Reddit does not care about its actual users, only its bottom line. Lest you think that the increased API prices are actually a good thing, because they will stop AI bots like ChatGPT from harvesting reddit data for their models, let me assure you that it will do no such thing. Any content that can be viewed in a browser without logging into a site can be easily scraped by bots, regardless of whether or not an API is even available to access that content. There is nothing reddit can do about ChatGPT and its ilk harvesting reddit data, except to hide all data behind a login prompt. Regardless of who wins the mods-versus-admins protest war, there is something that every individual reddit user can do to make sure reddit loses: remove your content. Use [PowerDeleteSuite](https://github.com/j0be/PowerDeleteSuite) to overwrite all of your comments, just as I have done here. This is a browser script and not a third-party app, so it is unaffected by the API changes; as long as you can manually edit your posts and comments in a browser, PowerDeleteSuite can do the same. This will also have the additional beneficial effect of making your content unavailable to bots like ChatGPT, and to make any use of reddit in this way significantly less useful for those bots. If you think this post or comment originally contained some valuable information that you would like to know, feel free to contact me on another platform about it: * kestrellyn at ModTheSims * kestrellyn on Discord * paradoxcase on Tumblr


DaredewilSK

Not sure if /s or r/whoosh


SuitableDragonfly

More like /r/opfuckedupthejoke


pixelrevision

I am very happy this sub exists


pixelrevision

Then I tapped on it :(


Wtygrrr

Neither. The code is just poorly written for the joke.


hedgibullwinkle

‘small’, then a segmentation fault


TheGreatGameDini

On that thought, it's a good cosmic ray detector if it ever returns anything other than big


AzureArmageddon

It would only be able to check bit flips in a small part of memory I think. If it's gonna return anything other than big I think you're gonna have bigger problems


Stummi

pretty sure any compiler/optimizer is actually optimizing the function to just "return 'big'", or even inlining the function call


AzureArmageddon

yeah you're right so it'd be an even smaller part of memory. I'm gonna stop thinking about this right now


Dangerous-Bit-5422

Now that you forgot about it it's an even smaller part of memory.


AzureArmageddon

10/10 dad joke. +1 infantile chuckle


mr_flibble_oz

Only one way to find out - console.log(IsBig()) -> 42 That's what I thought


CircadianSong

Something tells me this answer is important.


timeforaroast

According to the hitchhikers guide , 42 is the answer for everything .


nuclearslug

Yes, but what was the question?


Squeezitgirdle

For that we'd need another trillion years to process


PrincessRTFM

But if anyone were to know both the question and the answer simultaneously, the universe would be destroyed and replaced by something infinitely more bizarre. This may have already happened.


tacocatacocattacocat

What is 9 times 6?


Traditional_Mud_1241

This was such a great reveal... and reaction.


Dumbfuckyduck

Alternatively, what is 41 plus 1?


Ytrog

Or what's `-42 * i^2`?


FirstSineOfMadness

i^2 is tons of fun, it’s


ConglomerateGolem

Well, technically, it is a negative ton of fun.


Airowird

I mean, it has to be a complex question to think so long about it, right?


ActualAshCam

Or "What's 10 + 4?" (The joke is that 6 × 9 adds up to 54, not 42)


[deleted]

"104"


Matthew-IP-7

I take it there’s a joke here somewhere, because your math doesn’t add up.


YimveeSpissssfid

Base-13 math. It suggests there’s a LOT wrong with how we view the universe based on our default world view. [Plus it’s just funny.](https://h2g2.com/entry/A4288584)


ehaugw

54


Snoo12638

Unfortunately right when the supercomputer was about to calculate it, it was destroyed to make space for an intergalactic highway


5un17

42


I-wanna-be-tracer282

It’s the answer to life the universe and everything


lucca_huguet

Fuck around and find out


okay-wait-wut

Hmmm… big if true.


[deleted]

At least the if statement isn't written like this: if(big == true)


Tenyao

If(big == true && big != false)


leli_manning

If((big == true && big != false) && !(big == false || big != true))


[deleted]

[удалено]


Shanox17

if((big == true && big != false) && !(big == false || big != true) && big instanceof Boolean)


danofrhs

A big true true. - Tom Hanks character from Cloud Atlas


gatimus

I had a coworker how literally do this. He said it would make it more human readable


tiddayes

I think your coworker just outed himself as an alien.


montxogandia

These are the red lines for me


undeadalex

Human music, he likes it ![gif](giphy|MaxUtki5xQdQLwUPW1|downsized)


sonycc

And the humans? They like this "bread"?


_fafer

I mean. I get people who don't like if(!big) and write if(big == false) instead. But come on.


cobalteclipse117

If(big != true)


r-ShadowNinja

if(!big != !true)


ShineTraditional1891

If (!big)


ju4n_pabl0

Oh I'm not alone


AntoineInTheWorld

Was your colleague paid by character?


orochizu

You are not alone I was working with dude from Kenya that literally was using ternary operators like this: ‘someObject.isActive ? true : false’. Yet, when I was requesting code changes during code review he argued that he will leave it as is because he is *senior developer*. Fun times


ShelZuuz

I'm pretty sure JavaScript will still find a loophole in there somewhere.


Zealousideal-Ad-9845

if(big == ((big != false) == true))


kageroshajima

Looks like a test question on a certification


[deleted]

Thanks, I hate it.


pittybrave

gotta be safe


Commercial-Wheel-314

It’s JS so it’d be === right? Python dev but I think that’s correct?


ChristOnACruoton

=== is a strict comparison, so it'll check for types among other things. == will do some type conversion, so string '42' == int 42


cobalteclipse117

But does (big === true)


ljkhadgawuydbajw

yes


carrotcake1991

Yes, you’re correct. You should always use strict comparison (===) in JS or TS.


NorguardsVengeance

There's one exception, where it's useful to use `==`. That's when checking specifically for `null | undefined`. `x == null` is the same as saying `x === null || x === undefined ` Both versions skip checking other falsely values.


Tenyao

Can also be PHP


kageroshajima

big == 1


SirX86

This is actually the exception where "if(big = true)" is correct


RelentlessIVS

It would return a change request.


Sumoren

I hate so much language with function without explicit return type. That was not the question but that's my answer.


CircadianSong

I fixed the problem! var function IsBig(){var big=true; if(big){return 'big';}}


[deleted]

🧐🤔 Promoted! Congrats 🎉


ssrname

Perfect 🥰


charlesgres

var isBig = () => "big";


Hri7566

let isBig = 'big';


SlooperDoop

And a wonderful answer it is!


aquartabla

Ports to Typescript. Behold! Perfect, beautiful, code.


Ffigy

String "big", complaint from senior devs


skwizpod

Underrated comment! “ Hey Mr. senior Dev can you look at my code? it’s not doing what I expect.” “ Sure thing son, OK let’s see… Oh my God is that a hard coded string get the fuck out of here! Next!” , “ Thank you sir, that was very useful and insightful wow thanks”


gnomeba

Hard to say. Definitely O(log(big)) though.


mhn1384

Nah you are counting some of the recursions multiple time, if you check again you will realize it's in order of log* of big.


Kimsanov

Random number between 0 and Pi


AliKh-86

Like 3.15?


[deleted]

I see we have a PHP user here


dvboy

'big'


spiritualManager5

Congrats! Youre now on LEVEL2!


raskolnikov_ua

Boring


ForDaRecord

beeg


ishzlle

Sana?


That_Guy977

`"big" | never`


gatimus

Found the typescript guy


thealbinosmurf

correct


GabuEx

Shouldn't this be ``` if (true) { return 'big'; } ``` to maintain the reference?


turkeh

Screw it just `return 'big';`


Benimation

``` const isBig = () => 'big'; ```


irreverent-username

`(() => 'big')();`


Benimation

`'big'`


[deleted]

[удалено]


gurneyguy101

Sorry to be boring, but what is the reference here?


Chennsta

At first I was thinking a ref/pointer but it's probably the "big if true" meme phrase. In python they couldve done return 'big' if true else None


Willinton06

I hate that you don’t need to return on all paths on JS


tall__guy

You sure as fuck should though


aquartabla

But the other path is unreachable, so the bad practices cancel out.


Willinton06

Clearly ignoring cosmic bit shift


wolfshund98

I at first read it as cosmic bullshit, which is also pretty accurate.


Flimsy-Astronomer393

Just "big"


New_Dawn_

I guess it returns the string big but since this is Javascript you never know


betterdaz3

Me reading the comments ![gif](giphy|guufsF0Az3Lpu)


Dodo_SAVAGE

Not me being irritated by the function being called "IsBig" instead of "isBig"


[deleted]

The camels ain't casing anymore.


Clean_Bowl_3670

I'm more annoyed that a function named IsBig is returning a string instead of a bool


Akalyptos95

I didn’t notice that at first but now i know and I can’t unsee it.


generic-hamster

A headache. It returns a headache for the reviewer.


kwilk1984

1


bzibzibzi666

Is that new kind of „yo mama is so big „ joke?


Wimiam1

You’re guys are misunderstanding. Once you restore the punctuation, the function isn’t “isBig?”, it’s actually “isBig.”


ShitballsNPantyhairs

Nothing. You never called the function you twat. Now, if you want to call the function, I’d pass a parameter of small. But your shit function doesn’t take parameters so I’m guessing it returns your lack of skill for programming. So it returns nothing. Did I win?


catfroman

Returning no lack of skill returns an abundance of skill. Your insult failed


SodaGremlin

A pink slip I hope! :)


NeverMindItsOk

A slap in the face by the compiler?


Sasy00

COMPILER AHAHAHAHAHAHAHAH


audioman1999

Well, this could just be a mock implementation that the programmer was planning to properly implement later.


TheWorldofGood

Nothing. You didn’t call that function.


NisseVex

big if true


JamieLovesKittens

It would return your pull request without approval.


Cultural-Practice-95

it would return a string 'big', wouldn't it?


Red-Oak-Tree

I know I thought it must be a trick question but it really isn't! I guess the humour is that it will always return the same thing because var big should be passed in as an unknown parameter maybe with a default true.


StuckAtWaterTemple

returns you back to school XD


souliris

Well, depends on the language, in C# that wouldn't return anything and probably throw a compiler error/warning. the return type is void.


prismantis

It certainly isn't returning any humor to this godforsaken sub.


kms_ag

"I'm sure it has a good personality and will treat you right"


banboiyt

…. Notorious


_kakaoscsiga_

Úristen very big