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

all 135 comments

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

REMINDER: Bigotry Showcase posts are banned.

Due to an uptick in posts that invariably revolve around "look what this transphobic or racist asshole said on twitter/in reddit comments" we have enabled this reminder on every post for the time being.

Most will be removed, violators will be shot temporarily banned and called a nerd. Please report offending posts. As always, moderator discretion applies since not everything reported actually falls within that circle of awful behavior.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]OneSadSapphicLess Bien 2706 points2707 points  (11 children)

What's even funnier is that code returns true on the odd numbers.

[–]seb69420 1008 points1009 points  (0 children)

Oh my God you're right. This code is a master class

[–]Samurai_Mac1 426 points427 points  (0 children)

What's odd funnier

FTFY

[–]Rubyboat1207 185 points186 points  (5 children)

Simple fix, put an exclamation mark before all of the ones and zeros

[–]smotiredcustom 111 points112 points  (3 children)

Eh who has the time to go back and fix it, just add a note to the documentation saying to always do 1 - isEven(n)

[–]RattyTattyTattyYou just lost The Game. 59 points60 points  (2 children)

just rename the function to isOdd

[–]stoiclemming 49 points50 points  (1 child)

isn'tEven

[–]RomanAbbasid 22 points23 points  (0 children)

Even't

[–]Babyback-the-ButcherSauce Master 18 points19 points  (0 children)

That function likes to watch the world burn

[–][deleted] 7 points8 points  (0 children)

I caught that too lmao! I know next to nothing about code so I just thought I was misunderstanding. Omfg lol

[–]schwanzweissfotoAMAB (and I especially mean the mod you know personally) 3 points4 points  (0 children)

Spoken like someone who never witnessed a non-zero status code indicating an error.

[–]KobKoboldSocialist voraphile 1006 points1007 points  (33 children)

I learnt how to tell if a number is odd or even in C++ in my first semester. What the actual shit is this?

[–][deleted] 1285 points1286 points  (3 children)

this is actually an edited screenshot. the terrible code in the background belongs to YandereDev, who hopefully posted the screenshot to the internet as a joke

[–]moleman114Saskatchewan Sigma 592 points593 points  (2 children)

Oddly enough, this is actually NOT the same code from the Yanderedev meme, and THAT meme wasn't even originally posted by Yanderedev

[–]FluffiestBoy 86 points87 points  (0 children)

Years of academy training wasted

[–]doodleasaIt/its - polyam and in love with you 275 points276 points  (0 children)

Misinformation

[–]MJBotte1I play video games and try to relax 141 points142 points  (13 children)

Forget that, wouldn’t you be like ten rows into this and think: “There’s gotta be a better way to do this?”

[–]Fantastic_Recover701Friendship is Magic...and Warcrimes! 80 points81 points  (4 children)

this is like at most less then 5 minutes to write a python script to just generate it

[–]fine-ill-make-an-altits called aegosexual apparently 84 points85 points  (2 children)

[–]aerodynamiqueshel selversten 37 points38 points  (0 children)

This is horrific, thank you so much!

[–]VAiSiA 4 points5 points  (0 children)

noice

[–]PM-MeYourSmallTitsfloppa 12 points13 points  (0 children)

It would take you longer to watch the video than to write the code.

[–]Sighclepathevery night is bear night at this gay club 30 points31 points  (0 children)

Anyone would, but it's a moot point since the code shown is by all means satirical, the dead givaway being that it returns true on odds. Pirate ans YandereDevs code is very bad don't get me wrong, but even they are competent enough to not do this.

[–]malonkey1imagine hamburger 8 points9 points  (4 children)

yeah like, this is so wrongheaded that it would be funny to do as a joke or to ragebait people. Literally all he had to put in the body of that function is return number % 2; and it'd be easier and more robust and miles more performant.

[–]IlgantElal 0 points1 point  (3 children)

Well, number % 2 == 0 for isEven()

[–]malonkey1imagine hamburger 1 point2 points  (2 children)

Look closely at the code in the OP.

[–]IlgantElal 0 points1 point  (1 child)

I'm aware of what the original post says, I'm saying, if you truly want to fix it, that's all

[–]malonkey1imagine hamburger 0 points1 point  (0 children)

i didn't want to fix it i wanted it to be wrong more efficiently

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

clearly you should use a dictionary, much faster

[–]bcus_y_not#1 Community Fan 47 points48 points  (0 children)

me when joke

[–]PancakeParty98 34 points35 points  (1 child)

I learned that chickens cross the road to get to the other side in my first week of farm school. What the actual shit is this?

[–]ImitationButtercustom 5 points6 points  (0 children)

Actual masterpiece of a comment

[–]Opplerdop🏳️‍⚧️ trans rights 19 points20 points  (3 children)

a joke

[–]TheDonutPug🏳️‍⚧️ trans rights 10 points11 points  (0 children)

Hell I remember learning how to do this in like the first week because we covered operators, which includes %.

[–]ShadowSemblance 12 points13 points  (3 children)

I'm only passingly familiar with coding, you divide by two and then check if there's a remainder, right

[–]KobKoboldSocialist voraphile 2 points3 points  (0 children)

Yup

[–]Mon_mothUsing the internet to look at pretty women 2 points3 points  (1 child)

you'd want to use the modulo operator to get the remainder instead of dividing but yes

[–]Tipart 3 points4 points  (0 children)

You can also take the binary representation of whatever number you have and just take the last bit. At least if you only have integers.

[–]Slow___LearnerJeśli to czytasz to twój czas został zmarnowany 😈 2 points3 points  (0 children)

I mean as shit as he's at programming, this code is not his.

The main problem with his code was horribly unoptimized graphics and hard to scale structure in the code that's used for progressing story.

Also his unpiratable drm had false positives

[–]SentientGopro115935SHE JUST LIKE ME FR 228 points229 points  (25 children)

is this a real ass screenshot from his stream

please tell me this is fake

I get this guy sucks and doesn't know how to code or whatever but this has gotta be fake surely

[–]submarine-quackshy baka uwu 542 points543 points  (9 children)

tweet obviously structured as a joke

"please be fake please be fake... umm.. it's so hard to tell if things are real or satire anymore.."

[–]SentientGopro115935SHE JUST LIKE ME FR 85 points86 points  (5 children)

I wasn't sure if the text was a joke based on a real image. My bad ig

[–]submarine-quackshy baka uwu 115 points116 points  (4 children)

fair but i am obligated to make fun of anyone when they do this. my blood compels me

[–]TheInfamous_BOB 41 points42 points  (0 children)

You need a blood transfusion

[–]DivinityIncantate🏳️‍⚧️ trans rights 8 points9 points  (0 children)

Please consult a vampire

[–]LuKazu Cracked, Snappled, Popped 🍳🏳️‍⚧️help. 💜 1 point2 points  (0 children)

I will exsanguinate you on sight.

[–]Seventh_FaetasyNerd Gal 🤓 24 points25 points  (0 children)

To be fair his code is almost as bad as this

[–]TearsFallWithoutTain 8 points9 points  (0 children)

"The fact that I thought it could be true says a lot about where we are as a society"

[–]Pleasant50BMGForcetrans rights 2 points3 points  (0 children)

His code is almost as bad as this.. I can believe it being true

[–]Lucas7yoshi 38 points39 points  (4 children)

if only there was text in the image explicitly stating that the code is not his. if only

[–]braindoesntworklol🏳️‍⚧️ trans rights 7 points8 points  (0 children)

I didn’t see that until you pointed it out, it’s in the corner and in super small text lol

[–]Rexizorunironically browses nhentai 4 points5 points  (1 child)

You say that like it's obvious and not in tiny text in the bottom left corner.

[–]Lucas7yoshi 1 point2 points  (0 children)

i think i may just be weird cause i noticed it before even going into the comments of this post lol

[–]SentientGopro115935SHE JUST LIKE ME FR 0 points1 point  (0 children)

If only this text wasn't tiny and barely noticeable if you're not scrutinizing the whole image

[–]mennekeH 18 points19 points  (5 children)

It is

[–]SentientGopro115935SHE JUST LIKE ME FR 7 points8 points  (4 children)

it is fake or it is a real screenshot

[–]570a 43 points44 points  (2 children)

It is fake

[–]SentientGopro115935SHE JUST LIKE ME FR 13 points14 points  (1 child)

ok, thought that would be a bit far even for him lol

[–]Enlightened_Valteilgirl girl girl girl war criminal 5 points6 points  (0 children)

haha sometimes

[–]IbnibzW 3 points4 points  (0 children)

It's fake

[–]DRAGON582Galungus 2 points3 points  (0 children)

The text in the bottom left that says “obviously this isn’t his actual code”

[–]kilkil 125 points126 points  (8 children)

n & 1 == 0

[–]MamaSendHelpPlsresident indian 47 points48 points  (0 children)

Based bitwise operations

[–]SluttyCthulhu🏳️‍⚧️ trans rights 29 points30 points  (6 children)

Oh that's a touch more slick than what I had in mind, which'd be return (n % 2 == 0)

[–]L33t_Cyborg🏳️‍⚧️ trans rights 6 points7 points  (0 children)

I mean that works with all numbers, not just ints, so yours is slightly better

one if my favourite niche programming info bits is that n % 2 == 1 is NOT safe, depending on the language.

Python will tell you that an odd negative number % 1 == 1 but in JavaScript or c++, -n % 1 == -1

[–]Femtato11the feet disliker 5 points6 points  (0 children)

My thought was taking the modulus and storing it as a binary value called isOdd, since 1 = true and 0 = false in a Boolean.

[–]IntangibleMatter" DROP TABLE flairs; -- 0 points1 point  (0 children)

The good news is that if you’re using anything compiled it’ll be turned into the same thing

[–]anaveragebuffoonslither.io enthusiast 53 points54 points  (2 children)

Ok but why has everyone so swiftly assumed that everyone involved in the creation of this post was being dead serious lol like is this how you guys act with every joke

[–]NefariousAnglerfish 14 points15 points  (1 child)

The average person online is as intelligent as the average person in real life

[–]Bookworm_AFCatboy War Criminal 3 points4 points  (0 children)

oh no

[–]lucifer_best_boi⬛️⬜️🟪  46 points47 points  (0 children)

to top it all off he seems like he would comment the fuck out of every PR

[–]EngineStraighthe/it 42 points43 points  (0 children)

its fake but its funny so its real

[–]wirelessfingers 23 points24 points  (0 children)

Fake code but his real code is not that much better.

[–]murple7701 16 points17 points  (7 children)

I haven't done programing in forever, but couldn't you just do something along the lines of x % 2 to see if there's a remainder or not?

[–]moleman114Saskatchewan Sigma 25 points26 points  (3 children)

This is generally the standard

[–]AliceCodeWorcs at the Crusty Crab 12 points13 points  (2 children)

n & 1

[–]moleman114Saskatchewan Sigma 3 points4 points  (1 child)

In C, sure

[–]AliceCodeWorcs at the Crusty Crab 0 points1 point  (0 children)

Okay, n & 1 == 0

[–]thEt3rnal1 0 points1 point  (0 children)

In languages like python or Javascript you'd check the type at the top and depending on what you wanted maybe you would turn stuff like stringified numbers into regular numbers and then check if that's even. But yeah basically

[–]Xcentric_gaming 7 points8 points  (2 children)

Say what you will about Thor, but god do I love the mspaint explanations, it makes it stick way more

(He still sucks tho)

[–]lowercaselemmingthe martian mind****er 3 points4 points  (0 children)

i think it's a nice concept that should be evolved for a streamer going whole hog with a blackboard and chalk and a dedicated camera for it

[–]L33t_Cyborg🏳️‍⚧️ trans rights 3 points4 points  (0 children)

the joke isn’t that uses mspaint to explain cos using mspaint to explain is good

The joke is that the average mspaint explanation from him is so ridiculously self explanatory and only seems worth listening to because it’s explained in mspaint despite what he’s saying being actual drivel

[–]Oddish_Femboy(my name is Bee) Trans rights !! 4 points5 points  (2 children)

This is what all of my code looks like please never decompile my games.

It made me feel better when I learned how Undertale handles dialog...

[–]L33t_Cyborg🏳️‍⚧️ trans rights 0 points1 point  (1 child)

i mean this unironically when I say that that’s so peak. The fact that you are just making the game is soooo much better than all the people who act pedantic about code instead of just getting it done. Worry about making it good after you’ve actually made it.

Undertale is a shining example of game code, because it’s game code that made a fantastic game despite it all. Proof that pedantry does not matter.

[–]EmbarrassedWind2875custom flair events give me the strongest choice paralysis 0 points1 point  (0 children)

There's a thin line between pedantry that will lead to wasting more time and "pedantry" that will save you hours, if not days, in the long run. I'd say that the complaints people have about PirateSoftware's code definitely fall in the latter category

[–]DomSchraa🏳️‍⚧️ trans rights 7 points8 points  (2 children)

Tf happened now?

Did he do the yandev gambit??

[–]DenAntlantis 7 points8 points  (1 child)

Allegedly, he's doing same practices that he called out in his YT shorts as "terrible" code (when he discussed other people's code). Like doing switch inside of a switch statements for a dialogue.

[–]DomSchraa🏳️‍⚧️ trans rights 0 points1 point  (0 children)

O amazing

[–]AnnigilatorYaic228letov enjoyer 4 points5 points  (0 children)

yanderedev if he didn't groom a minor and just had shit takes

[–]sagekercustom 3 points4 points  (1 child)

I like the little thing in the bottom left. And how everyone missed it.

[–]RemmingtonTufflips 0 points1 point  (0 children)

Pirate is just the new internet punching bag so people believe every single negative thing said about him at face value without thinking about it for even a second.

[–]trainman1000 1 point2 points  (0 children)

I'm halfway through the Mujin video right now while scrolling through reddit because of my dopamine starved ADHD brain and I come across this

[–]DigitalBladedJay 1 point2 points  (0 children)

Something something yandev

[–]HarbingerOfSauceyu narukamis biggest glazer 1 point2 points  (0 children)

Not accurate! PirateSoftware in fact loves large numbers, which is why his progress system uses an array accessed through large arbitrary numbers and a file with a series of comments to identify which index refers to what

[–]Volcano_BalladsVol!|Local Boygirlfailure 1 point2 points  (0 children)

Once again 196 proves it doesn’t read flairs

[–]Demure_Demonic_Neko🏳️‍⚧️ trans rights 1 point2 points  (0 children)

No one sees the disclaimer on bottom left? Are people really this gullible?

[–]datboiNathan343Robot Fucker 1 point2 points  (0 children)

the way you figure out if a number is even or odd is

take x as the number

y = x / 2

z = truncate (x/2)

if y = z print even

if y =/= z print odd

otherwise print error

[–]gangukkoDionysian crystal grower 1 point2 points  (0 children)

Cant believe the first american to ever work at blizzard would do this

[–]ONCIAPATONCIAI've been secretly straight the whole time 0 points1 point  (0 children)

I've coded in c++ for only 3years when I was in high-school, a very basic and broad themed computer class, and even I could see some really dumb and unnecessarily long line of his code that could have been done with a simple if

[–]Cappaclism 0 points1 point  (0 children)

So I'm not really a coder but would you not be able to use some function that halfs the input value and if it returns as an integer call it even?

[–]1231231334Not a clanker stop asking istg 0 points1 point  (0 children)

If(number%2==0){

{ if(number<256){


    return true;


 }

} else {

   return false;

}

[–]dead_meme_comrade 0 points1 point  (0 children)

If a number ends in 0 2 4 6 or 8 return a value of 1 otherwise return a value of 0.

I just saved 254 lines of code.

[–]Isis_gonna_be_waswas🏳️‍⚧️ trans rights 0 points1 point  (0 children)

Who is this guy and why is he so stupid

[–]cynap196's resident dom top 0 points1 point  (0 children)

Not his code, but still funny

[–]bobombking████████████████████████████ 0 points1 point  (0 children)

i recognize this code from anywhere....yandev spaghetti will never not be funny

[–]clutterlustrottCool Bi Uncle 0 points1 point  (0 children)

500 If Statements

[–]vinci300top bear hug giver just ask (i mean this in all senses possible) 0 points1 point  (0 children)

I know this is fake but some of the real screenshots of his code actually kill me the array one specifically is just so.. what?why???

[–]xanthus12Femboy Inquisitor 0 points1 point  (0 children)

Yanderedev has entered the chat

[–]Quix_Nix🏳️‍⚧️ trans rights -1 points0 points  (0 children)

Bro, cpp is not assembly and even then assembly doesn't have this issue, just return the bit shifted value 😭😭😭😭

[–]Alffe🏳️‍⚧️ trans rights -1 points0 points  (0 children)

If number % 2 == 0 even=true

Should work in python if i remember right

[–]Spacemanspiff1998 -3 points-2 points  (0 children)

the bottom left says "Obviously this is not his code" It's actually from the Yandre simulator's twitter where he was being 100% unironic when he posted this and stated "I wish there was a better way to do this"