This actually makes a lot of sense. Let me explain
*breaks out MSPaint
In computer programming, if you are dealing with large numbers, you are doing something wrong. You never want to see a number larger than 256.
*draws 256
So, this might seem tedious, but once I've written 256 lines of code like this, I'm done. My program has a foolproof way of detecting an even number. And if I try to give it a number larger than 256, it will fail (*draws a sad face), which is what I want (*draws a happy face).
I can't believe how accurate this is
Honestly, this entire situation made me aware of how much information I just take for granted from short form content where a guy with charming voice says basically anything
Honestly, at this point its the opposite for me. If some overly confident cunt tells me something in a short form video, I just assume it's dogshit, even if it's the most obvious, intelligent and genuine thing!
With a charming voice changer*
I hate that i read this in his voice
leans back and cracks hands
"Programming is so easy dude".
It's really not hard to set a limit and use math alongside a proper data structure and loop, this is ridiculously silly.
I can imagine him saying this word for word 😂😂
What an idiot, he could’ve used a hash-map
He should at least delete the odd numbers and just use a default return.
absolutely not. that would make a little sense
VeRbOsE cOdE iS mOaR rEaDaBlE
(yes, I know it can be for sure, but... not like this monstrosity in OP)
She was a float x,j,jx,xx girl, he was a LocalCompServiceAbstractFactoryBeanInjectorProviderFactoryFacade boy.
thanks Sun
On small number, it would be smaller? It sure how compiler handles that but odd numbers would be compared to all even numbers before going to default, whereas in this implementation a 3 or 5 would only do a few comparisons.
So depends on what kind of numbers you’re expecting
global.is_number_even[0] = 1; // Number 0 is even
global.is_number_even[1] = 0; // Number 1 is not even
global.is_number_even[2] = 1; // Number 2 is even
global.is_number_even[3] = 0; // Number 3 is not even
I bet he typed all this shit out too. Learn to use vim macros guys come on.
qnykjpCAAj^CAA
1000000@n
Just saved you literal weeks of time with my superior vim interlect 😎
Are you single stud?
I’m about to send you to a permanent hash-nap
Anyone see the latest Code Jesus video benchmarking his game code?
It got 19 fps from rendering a single object.
Didn’t he say something like it was redrawing the same sprite 80,000 times?
Absolute mad lad
this was on an 800x100 sprite for reference, so redrawing the entire sprite for every single pixel in the sprite.
Carmack watch out we got a visionary on our hands
... that sounds you're basically building a bridge over the pit of success in gamemaker engine.
I think that was just the collision checks
That one is a big miss tho. Their method is a simple mask vs a naive ray tracing sort of thing. Sure the code is still dog shit, but the two are not doing the same thing. The ray tracing will make the light stop at small obstacles while their method will not do that. The idea of just doing a naive ray tracing thing is IMO fine if written properly and performance probably will be fine once the game is built. The proper methods to do this have trade offs and it makes sense to have a really high expensive light if it's like the main player light and you know the scene will only ever have one such expensive light.
There are so many huge huge problems with the code it's kind of sad they focus on something debatable and get it wrong.
Also it's kind of ridiculous Gamemaker still does not have somthing as basic as a 2D lighting system.
This pretty much. Tho the code should be moved to the GPU instead of having it run on the CPU, via a shader. That would be the only complaint I have about that part.
Also the first 2 minor ones could be compiler and decompiler artifacts. Which is also sad that those issues were focused on too when it could be explained away as compiler and decompiler artifacts. You would think that Code Jesus would know that.
Also the unsafe I/O could have been because Gamemaker game engine says that it guarantees certain places on the computer will be read and write safe. And those methods for reading and writing are error safe too. So even if the file isn't there, the reading and writing operations will be skipped and no error will be thrown. So having those checks aren't really needed.
I don't know how finnicky the shader stuff is in GML but I think it's easy to forgive not bothering with a shader if the naive way is performant enough. It's not something that well suited for GPUs anyway and I assume fiddling with shaders like that in Gamemaker is a nightmare. Frankly the feedback should probably be if you want stuff like that just switch engine lol.
it was sub-optimal but from what i understood it didn't had that terrible performance in the game, mostly because the example used was the code with the conditional set to true at all times, so it never stopped running, theoretically it has a condition that prevents it from running if nothing changed for that sprite, but the coder in the video make a incredibly better code nonetheless
i just found misleading the example used making it seem the game is that horribly optimized, although that's a shitty as way of doing it and will still lead to bad performance regardless
example used was the code with the conditional set to true at all times, so it never stopped running, theoretically it has a condition that prevents it from running if nothing changed for that sprite, but the coder in the video make a incredibly better code nonetheless
One thing to point out, the light solution that the coder put in the video, sure it runs better, but the final image would be different. It seems that Thor's version is essentially a directional light that is essentially ray traced pixel by pixel and it stops a bit after a collision is detected per each ray (or x axis trace).
While the 2d stencil lighting wouldn't be doing shadows and would be lighting the whole stencil.
This is likely why in the video, during the benchmark for the two different solutions, the outcome isn't shown. Only real issue with Thor's code for this part is that it isn't running on the GPU instead of the CPU.
I just looked this up. Hilarious.
I feel like everyone was all about Thor for a while, and then all of a sudden people turned on him quick
well, its honestly kinda on his behavior. This is gonna be long, but its been months of development so hard to easily summarise.
He was really beloved due to his really popular shorts explaining coding concepts and certain other difficult concepts with ms paint.
But then 2 big incidents happened with a ton of small things inbetween, where he had some absolutely terrible behavior, and then doubled and tripled down on his behavior, when everyone kept telling him he was wrong.
The first incident, was about him getting his team killed in a wow raid, on the hardcore server, that sucks, it wastes a lot of peoples hours, but it happens, and people were ready to move on if he simply said sorry and moved on. instead he kept blaming others, kept saying he could not have done anything to save the team (he could have), and kept pushing the idea that he was a hardcore pro player, when all the actual pro's reviewed the footage and said his gameplay was bad, and some very basic skill usage would have allowed his party to flee and survive the incident.
small incident got blown up into days and days of drama due to his behavior, from that, he got kicked from the guild, people went through his old streams and found other similar behaviors in wow and in other games, him abusing his popularity to get people to mass spawn kill players that pissed him off in some way, shit like that. A lot came out, because he pissed off people so much with his behavior and knowitall attitude.
A few months later, it all happens again, but this time, with a more serious topic, game preservation, the Stop killing games movement and petition gets formed and pretty much everyone covers it in a positive or neutral light, in comes Thor with a full on negative attack on it, both on the movement and on the person running it, Ross. he calls him a ton of crap, says shit like "he is a used car salesman", and "eat my entire ass" to Ross. And once again uses his popularity, to heavily halt the movement, because "he knows his shit" so if he says its bad, then its gotta be bad. he also had one of the most viewed vids on the topic, so that certainly did not help.
Eventually Ross does a video debunking his claims, due to the petition almost certinly failing, needing still 50% more votes with 11 months used up, only 1 more month left in the petition. This actually gets covered by a ton of big youtubers, from all across youtube and twitch, who point out how bad Thors points were. and how horrible he was towards Ross. This goes crazy, and ontop of all the past drama, really ruins Thors reputation, not only showing again that he is a dick, but really showing how little he actually knows about programming and development in general.
this again leads people into looking back into old streams and a lot more bad shit comes out.
Just to mention a few of the smaller things that came out over both of these 2 bigger dramas.
people found solid proof that he cheats in puzzle games to make himself look smarter, including doing this multiple times in outer wilds and animal well, including the famous moment where he solves a puzzle in a few minutes, that took the whole games community multiple days to solve together. Without even all the pieces of the puzzle.
he has been working on an undertale clone for about 7 years, being sold as early access, which he supposedly constantly works on and keeps promising updates as he asks people to buy the game, but when reviewing a ton of footage, people noticed, he would spend hours on his coding streams, writing maybe 2-3 lines of code, and then constantly doing other shit. Making progress on the game, both on stream and off stream, non existent. With updates being rare and miniscule, with no real new content in years. People then started to dig into the code itself, noticing some really horrible practices, which ofc, Thor got very defensive over once again, claiming the code to actually be good.
His voice was spotted to be faked, bass boosted and adjusted to sound a lot deeper then it actually is he claims its a second puberty, but fairly recent clips came out of him at events where he sounds much squeakier, so its clear that he has filters on.
him working at blizzard for many years as a dev seems to basically be BS, he worked as a QA tester, not an actual developer, those jobs ofc are very different, but he would constantly bring up working as a dev there. ofc, not to mention that he got the job from his father, which by his own admission of being a "first second generation blizzard employee", basically means he was a nepo baby who was a QA tester, which again, completely crushes his persona of this big blizzard dev.
one more for the coding bucket, he has claimed to have won 3 black badges at DEFCON and years of security experience in working at... power plants. But well, turns out there is no proof at all about that security experience, apart from his own stories, and as for the black badges, technically he got them yes, but, it seems to not be because he is such a smart cookie, but rather because, his popularity allowed him to gather large teams of strong professionals that he would "manage". Where he basically did fuck all. At least according to some of his old team members from those DEFCONs.
That's still not even all of it, but id be sitting hear all day writing this up.
So yeah its a lot, but the TLDR is:
The internet didnt just turn around one day and say "hey, lets hate on this guy now". Its been months of events being discovered due to 2 big incidents happening that tanked his credentials, and had people look deeper into his life and streams. Which then showed that his whole persona and skill set were fake and he was a pretty horrible person at heart.
I know it is probably the most miniscule of the bunch but I remember before the drama surrounding him, he showed up on various irl streams/videos for other people and his voice was relatively the same. Nothing that seemed off between studio vs non-studio at least. I know there are significantly older clips with him having a significantly higher voice but it wasn't nearly to that degree.
Granted after round 1 of the SKG drama and the hard-core WoW wipe I stopped keeping up with him if there was new things that surfaced. Just wasn't worth the time.
Of course his voice can sound different off-stream. I understand a lot of the hate but some things are just so forced. Some of the code reviews hang up on dumb engine-specific stuff, the voice thing. When this dude is out there slandering people and making false doxx accusations there are more important issues to focus on
Couple of pieces of context for points 3 and 5, there are clips of him speaking at streamer events where his voice DOES sound like on his stream, so it's much more likely he's done vocal training to make his voice sound the way it does, which is honestly whatever, this is the one thing in all of this that really rubs me personally the wrong way (am trans, have done vocal training, it's a frankly weird thing to get hung up on)
For point 5, there IS technically (very flimsy) evidence of him doing work with power plants, it's on his linkedin, and he wasn't a hacker like he keeps stating, he was a pen tester, basically a social engineer writing phishing emails and getting through security with a high vis and clipboard
ETA I fucking hate the guy lmao
For point 5, there IS technically (very flimsy) evidence of him doing work with power plants, it’s on his linkedin, and he wasn’t a hacker like he keeps stating, he was a pen tester, basically a social engineer writing phishing emails and getting through security with a high vis and clipboard
This mixes a few things up.
First, hacking generally has both technical and non technical (social engineering) elements or often a mix of both. Although generally you would assume a hacker uses at least some technical elements. I don‘t know what he did. He may have only or primarely used non technical elements.
A pentester is also someone who uses both technical and non technical elements. Saying that because you are a pentester you don‘t use technical elements is wrong. Of course there are pentesters who just use a clipboard or phising mails but there are also pentesters who work more technical and for example analyze security issues in software or networks.
I think a lot of people think about Edward Snowden or Assange when they hear „red team“ or think that someone is a good developer if they say they worked in QA. I know good people in QA who don‘t know anything about coding.
IT has many different role profiles with very different skillsets. And not everyone is a 10x engineer.
ETA I fucking hate the guy lmao
Because he always wants to sound like he‘s the smartest one in the room when he isn‘t. But to be fair I don‘t know if that‘s intentional or not.
isnt a pen tester kind of a hacker ? you do try to access thing you shouldnt to find weakness in a system.
Yes, but saying "I hacked power plants for the government" conjures a very specific image in the heads of most people, and it's why he words it that way instead of saying "I was a physical penetration tester with a focus on power plants"
It's all about the way people perceive him
One more thing to add that happened to me and also to a bunch of other people from what I read:
This guy kept showing up in my Youtube shorts feed. I kept swiping him away and disliking the clips, but they kept reappearing. Nothing too bad, just him being a smartass. He was riding the algorithm.
I imagine that in addition to getting new fans it also got him more people who were ready for a reason to dislike this dude that was annoying to them.
Literally, that's what happened tho.
One thing to clarify: AFAIK He said he worked as a „red team specialist“ at blizzard, not as a dev.
edit: after watching him cheat at a damn puzzle game, to look smart, like the hardest fucking grifter, I think its honestly not even worth it to highlight any valid points he might have made. Better for anybody else to make those points. Thor can stick it out in his new well earned image of complete incompetence.
I'm pretty confident in my radar for people like this, glad I didn't like him the first time I saw his stream, whole vibe was not it
Huh... wasn't his anti game preservation thing earlier than the WOW incident? Because I remember disliking the dude way before all the drama.
Just want to clarify a little regarding the WoW incident. I don't think it's fair to say he got everyone killed. That implies he was the one who pulled the extra mobs which is not true. It's absolutely true that he could have done a lot to prevent the deaths however, and everything that followed the wipe is squarely on him.
Because of undeserved and unexpected popularity, he had to start maintaining a fake image of himself that he never was. The cracks did not take long to show, simple as that. Also said and did some of the dumbest things a person can say or do, doubling down on mistakes, digging his own grave, etc.
It’s the cycle of the internet. Vibes rule all.
Partially true, but also when he stayed in his lane and talked about basic salting for passwords or hashmap collisions in short video format people ate it up and didn't care.
It was when he decided to be an authority on all things tech and never admit that he's wrong about anything whatsoever that people started realizing he never grew out of that guy in your data structures class who tries to do something over the top and complicated and claim that it's the best and anyone who doesn't know how to do it that way is a moron.
People just want attention
Thats just how being famous on the internet works, the pendulum always swings back.
Because he misrepresented what his job was for blizzard. And now he’s acting like he never misrepresented it. People don’t like being treated as if they’re stupid, shocker
Meanwhile his followers are like : yeah but you dont get it, you prolly never touched GMS. And hes also an ex blizzard dev and worked with GMS for 10 years so hes kinda the expert. For loops? No no no see he made this with the ARG in mind so its actually smart
“I made my code shitty and unworkable on purpose, it’s an ARG of course”
“QA are also developers and I was a QA at Blizzard so I am a developer with 20 years of experience”
Oh I get it the ARG is to fix the code.
I'm dumb, what's ARG stand for?
i've used gms. almost everyone who uses it writes bad code like this because gml is a shitty and inconstant language
New to this, what are ARG and GMS?
I'm guessing Alternate Reality Game (i.e. making it a sort of game with mixed reality elements) and Game Maker Studio (a software for Game Development)
gamemaker is how I got into this when I was a wee lad, funny how it’s coming back to haunt me
I was more of an RPG Maker XP kid myself. I started so many projects that went absolutely nowhere and all looked the exact same.
In all fairness Game Maker did not have boolean data type back in 2018.
Really? That sound like a very basic feature to miss.
I mean c didn't have it until c99 and you need to include a header for it
game maker was made after the prehistoric era though
No, but it did have a crappy enum based implementation that works about as well as a proper one for a loosely typed language done at least 2016 and the documentation says to always use it instead of 1/0 (nobody seems to be able to find when it was added, but they were able to find people quoting that specific part of the documentatiom dated to 2016).
Isn't there enough real shit from this guy's code that we don't need to make stuff up?
Yeah, but then people would have to actually look at the code and not have a youtube personality tell them its good code or not XD
I'm a believer of you can always write better code and the best code comes from code review and pair programming.
Nah the best code is written when I take an edible and start asking chatgpt incoherent questions.
Finally someone who is speaking my language
80% of this sub hasn't programmed anything further than bubble sort. They probably wouldn't understand it anyways.
I hate Thor but it’s annoying people repeating the same thing over and over “0/1 for bools/ magic numbers” because they heard CodingJesus say it.
His video is more of a hit piece and if someone used that sort of language to code review someone at my work, they’d be fired. There’s plenty of other videos that are a fair critique without becoming personal.
It also annoyed me that I saw “magic numbers” passed as parameters to a function that to me, very clearly takes floats/ints for a reason. Why would you need to abstract that away for something like a sprite pixel reference or particle generator?? Especially if you can’t pass objects as a parameter like you can with JS for example.
There is fair criticism and feedback and then there is whatever CodingJesus’ video is.
People are trying to cash in on drama to get a channel boost and karma farm. I can't hate a guy for being arrogant or pretentious, I work in tech XD.
The funny thing for me is that I've worked on enough legacy systems from RPG3 and Cobol (No i'm not old, I just worked at an old company) that it wasn't uncommon for me to see 0 and 1 for true and false. Not to mention sql calls where it was easier to just pass a 0 and 1 instead of true and false.
I Always like to say the best code is the one you did not write
Mom said it’s my turn to karma farm off the hate mob.
yanderedev jump scare
yanderedev knew he was bad at coding and a beginner, this guy claimed to work as a senior developer while actually just working in a QnA
QA*
Quality 'n' Assurance
He was an elite government hacker in case you weren't aware.
Fake, not his code - he doesn't use booleans.
fixed it for you:
else if(number == 2) return true; //this number is even
else if(number == 3) return false; //this number is odd
else if(number == 4) return true; //this number is even
else if(number == 5) return false; //this number is odd
...
else if(number == 2) return 1; //this number is even
else if(number == 3) return 0; //this number is odd
else if(number == 4) return 1; //this number is even
else if(number == 5) return 0; //this number is odd
...
fixed it for you
I yield.
Thanks, I was really confused before. This helps me understand. Isn't it weird that odd is the same things as false? Does that make weird false too? This computer stuff is hard.
Random question, is just using mod 2 and checking for 0 an effective is even, still in uni atm so just making sure I'm not stupid.
Yes, that's a fine implementation that works with all arithmetic primitive types. If it's just for an integer type, you can use a bitwise & to read the LSB. The LSB will be 0 for all even numbers and 1 for all odd numbers.
Yeah, I have read that reading the bit is what some languages do under the hood with mod 2 as well.
It's not really about language but about compiler optimizations. However turning x%2 into x&1 is one of the most basic optimizations that you can expect from pretty much any compiler for a statically typed language.
bash
npm install is-even
Clearly fake, Thor hates bools and often uses ints instead to store true/false
Adding this guy to any programming intern meme is peak 🤣
Once worked at a company that determined if excel was installed on someone's machine by looking at if excel.exe was in certain file paths. It looked like this. Check program files. Program files x86, etc.. I was very upset
while(number > 10)
number -= 10;
if(number == 1)
return false;
else if (number == 2)
return true;
else if (number == 3)
return false;
else if(number == 4)
return true;
else if(number == 5)
return false;
else if(number == 6)
return false;
else if(number == 7)
return false;
else if(number == 8)
return false;
else if(number == 9)
return false;
else if(number == 10)
return true;
else
return "Unknown character at index 0: -";
Allow me to show something that many of y'all have never seen before...straight outta z/OS. Isn't it so pretty? Oh my days are full of this...this and JCL, and DFSORT and ICETOOL and DSNUTILB.
WORKING STORAGE SECTION.
01 MY-RESULT PIC X(1).
88 EVEN-NUM VALUE 0.
PROCEDURE DIVISION.
PERFORM 1000-MAIN-PARAGRAPH THRU 1000-EXIT
IF EVEN-NUM THEN
DISPLAY "YES, YOUR NUMBER IS EVEN. FIND A BETTER USE FOR YOUR MAINFRAME"
END-IF
GOBACK
.
**********************
* ODD/EVEN CHECK*
**********************
1000-MAIN-PARAGRAPH.
MOVE 1 TO MY-RESULT
DIVIDE LINKAGE-SECTION-NUMBER BY 2 GIVING WORKING-STORAGE-RESULT
REMAINDER WORKING-STORAGE-REMAINDER
If WORKING-STORAGE-REMAINDER = 0 THEN
SET EVEN-NUM-VALUE TO TRUE
ELSE
DISPLAY "ODD NUMBER"
END-IF.
1000-EXIT.
EXIT.
This is un ironically a meme for bad programmers on the programming humor subreddit, surely he is joking at this point because there is just no way he is that bad at programming..
Edit : I did not look at the subreddit name on my phone haha
Is this sub just for pirate shitposting nowadays?
Where did people get his code anyway? And why wasn't it shared earlier?
I don’t know who he or she is, but I’m tired of seeing the fifth screenshot with him or her.
Shouldn't just this work here? I'm not experienced in this programming language though or the function behind it, but:
private bool IsEven(int number)
{
return number % 2 == 0;
}
yeah the joke is that he is so incompetent that he is using a very inefficient way to solve a problem
You people enjoy ripping this guy apart way too much
Wow low effort meme. Just to hate on a streamer congrats.
As simple as it can get, production level code!!!
Based on videos I have seen I'm willing to say a lot of these are stylistic in nature but the one that drives me most up a wall is magic values. I have a personal vendeta against magic numbers, you would think they murdered my wife. I will not let those through when I review code
Meanwhile he also has a class to check if 7 is 7 pretty much
you forgot a comment before every else if statement
There's not nearly enough comments here for him
So... Who is this guy?
Well clearly you guys aren't enterprise devs. So my slim integration of this would probably start with an EvenNumberDeterminationOrchestrator
, which gets constructed with a CalculationStrategyProviderInterface
and a ParityConfigurationInterface
.
The ParityConfiguration
can get configured to only compare numbers between a given minValue
and maxValue
(naturally, we first send our PO on a six month discovery journey to determine which numbers we might compare over the next 15 business years and what the projected monetary impact of that is).
The CalculationStrategyProviderInterface
or rather its implementation will provide, well, a modulo function, but we have it all prepared for a possible different strategy, who knows what mathematicians will come up with next? That's another two files I can commit separately (I need to get that commit count up so HR sees what good of a developer I am).
Then just a nifty little ParityState
Enum with a fromModulo
method which gets the modulo returned value, and compares against 0 and 1, but gives back a string 'even' or 'odd'. This can then later be put in the EvenOrOddProcessor
implementation which finally gives back a bool.
We might build the EvenOrOddProcessor
as an HA high performance microservice. Infrastructure with serverless framework and terraform, seemlessly deployable to several cloud providers, I can already see the beauty of it. But first we need to create about a dozen Jira tickets for this idea.
Of course we also add comprehensive logging for every outcome, every edge case, piped into our ELK Stack and sentry integration.
Now we simply just need to construct the orchestrator by providing the CalculationStrategyProvider
which holds the modulo logic, and ParityConfiguration
which sets the boundaries for the comparison, throw a LoggingProvider
in there and we're good to go. I mean, almost. Dependencies could be auto injected by our framework, but we still add a needlessly obscure dependency configuration file (in xml).
This little maneuver costs us about 42 story points and will be canceled halfway trough because of a more modern EvenNumberServerlessDecisionDispatcher
which is entirely containerized and deployed with kubernetes (The platform guys outjerked us on this one)
No matter how bad a programmer you think you are, there is always someone worse.
no he didn't
he developed this one:
//checks if integer is even
public static bool isEven(int integer_to_check_is_even) {
int is_even = false;
switch (integer_to_check_is_even) {
case 0:
is_even = 17;
case 1:
is_even = 0;
default:
is_even = isEven(integer_to_check_is_even - 2) ? 17 : 0;
if (is_even == 17) {
//the value is even
return true;
}else (is_even == 0) {
//the value is not even
return false;
}
}
I...Is is so late that I am in delirium or is this whole code completely batshit crazy? Why a switch case? why 17 and 0? Why does he assign a boolean value to an integer? Does he even check the right variable there? I feel like not.
It’s making fun of the fact that PirateSoftware uses 0/1 ints instead of bools, a lot of magic numbers, and dead code
You know, this does wonders for my imposter syndrome. We need more of this.
It's programmers like him that mean I never had impostor syndrome!
To be fair you probably cant find programmers like him just anywhere, his father worked for blizzard and totally did not get him a job there.
For the amount he talks about his dad i was surprised to learn he doesn't wish him happy birthday and even jokes about that when he gets called out by his dad on stream.
https://www.reddit.com/r/LivestreamFail/comments/1lyw8yk/old_clip_how_pirate_software_treats_his_dad_that/
Its even weirder how his dad needs to correct himself on calling him Thor instead of his actual name "Jason" as if this was a request by Pirate.
Weirdest one for me was seeing him brag about his dad being the inspiration of the WoW gamer in South Park. That's not exactly a flattering representation of him
Its not flattering but I kinda get it. Appearing at all in a show that popular is kinda cool.
Is any of this stuff actually his shit because I see it here all the time and I swear to God nobody straight up offers a source for any of it. I can't tell if y'all are being shit lords or just actually dicks.
Oh no, this screenshot is an old one (I seem to recall it being thrown around as part of either yandere simulator or undertale). His code is more characterised by storing boolean values as integers, loads of magic numbers and just commenting everything with complete disregard as to whether the comments are useful.
Thank you for clarifying.
Sounds like just about every legacy codebase I've ever worked on... So... Business as usual?
I have a really hard time thinking that screenshot was anything but some kind of joke.
There is no way any codebase has code like that in it.
This screenshot above is just a combination of Pirate software's head being placed over an older screenshot which was a joke about bad programmers. The screenshot has been then misattributed to a variety of sources including Yandere Dev and various other people who have been mocked for poorly optimized code.
I have not seen enough of Pirate Software's code to make a value judgment about it
I thank god every day that my code will never receive this kind of public scrutiny. I’d die
You presumably aren't calling people idiots for correctly suggesting that your programming language has booleans, so you are miles ahead of him.
I'm not a great developer, just for hobby kind of thing yknow. I'll be the first to admit I know barely anything. But damn I feel better about my current skills after this fiasco.
Squeaky wheel is definitely getting the kick rn
You should see the dead code I work on. There's some programs that are 280,000 lines of code. Nobody knows what it does, we just know it's important. Chock full of GO-TOs and uncommented business logic with magic numbers. It's amazing.
The joys of working on a mainframe with code twice my age...
I mean dead code is always a part of code in big corpo; doesn’t mean it is excusable on a one man project
Not quite the same thing but, my previous job I worked on an 18 year old Java code base. Holy actual shit. The amount of telescoping constructors made me want to blow my brains out. The sheer level of abstractness such that nothing was easy to actually find what it fucking DID when you did something was staggering.
It ended up being easier to simply wrap everything, kinda say fuck it, and just put something over it that did what I needed it to do, because the codebase was so obtuse it was impossible to know what any change to a lower level component might cascade into.
Further proof the best code is the code that works.
The best code is the code that is not commented out
Wait, so it's just that 7 bits isn't enough waste per bool for him?
At least it's not in a struct with a 64-bit int.
``` typedef struct {
int64_t true; //Set to 1 if true
int64_t false; //Set to 1 if false
} bool; ```
we are in the age of windows 11 and google chrome
7 bits of waste is a speck of microplasic
Optimizing space is a lost art because it's simply not relevant at that scale any more with current hardware.
he uses gamemaker, and its language does not have a "boolean type" per se. But documentation highly recommends to use the keywords "true" and "false" (which are equal to 1 and 0 of course) in case they ass booleans in the future.
Also it looks like he doesn't understand boolean logic, there's litterally a piece of code here that looks like that :
if((question_true == 1) and (question_asked == 0))
That could be of course way more understandable looking like that:
if(question_true and !question_asked)
And his only defense is that gamemaker doesn't have native booleans...
If I remember my CS days right, a boolean value takes up one byte of space anyway because the CPU can't address values smaller than 1 byte.
There's also his lighting code which does a morbillion checks per sprite on screen per frame
A morbillion checks! Sounds so efficient!
Just to be clear, coming from a C background I also use 0/1 unsigneds for boolean. That's not a heinous offense unless there's some language with some really weird nuance about efficiency for booleans vs. integers. But if you're in a language like that you're probably not too worried about efficiency.
Yeah it’s not that heinous; I’m just saying what the post is making fun of. Unless you’re space optimizing with bit vectors basically every language isn’t going to get performance boosts from using booleans instead of bytes since basically every system is at best byte-addressable; it’s just a readability and static analysis thing primarily
It is not a heinous offense but it has readability issues. Even if the programming language doesn't give you the data type, at least make an alias, or use the one given to you in this case.
And even if you make the argument that it's fine because no one else is going to read your code, the you from tomorrow will probably have forgotten some of the things you did today, so imagine the you 8 years from now.
I won't comment on the dead code and magic numbers but GameMaker did not have boolean data types at all until very recently. Anything < 0.5 is false and any value >0.5 is true.
If he started the project in 2018, it's not feasible to refactor it by now.
As a frequently embedded C developer, that is the most horrifying (real) implementation of booleans I've ever heard of.
God gave us Zero and Zeron't, and those are the only two numbers we as flawed sinners deserve to use.
"Note that currently GameMaker will interpret a real number equal to or below 0.5 as a false value, and any real number greater than 0.5 as being true. This does not mean however that you should be checking 1 and 0 (or any other real number) for true and false, as you are also provided with the constants true and false, which should always be used in your code to prevent any issues should real boolean data types be added in a future update."
GameMaker has no boolean types? Why? How? What?
0.5 is evaluated as false... That can't be right. Can it? Nobody would do that, would they? Not even Brendan Eich would do that.
I like to use 0.22 and 0.73 as my booleans
Why not? Isn't the whole point of refactoring the modernisation of old, unmaintainable code.
But also the point is completely nonsense, it has had the and crappy enum based implementation of booleans since at least 2016, before development on heat bound started.
He doesn't even use 0 and 1, he uses 0 and 42. Why the fuck 42?
Because 42 is the answer to the ultimate question of life, the universe, and everything.
To be clear the above is a joke/hyperbole of his actual code.
When coding Jesus reviewed some of his public coffee, CJ pointed out that PS should use true/false instead of 1/0 for binary values because it is more readable and less error prone. PS responded by implying CJ was an idiot and asserting that game maker studio doesn't have booleans (not only does it, but PS actually used a couple in the code that CJ was reviewing, but only in a fraction of the places it would be appropriate to use booleans). After CJ pointed out that Game maker does in fact have Boolean values (for some reason the developers decided not to natively support booleans but they do have an enum with TRUE/FALSE and recommend that developers use them in case they add true boolean support in the future, also they made any value less than 0.5 false for some reason, but none of this really matters) PS decided to shift the goalposts and claim that using booleans is bad programming.
The issue is that CJ comes across as an idiot as well. Instead of staying professional he is going after stuff that are essentially nitpicks. There are way better takes on this on YouTube, as there is a lot of other code much more deserving of criticism. I feel like his reviews are among the worse ones.
It does make some sense to hold PS code to a higher standard given that this is apparently what he's teaching to beginners.
3, is a magic numbaaa!
Is... that a reference? I have not seen a lot of pirate software except a few youtube shorts that sometimes popped up in my feed.
It’s a song lyric
https://schoolhouserock.fandom.com/wiki/Three_Is_a_Magic_Number
It's a joke. But yes it does check the right variable. It's recursive. The default case recurses until it hits either 0 or 1 which are the terminating cases, and the odd or even remainder when val mod 2.
As someone else put it it's hyperbolic but it does work. The 17 is not part of the recursive call value in anyway, it's just a magic number that translates to even in this case, for no reason.
It's a really dumb O(n) mod 2 function with a remainder check. It's just x%2 == 0 ? True : False. It also grows a nice fat stack. Considering even or odd can be done with a bit shift any library function should handle it O(1) so it's another little slight at this guy that he implements useless poor performance things when he shouldn't at all. So it's calling him stupid too.
You forgot to add the obvious comments that say the english version of what the next line of code does for every single line of code
This is what I did for my uni assignments when the instructions said document ALL code or lose marks.. can't take any risks
It's like when in elementary school you had to write out 63 = 6 + 6 + 6 = 12 + 6 = 18 because apparently 63=18 wasn't clear enough
- u/PaleEnvironment6767, 2025
Haha, apparently asterisks format that weirdly. Meant 6 x 3 = 18
Yeah, be careful with the asterix as a multiplication symbol. Happened to me more than once. XD
Here, have a multiplication symbol: ×
Yes... two asterisks like you did make up italics.
Markdown ate the asterix again
// did we already check if even?
Come on, separately single backticked lines of code? 4 spaces in front of each line does it all for you, or triple back tick code blocks like every other markdown renderer.
}
Thank you. Almost got aneurysm from reading the original code.
one brace didn't agree with you
I tried both spaces and tab indents and the formatting just killed it so I just kind of said I didn't care enough for a 5 second poop out joke and gave up
I can tell that's not actually his code because it contains booleans.
This is beautiful. The more I look, the more errors I find.
Incredible.
Actually a clever workaround IF modulus never existed
It's actually quite terrible if modulus never existed because the last bit of an integer tells you if it's even or odd so you only really need bitshift, which is constant time and much better than just recursively subtracting by 2. I call this the stack overflow solution because for any number large enough your program will crash by, you guessed it, stack overflow.
Or you AND with 1.