I used to write my first programs like this. It was console RPG with like 10 levels, enemies and stuff. Then I used functions... then classes... well, it was progressive learning.
I once wrote a function that takes 11 parameters which simply initializes an object whose constructor takes all 11 parameters in the same order. I'm happy to say that I've reduced the parameter count to only 9 after a few hours of intense self-reflection.
The real criminal is the object that takes ordered parameters with that many items and not a Hash. If you're consciously aliasing something, at least you're paying some consideration to design.
I'm ashamed to say I've done this. Can't remember the exact details but I think I was trying to round a number to some amount of significant digits. Was easier to just use the standard library function for displaying a number as a rounded string, and convert it back to a number.
in a exam regarding C I was supposed to reverse a string but because I had slept on C for the entire semester I didn't know jack about reversing characters in a string so I just logged my own characters in reverse
i just love this music it's perfectly suited for cursed programming, as monstruosities hidden deep inside the code, waiting to be discovered by the innocent viewer, who then begins to realize just how horrible this is. All the software in the world incorporates terrible code somewhere, and if it were to break, the consequences would be dramatic, considering how dependent to sofware our society has become. As the video progresses, it dawns on the viewer that we were the monsters all along.
Reminds me of the time I made a class called "VolatileVarStorage" The point being that there where some variables and class objects in java that I wanted all child threads to report back to / work on, and I could not get it all sorted out neatly, so I just gave each one the "VolatileVarStorge".
I really like these videos, however I'd like to point out an issue in editing: if you have a very long strip of text that carries over multiple lines, and you do a left to right pan on it, you have to replay the video a few times to actually read what it says, because after you panned to the right for the first line, the beginning of the second goes out of frame, and so on
0:18 is just why, like this is 100% made by someone that started programming in the last two days, you can easily make this into a simple command, just why
I remember when I was starting out, I didn't know that I could access an item from an array with an index. I was using a vector object in python which had a __repr__. I would convert the object to a string, and then "sanitize" the string by replacing the characters I didn't want such as angle brackets, parenthesis. and then I looped through the string until I hit a comma
Fun part is, that I've used the "fake loading bar" myself, but in an Arduino project (so it looks cool, I guess) Also to give sensors time to "level out" their reading before taking the mean from 10 values :P
I used to program in flutter and had a class that managed the general sizes of anything you draw in the screen, from text to a box so it maintains a similar look while being dynamic and adaptative between phone screen sizes, and also added a font size option. Because of how it worked, I just made it so it changed the file and reloaded the app, but it did it all so quick that my pals thought it was broken and it crashed, because of how immediate it was. I had to add an entire "restarting" text bar with a second or so of delay so people knew it wasn't broken
@@pacorodriguez734 Did you mean "violent"? If yes, I agree it sounds a bit odd, but for me it's rather too formal or implying it's too hard for that purpose. I wouldn't use "desafío" here, but perhaps some teacher would, or they just speak a Spanish dialect I'm not familiar with where that's the normal way to phrase it. I've seen desafío being used in similar situations, but can't remember where. It didn't occur to me it could be another language lol.
Sometimes strange code, it's just bypassing compiler errors, libraries, frameworks, engines, and so on. When the shit code is layered on the shit code, but it doesn't work any other way. And so, yes, it is necessary that the programmer understands mathematics a little, although many programmers do not understand anything about math. For example, I look at old programming magazines, more precisely, advice to programmers in magazines for the 80s, 90s.
I think the def Min(a,b): return min(a,b) Is my favourite, because it tells such a good story. Clearly the programmer wrote the code using Min() and instead of replacing each time he wrote it just thought “aaaah fuck it.”
@@PlayerClarinet actually no! because every syscall switches a context so you end up with somewhat lower cpu usage 😁 but still, equally dreadful code haha
In C it is common to do something SIMILAR to 1:53, but the ternary evaluates to string "true" or "false". You have to do this sometimes because there is no format specifier for booleans. This guy is obviously just a mad man.
I spent way to long getting a dynamic wallpaper hacked together on my phone As soon as Apple changes how math operations withing shortcuts handle the time it will implode
Well...if you like it then Im going to explain to you 2 of these jokes XD. Let's freeze a program! while(1 == 1){"Just wait for it"}; This is a loop that tests WHILE 1 is equal to 1 then "do nothing", and then tests again if 1 is still 1 then ask again...and again...and again...so once the program hits this loop...it will literally do nothing forever! Let's hardcode a calculator! Why not? function sum(a,b){ if(a == 1 && b == 0)return 1; if(a == 1 && b == 1)return 2; if(a == 1 && b == 2)return 3; //Remember to include all the numbers to infinity! } If you do this then you literally need to hardcore evey sum of two numbers...every single one of them! XD function sum(a,b)return a+b; You just need a line...that's the joke! XD Hope you enjoyed it. :)
0:46 been there, then I just wrote other function which will return/end when it needs to stop checking further (no nesting, just one after other) & return at each failure case.
Boludo, últimamente me aparece en el inicio de RUclips, standups que salieron en Bendita de youtubers que sigo hace banda. Ya este es el tercero junto a Luquita Rodríguez y Rober Galati
Usually, the code in these videos are so obscure or complicated that you sometimes can't really tell if it does its job correctly. 0:23 is the most pointless piece of code i've seen tho, line 3 is guaranteed going to cause an error
@@Ristyo well then bad assumption. You're clearly not operating on the same level as the genius who wrote that code. Granted, I'm not on that level either, but there is no doubt in my mind that the way he joins the table with itself so that the data is duplicated within the row has some brilliant reasoning behind it that our puny brains just can't understand.
0:43 "Not sure why it does that, but it's a feature now"
**Mojang taking notes**
as an usual
Piston won’t power until updated
Just remember: Any program is just a big if-else statement if you are brave enough.
The yandere true
I used to write my first programs like this. It was console RPG with like 10 levels, enemies and stuff. Then I used functions... then classes... well, it was progressive learning.
People say that AI stands for Artificial Intelligence. That's not true. It actually stands for Aelse/If.
Yandere dev
any program is just i++ if you try hard enough
I once wrote a function that takes 11 parameters which simply initializes an object whose constructor takes all 11 parameters in the same order. I'm happy to say that I've reduced the parameter count to only 9 after a few hours of intense self-reflection.
Monster
The real criminal is the object that takes ordered parameters with that many items and not a Hash. If you're consciously aliasing something, at least you're paying some consideration to design.
I cant tell if you're serious or this is a 9/11 joke
@@lebgen im serious, it is not a 911 joke
@@lebgen bruh
that last one with the absolute value is pure genius
considering how js treats numbers...this might actually be the only way xD
I'm ashamed to say I've done this. Can't remember the exact details but I think I was trying to round a number to some amount of significant digits. Was easier to just use the standard library function for displaying a number as a rounded string, and convert it back to a number.
It is kinda genius, no unnecessary complexity (for the dev, not the cpu), just a straight cut to the point
lol i remember doing Math.pow(a*a, 0.5) to get absolute value
@@soyitielTbf you probably could return -(number) and it would work but that’s not fun…
When your boss uses lines of code as performance metric
2:08 genius
1:07 Right now, most loading screens work pretty much like this
2:04 at first I was thinking "ha ha look at all of the pointless layers of code for such a simple operation", and then the 'return false' hit
That's because they defined False = true earlier
return(orig == val)
And moreover why tf is in function first of all
before I watched this video I thought I was a bad programmer, now I know there is people worse, truly an motivational video
Oh boy it's a trilogy now, keep 'em coming!
0:15
How calculators were made
when I was a child I thought this is how calculator works
@@lux_nemesis
lol same
True though. Calculating with carry over bits takes too long. There are just tables with certain results at hand.
2:10 I hate the fact that it actually works.
It works.. *It actually makes sense.*
in a exam regarding C I was supposed to reverse a string but because I had slept on C for the entire semester I didn't know jack about reversing characters in a string so I just logged my own characters in reverse
0:45 The Yanderedev experience.
i just love this music
it's perfectly suited for cursed programming, as monstruosities hidden deep inside the code, waiting to be discovered by the innocent viewer, who then begins to realize just how horrible this is. All the software in the world incorporates terrible code somewhere, and if it were to break, the consequences would be dramatic, considering how dependent to sofware our society has become.
As the video progresses, it dawns on the viewer that we were the monsters all along.
Song is "Kronos Unveiled" from the Incredibles OST. No idea why RUclips labelled it as from Wish
0:31 OOP be like:
True.
Do not insult the almighty universal getter
I mean that is one way to retrieve a variable
"Not sure why, but it's a feature now"
that's basically me
Reminds me of the time I made a class called "VolatileVarStorage" The point being that there where some variables and class objects in java that I wanted all child threads to report back to / work on, and I could not get it all sorted out neatly, so I just gave each one the "VolatileVarStorge".
0:30 Behold! An ACCESSOR!!!!!!
I really like these videos, however I'd like to point out an issue in editing: if you have a very long strip of text that carries over multiple lines, and you do a left to right pan on it, you have to replay the video a few times to actually read what it says, because after you panned to the right for the first line, the beginning of the second goes out of frame, and so on
just channel your photographic memory smh
Just recode ur brain to see it all in one go
@@jonatanpl3899 use brainfuck for it
Pausing and rereading is all part of the fun
It adds to the tension.
0:37
Very high
Very high
Very high
Very high
Very high
Very high
Very high
Very high
0:18 is just why, like this is 100% made by someone that started programming in the last two days, you can easily make this into a simple command, just why
I remember when I was starting out, I didn't know that I could access an item from an array with an index. I was using a vector object in python which had a __repr__. I would convert the object to a string, and then "sanitize" the string by replacing the characters I didn't want such as angle brackets, parenthesis. and then I looped through the string until I hit a comma
This meal was delicious, I never had cursed spaghetti before and I must say that I'm always eager for more
Fun part is, that I've used the "fake loading bar" myself, but in an Arduino project (so it looks cool, I guess)
Also to give sensors time to "level out" their reading before taking the mean from 10 values :P
I used to program in flutter and had a class that managed the general sizes of anything you draw in the screen, from text to a box so it maintains a similar look while being dynamic and adaptative between phone screen sizes, and also added a font size option. Because of how it worked, I just made it so it changed the file and reloaded the app, but it did it all so quick that my pals thought it was broken and it crashed, because of how immediate it was. I had to add an entire "restarting" text bar with a second or so of delay so people knew it wasn't broken
if you != Fine
print("No")
if you == Fine
you != Fine
print("No")
1:55
if it was in a loop, it would be ok
I feel so well represented when I see programming war crimes and there is a comment in portuguese among the code like in 1:21
It could also be Spanish (and perhaps another related language).
@@aylen7062 As a Spanish i find really harmful seeing deasfio instead of desafío, so I expect it's Portuguese.
@@pacorodriguez734 Did you mean "violent"?
If yes, I agree it sounds a bit odd, but for me it's rather too formal or implying it's too hard for that purpose. I wouldn't use "desafío" here, but perhaps some teacher would, or they just speak a Spanish dialect I'm not familiar with where that's the normal way to phrase it.
I've seen desafío being used in similar situations, but can't remember where.
It didn't occur to me it could be another language lol.
@@aylen7062 yeah, sorry for my bad english and thanks for your answer :)
2:00 is pure witchcraft🤣🤣
Me : Writes a whole 300+ line flappy bird code in only main class in java
"not sure why, but it's a feature now"
unbelievably real
Once in Processing I kept changing the fill color without drawing anything. It took a while for me to realize and I saved 15 lines of code.
at 1:04, whats more of a war crime than the obvious else ifs is the how its like "hertz ==64" without a space before the number
I remember when I wrote 50 to 100 lines of code for random numbers in between 2 numbers
The comments trying to justify the code in this just make it even more funny.
I love how most programming war crimes are either: You dont actually make an algo and spit out something hardcoded or you dont know what a loop is
Sometimes strange code, it's just bypassing compiler errors, libraries, frameworks, engines, and so on. When the shit code is layered on the shit code, but it doesn't work any other way. And so, yes, it is necessary that the programmer understands mathematics a little, although many programmers do not understand anything about math. For example, I look at old programming magazines, more precisely, advice to programmers in magazines for the 80s, 90s.
I think the
def Min(a,b):
return min(a,b)
Is my favourite, because it tells such a good story. Clearly the programmer wrote the code using Min() and instead of replacing each time he wrote it just thought “aaaah fuck it.”
Why does Homage by Mild High Club and this Video Muted fit so perfectly together?
these are so satisfying and hilarious at the same time
Ah yes, the TF2 source code
"not sure why but it's a feature now" REAL
1:30 isn't too bad. Assuming the application is gonna create the file from a different thread.
use mutexes then
CPU spins at 100% until the file is created.
BOOM smoke comes out of laptop, ....
@@PlayerClarinet actually no! because every syscall switches a context so you end up with somewhat lower cpu usage 😁 but still, equally dreadful code haha
@@daniser87 do you mean futexes?
In C it is common to do something SIMILAR to 1:53, but the ternary evaluates to string "true" or "false". You have to do this sometimes because there is no format specifier for booleans. This guy is obviously just a mad man.
nah
upd: or I guess yeah but why would you need string true or false
that ternary "?true:false" terrified me
the calculator was the worst one by far 💀
converter dude is an absolute madman
my wife tried to understand why is this funny
Thx for programming tips
I spent way to long getting a dynamic wallpaper hacked together on my phone
As soon as Apple changes how math operations withing shortcuts handle the time it will implode
As a non-programmer I didn’t understand why most of these were war crimes.
Well...if you like it then Im going to explain to you 2 of these jokes XD.
Let's freeze a program!
while(1 == 1){"Just wait for it"};
This is a loop that tests WHILE 1 is equal to 1 then "do nothing", and then tests again if 1 is still 1 then ask again...and again...and again...so once the program hits this loop...it will literally do nothing forever!
Let's hardcode a calculator! Why not?
function sum(a,b){
if(a == 1 && b == 0)return 1;
if(a == 1 && b == 1)return 2;
if(a == 1 && b == 2)return 3;
//Remember to include all the numbers to infinity!
}
If you do this then you literally need to hardcore evey sum of two numbers...every single one of them! XD
function sum(a,b)return a+b; You just need a line...that's the joke! XD
Hope you enjoyed it. :)
that's hardly surprising
you should make one where the variable "left" is 1 and right is -1
0:55 NO WAY THATS MY NATIVE LANGUAGE ON THE ABOVE (LOOK ITS NORWEGIAN!!)
Jkm preparing a top 10 coding life hacks video after watching this
"Not sure why, but it's a feature now."
Lol!
1:21 he's too powerful
Does somebody have a link to this "I found a way of doing this without any modules"?\
I want to see this in person!!
1:52, this is valid. In C++, 0 is false; the rest, true. So it was a f() to say if the number was positive.
The joke is that they could simply return: result >=0
@@DavisTibbzYeah. That's what happens when 1 play cards or chess, while watching a video.
ok 1:16 is uniquely diabolical
You know the code is evil when it makes a face at you. >=0
From now on I'm using !
2:08 doesn't even work because floats (e.g. -22.22) will return 22, not 22.22 :)
Very entertaining, again. From where do you get all these examples?
he works at google
i had an even funnier one that i caused, had a java instance in task manager, all of the sub-instances were python
1:05 ive actually done that, but with sleep(30) when it reaches 99% loading. XD
//main function won't start until you press a key, now sure why, but it's a feature now
Once for a game I was making with no engine, I made a data type for an object that took like 8 parameters
1:46 I just need to see the taskRow() source code
Now I understand why ChatGPT does some weird ass shit
The worst one is the one with the absolute number
He can't keep getting away with it
"i dont know why, but its a feature now"
ReturnOfReturn - masterpiece.
What's wrong with 0:50 file copying?
He says: "I found a way of doing this without any modules."
2:08 Dude I can't stop laughing
0:45 the stairway to hell
fucking cried from laughter
0:55 Norwegian :D
2:09 man wtf lol
1:50 I... may be guilty of this...
1:51 in my C++ course, i tried to do that when we were introduced to the ternary operator
please more im fucking dying lol
I audibly exhaled
0:46 been there, then I just wrote other function which will return/end when it needs to stop checking further (no nesting, just one after other) & return at each failure case.
1:55 he forgor await
Boludo, últimamente me aparece en el inicio de RUclips, standups que salieron en Bendita de youtubers que sigo hace banda. Ya este es el tercero junto a Luquita Rodríguez y Rober Galati
This shows how we lose our sanity.
0:53
my browser stopped working at this second, i think its cursed
the get(var) part is actually identity which is a mathematical law. who else is a functional programmer here?
YOU'RE ATTEMPTING THE BIGGEST WAR CRIME. WHY DID U START TO THIS SERIE FROM 1, INSTEAD OF 0?
So, just another pull request from an indian extern.
i make 10 getcompnents for frame in the enemy script...
give me an idea in replies and ill turn it into a cursed python script
this is normal code what do u mean i ship this to prod daily
I thought I was shitcoding until I watched this video 😨
Maybe more interesting will be to make further video in "Mr Incredible finds out" style
hello??? quality 1080p HD???? where re youuuu??? xd
Find this man!
ai is just a bunch of if else statements if you think about it
this is art
Usually, the code in these videos are so obscure or complicated that you sometimes can't really tell if it does its job correctly.
0:23 is the most pointless piece of code i've seen tho, line 3 is guaranteed going to cause an error
it actually works when there's only one row in the table lol, I tested it.
@@elijahbuscho7715 well yeah, but i was commenting under the assumption that the table would be used regularly with many rows inside.
@@Ristyo well then bad assumption. You're clearly not operating on the same level as the genius who wrote that code. Granted, I'm not on that level either, but there is no doubt in my mind that the way he joins the table with itself so that the data is duplicated within the row has some brilliant reasoning behind it that our puny brains just can't understand.
@@elijahbuscho7715 lmao
I have seen people try to run stuff like this, it is not even that farfetch