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
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: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 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.
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
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
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
@@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.
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.
@@PlayerClarinet actually no! because every syscall switches a context so you end up with somewhat lower cpu usage 😁 but still, equally dreadful code haha
I actually find one of those code examples useful from time to time. F(a,b) = return f(a,b) is sometimes useful where you're porting code from mixed languages and sometimes the only difference between the two languages is the case sensitivity of the functions...and someone's gone and named things a certain way in their libraries.
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. :)
1:31 if you were using the Windows API there, you could do Sleep(0), which basically just tells the OS's scheduler to give time to a different process without specifying an amount of time the scheduler should NOT try to give time to the current process. This is great if you need to check something like this in an infinite loop, and don't want your program to have 100% CPU usage. Or you can use FindFirstChangeNotification (or whatever it's equivalent in the filesystem API of your choice is)
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.
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.”
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
0:16 why do i feel deep in my machine mind this is exactly how you build a tank when your tech level is at: ""i have to forge my own nails!" ♨EVACUATE! CORE MELTDOWN INEVITABLE! ♨ im gona go for a walk cuss this one is too much rn... 🙃🤣🤣🤣
Boludo, últimamente me aparece en el inicio de UA-cam, standups que salieron en Bendita de youtubers que sigo hace banda. Ya este es el tercero junto a Luquita Rodríguez y Rober Galati
For some reason it's joining a table with itself and joining on id. Just... what? Then the where clause actually limits it to a certain id, but why not just a simple select?
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.
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
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
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…
2:08 genius
When your boss uses lines of code as performance metric
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
@@KewalTailor no, it'd be `return orig != val;`
@@KewalTailorbut he wants it to be false if they are equal so it should be return !(orig == val)
before I watched this video I thought I was a bad programmer, now I know there is people worse, truly an motivational video
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.
@@bekiraltindal9053isn’t that only for trig functions?
Oh boy it's a trilogy now, keep 'em coming!
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
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:45 The Yanderedev experience.
0:31 OOP be like:
True.
Do not insult the almighty universal getter
I mean that is one way to retrieve a variable
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
"Not sure why, but it's a feature now"
that's basically me
0:30 Behold! An ACCESSOR!!!!!!
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 UA-cam labelled it as from Wish
0:55 NO WAY THATS MY NATIVE LANGUAGE ON THE ABOVE (LOOK ITS NORWEGIAN!!)
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
This meal was delicious, I never had cursed spaghetti before and I must say that I'm always eager for more
2:10 I hate the fact that it actually works.
It works.. *It actually makes sense.*
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
how tf did you learn about __repr__ before indexes? or learn about arrays without learning about indexes??
@@shaansingh6048 I didn't know about repr back then. I just knew if I did str() it would show me the values
0:37
Very high
Very high
Very high
Very high
Very high
Very high
Very high
Very high
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 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.
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.
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🤣🤣
1:55
if it was in a loop, it would be ok
tbh he probably just copy pasted it so he actually took less time than a loop would’ve taken
00:50
"Wow that one is pretty useful" 👀
2 seconds later...
"A yo what the flip 😭😭"
Me : Writes a whole 300+ line flappy bird code in only main class in java
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
I remember when I wrote 50 to 100 lines of code for random numbers in between 2 numbers
if you != Fine
print("No")
if you == Fine
you != Fine
print("No")
2:08 doesn't even work because floats (e.g. -22.22) will return 22, not 22.22 :)
he can probably assume he’s only working with ints
1:01 is basically bogus. That's not the way to set framerate and hertz in Unity.
the calculator was the worst one by far 💀
The comments trying to justify the code in this just make it even more funny.
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.
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
these are so satisfying and hilarious at the same time
1:05 ive actually done that, but with sleep(30) when it reaches 99% loading. XD
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?
I actually find one of those code examples useful from time to time. F(a,b) = return f(a,b) is sometimes useful where you're porting code from mixed languages and sometimes the only difference between the two languages is the case sensitivity of the functions...and someone's gone and named things a certain way in their libraries.
my wife tried to understand why is this funny
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
1:31 if you were using the Windows API there, you could do Sleep(0), which basically just tells the OS's scheduler to give time to a different process without specifying an amount of time the scheduler should NOT try to give time to the current process. This is great if you need to check something like this in an infinite loop, and don't want your program to have 100% CPU usage.
Or you can use FindFirstChangeNotification (or whatever it's equivalent in the filesystem API of your choice is)
What's wrong with 0:50 file copying?
He says: "I found a way of doing this without any modules."
Why does Homage by Mild High Club and this Video Muted fit so perfectly together?
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.
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.”
I don’t always understand all of these images, but the completely unmodulated column of 800 if statements / cases never gets old
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.
you should make one where the variable "left" is 1 and right is -1
1:51 in my C++ course, i tried to do that when we were introduced to the ternary operator
1:21 he's too powerful
"not sure why, but it's a feature now"
unbelievably real
Does somebody have a link to this "I found a way of doing this without any modules"?\
I want to see this in person!!
converter dude is an absolute madman
//main function won't start until you press a key, now sure why, but it's a feature now
that ternary "?true:false" terrified me
Ah yes, the TF2 source code
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
i had an even funnier one that i caused, had a java instance in task manager, all of the sub-instances were python
"i dont know why, but its a feature now"
Jkm preparing a top 10 coding life hacks video after watching this
Thx for programming tips
0:22 That is in no way shape or form a cursed SQL query, I've seen FAR FAR worse in production code.
Once for a game I was making with no engine, I made a data type for an object that took like 8 parameters
"not sure why but it's a feature now" REAL
1:46 I just need to see the taskRow() source code
0:16
why do i feel deep in my machine mind this is exactly how you build a tank when your tech level is at: ""i have to forge my own nails!"
♨EVACUATE! CORE MELTDOWN INEVITABLE! ♨
im gona go for a walk cuss this one is too much rn... 🙃🤣🤣🤣
"Not sure why, but it's a feature now."
Lol!
0:42 this got me
The worst one is the one with the absolute number
You know the code is evil when it makes a face at you. >=0
From now on I'm using !
He can't keep getting away with it
Very entertaining, again. From where do you get all these examples?
he works at google
ReturnOfReturn - masterpiece.
Boludo, últimamente me aparece en el inicio de UA-cam, standups que salieron en Bendita de youtubers que sigo hace banda. Ya este es el tercero junto a Luquita Rodríguez y Rober Galati
0:53
my browser stopped working at this second, i think its cursed
i make 10 getcompnents for frame in the enemy script...
So, just another pull request from an indian extern.
give me an idea in replies and ill turn it into a cursed python script
didnt get the sql meme
It's just a bloated way to look for an entry where id = 15
For some reason it's joining a table with itself and joining on id. Just... what? Then the where clause actually limits it to a certain id, but why not just a simple select?
@@ccgarciab When I read it for the first time I said at loud: "no way" and I recoiled in disbelief.
Now I understand why ChatGPT does some weird ass shit
I have actually done
try:
...
except:
print("Fuck")
This shows how we lose our sanity.
this is normal code what do u mean i ship this to prod daily
wouldn't 2:07 actually work ? Or is it just faster and normaler to do it the right way ?
It's useless, cuz it takes 2 bool agrs , you can just write (orig==val) and result gonna be the same
0:45 the stairway to hell
hello??? quality 1080p HD???? where re youuuu??? xd
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
2:08 Dude I can't stop laughing
Maybe more interesting will be to make further video in "Mr Incredible finds out" style
We've all done this at some point, right?
02:08 no work with -6.9
2:09 man wtf lol