programming war crimes 3

Поделиться
HTML-код
  • Опубликовано: 3 окт 2024
  • join my discord to help make these videos: dsc.gg/elseif
  • ИгрыИгры

Комментарии • 270

  • @nvid
    @nvid Год назад +506

    0:43 "Not sure why it does that, but it's a feature now"
    **Mojang taking notes**

  • @ad4mwayn340
    @ad4mwayn340 11 месяцев назад +605

    Just remember: Any program is just a big if-else statement if you are brave enough.

    • @Kwaiiii
      @Kwaiiii 9 месяцев назад +46

      The yandere true

    • @anonimowelwiatko9811
      @anonimowelwiatko9811 9 месяцев назад +28

      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.

    • @EdKolis
      @EdKolis 9 месяцев назад +46

      People say that AI stands for Artificial Intelligence. That's not true. It actually stands for Aelse/If.

    • @accountrarysi2776
      @accountrarysi2776 9 месяцев назад +8

      Yandere dev

    • @_vindicator_
      @_vindicator_ 8 месяцев назад +14

      any program is just i++ if you try hard enough

  • @almicc
    @almicc Год назад +706

    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.

    • @CodeWithAle
      @CodeWithAle Год назад +43

      Monster

    • @nope.0.
      @nope.0. Год назад +33

      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.

    • @lebgen
      @lebgen Год назад +62

      I cant tell if you're serious or this is a 9/11 joke

    • @almicc
      @almicc Год назад +26

      @@lebgen im serious, it is not a 911 joke

    • @Foxxey
      @Foxxey Год назад +6

      ​@@lebgen bruh

  • @wilsonwilson137
    @wilsonwilson137 Год назад +163

    that last one with the absolute value is pure genius

    • @mrocholl
      @mrocholl Год назад +31

      considering how js treats numbers...this might actually be the only way xD

    • @Houshalter
      @Houshalter 9 месяцев назад +8

      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.

    • @soyitiel
      @soyitiel 6 месяцев назад +1

      It is kinda genius, no unnecessary complexity (for the dev, not the cpu), just a straight cut to the point

    • @lonelyghostenjoyinglife4517
      @lonelyghostenjoyinglife4517 4 месяца назад

      lol i remember doing Math.pow(a*a, 0.5) to get absolute value

    • @thebigcheese1153
      @thebigcheese1153 2 месяца назад +1

      @@soyitielTbf you probably could return -(number) and it would work but that’s not fun…

  • @thedownwardmachine
    @thedownwardmachine Год назад +64

    When your boss uses lines of code as performance metric

  • @AwesomeCadecraft
    @AwesomeCadecraft Год назад +95

    2:08 genius

  • @Animator2D.
    @Animator2D. 11 месяцев назад +23

    1:07 Right now, most loading screens work pretty much like this

  • @elijahbuscho7715
    @elijahbuscho7715 Год назад +76

    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

    • @TheVonWeasel
      @TheVonWeasel Год назад +23

      That's because they defined False = true earlier

    • @KewalTailor
      @KewalTailor 3 месяца назад

      return(orig == val)
      And moreover why tf is in function first of all

  • @hackanimator12
    @hackanimator12 Год назад +84

    before I watched this video I thought I was a bad programmer, now I know there is people worse, truly an motivational video

  • @THExRISER
    @THExRISER Год назад +85

    Oh boy it's a trilogy now, keep 'em coming!

  • @gabrielbarros493
    @gabrielbarros493 Год назад +52

    0:15
    How calculators were made

    • @lux_nemesis
      @lux_nemesis Год назад +17

      when I was a child I thought this is how calculator works

    • @zai_ry11
      @zai_ry11 6 месяцев назад

      ​@@lux_nemesis
      lol same

    • @bekiraltindal9053
      @bekiraltindal9053 День назад

      True though. Calculating with carry over bits takes too long. There are just tables with certain results at hand.

  • @FaultyTwo
    @FaultyTwo 11 месяцев назад +11

    2:10 I hate the fact that it actually works.
    It works.. *It actually makes sense.*

  • @terryfries
    @terryfries Год назад +67

    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

  • @christianalvarado528
    @christianalvarado528 Год назад +33

    0:45 The Yanderedev experience.

  • @5cover
    @5cover Год назад +218

    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.

    • @Azhini
      @Azhini 9 месяцев назад +1

      Song is "Kronos Unveiled" from the Incredibles OST. No idea why RUclips labelled it as from Wish

  • @alangamer50
    @alangamer50 Год назад +57

    0:31 OOP be like:

    • @inqmusician2
      @inqmusician2 5 месяцев назад +2

      True.

    • @Killtesblocs
      @Killtesblocs 5 месяцев назад +3

      Do not insult the almighty universal getter

    • @TheColorOrang
      @TheColorOrang 3 месяца назад

      I mean that is one way to retrieve a variable

  • @zenniththefolf4888
    @zenniththefolf4888 Год назад +13

    "Not sure why, but it's a feature now"
    that's basically me

  • @jaceg810
    @jaceg810 10 месяцев назад +13

    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".

  • @psyrow4957
    @psyrow4957 Год назад +14

    0:30 Behold! An ACCESSOR!!!!!!

  • @naashchaa
    @naashchaa Год назад +105

    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

    • @else1f
      @else1f  Год назад +60

      just channel your photographic memory smh

    • @jonatanpl3899
      @jonatanpl3899 Год назад +6

      Just recode ur brain to see it all in one go

    • @nvermr
      @nvermr Год назад

      @@jonatanpl3899 use brainfuck for it

    • @jarodnewman5535
      @jarodnewman5535 Год назад +6

      Pausing and rereading is all part of the fun

    • @horsethi3f
      @horsethi3f Год назад +3

      It adds to the tension.

  • @killeandroid98
    @killeandroid98 Год назад +6

    0:37
    Very high
    Very high
    Very high
    Very high
    Very high
    Very high
    Very high
    Very high

  • @thatdudenamedkevin5627
    @thatdudenamedkevin5627 Год назад +13

    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

  • @RedFrostGames
    @RedFrostGames Год назад +25

    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

  • @benjaminghailane9452
    @benjaminghailane9452 Год назад +21

    This meal was delicious, I never had cursed spaghetti before and I must say that I'm always eager for more

  • @Bednar121
    @Bednar121 Год назад +26

    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

    • @satoruriolu6132
      @satoruriolu6132 10 месяцев назад +1

      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

  • @ScarletsWork
    @ScarletsWork Месяц назад +1

    if you != Fine
    print("No")
    if you == Fine
    you != Fine
    print("No")

  • @PawelHerok
    @PawelHerok Год назад +17

    1:55
    if it was in a loop, it would be ok

  • @gabrielazevedo5232
    @gabrielazevedo5232 Год назад +29

    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

    • @aylen7062
      @aylen7062 Год назад +1

      It could also be Spanish (and perhaps another related language).

    • @pacorodriguez734
      @pacorodriguez734 Год назад +1

      @@aylen7062 As a Spanish i find really harmful seeing deasfio instead of desafío, so I expect it's Portuguese.

    • @aylen7062
      @aylen7062 Год назад

      @@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.

    • @pacorodriguez734
      @pacorodriguez734 Год назад

      @@aylen7062 yeah, sorry for my bad english and thanks for your answer :)

  • @odoijethro7202
    @odoijethro7202 Год назад +5

    2:00 is pure witchcraft🤣🤣

  • @turanbirligi6969
    @turanbirligi6969 5 месяцев назад +1

    Me : Writes a whole 300+ line flappy bird code in only main class in java

  • @aceprodofc
    @aceprodofc 22 дня назад

    "not sure why, but it's a feature now"
    unbelievably real

  • @M1Miketro
    @M1Miketro Год назад +8

    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.

  • @ninjacodertech
    @ninjacodertech 10 месяцев назад +2

    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

  • @heroes-of-balkan
    @heroes-of-balkan Год назад +5

    I remember when I wrote 50 to 100 lines of code for random numbers in between 2 numbers

  • @Palexite
    @Palexite Год назад +5

    The comments trying to justify the code in this just make it even more funny.

  • @Chaseis
    @Chaseis 7 месяцев назад

    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

  • @LithiumDeuteride-6
    @LithiumDeuteride-6 Год назад +9

    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.

  • @jackdog06
    @jackdog06 4 месяца назад

    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.”

  • @The_Neutraal
    @The_Neutraal Год назад +4

    Why does Homage by Mild High Club and this Video Muted fit so perfectly together?

  • @dorathedestroyer4081
    @dorathedestroyer4081 Год назад +4

    these are so satisfying and hilarious at the same time

  • @notthejumping_spider
    @notthejumping_spider 7 месяцев назад +2

    Ah yes, the TF2 source code

  • @paytondev
    @paytondev 10 месяцев назад

    "not sure why but it's a feature now" REAL

  • @aahaanchawla5393
    @aahaanchawla5393 Год назад +14

    1:30 isn't too bad. Assuming the application is gonna create the file from a different thread.

    • @daniser87
      @daniser87 Год назад +3

      use mutexes then

    • @PlayerClarinet
      @PlayerClarinet Год назад +22

      CPU spins at 100% until the file is created.

    • @liquidmetal718
      @liquidmetal718 Год назад +11

      BOOM smoke comes out of laptop, ....

    • @bernardcrnkovic3769
      @bernardcrnkovic3769 Год назад +1

      @@PlayerClarinet actually no! because every syscall switches a context so you end up with somewhat lower cpu usage 😁 but still, equally dreadful code haha

    • @Chriss4123
      @Chriss4123 Год назад +1

      @@daniser87 do you mean futexes?

  • @ziggy6698
    @ziggy6698 Год назад +3

    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.

    • @softed
      @softed 11 месяцев назад +1

      nah
      upd: or I guess yeah but why would you need string true or false

  • @Dodecatone
    @Dodecatone 10 месяцев назад

    that ternary "?true:false" terrified me

  • @M1szS
    @M1szS Год назад +2

    the calculator was the worst one by far 💀

  • @Luiz997488
    @Luiz997488 10 месяцев назад +1

    converter dude is an absolute madman

  • @alexandersemionov5790
    @alexandersemionov5790 Год назад +3

    my wife tried to understand why is this funny

  • @ks2222_
    @ks2222_ Год назад +6

    Thx for programming tips

  • @superNova5837
    @superNova5837 17 дней назад

    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

  • @BimmerWon
    @BimmerWon Год назад +12

    As a non-programmer I didn’t understand why most of these were war crimes.

    • @juandiegofm
      @juandiegofm Год назад +18

      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. :)

    • @pocok5000
      @pocok5000 Год назад +3

      that's hardly surprising

  • @alientaker9
    @alientaker9 11 месяцев назад +2

    you should make one where the variable "left" is 1 and right is -1

  • @touentheidiot
    @touentheidiot 5 месяцев назад +1

    0:55 NO WAY THATS MY NATIVE LANGUAGE ON THE ABOVE (LOOK ITS NORWEGIAN!!)

  • @jumperpro5392
    @jumperpro5392 Год назад +3

    Jkm preparing a top 10 coding life hacks video after watching this

  • @andrewstrebig979
    @andrewstrebig979 8 месяцев назад

    "Not sure why, but it's a feature now."
    Lol!

  • @mandarbamane4268
    @mandarbamane4268 Год назад +1

    1:21 he's too powerful

  • @MOVET3
    @MOVET3 Год назад +10

    Does somebody have a link to this "I found a way of doing this without any modules"?\

    • @yusinwu
      @yusinwu Год назад +2

      I want to see this in person!!

  • @MrAbrazildo
    @MrAbrazildo Год назад +2

    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.

    • @DavisTibbz
      @DavisTibbz 11 месяцев назад +1

      The joke is that they could simply return: result >=0

    • @MrAbrazildo
      @MrAbrazildo 11 месяцев назад +1

      ​@@DavisTibbzYeah. That's what happens when 1 play cards or chess, while watching a video.

  • @ibiuld443
    @ibiuld443 9 месяцев назад +1

    ok 1:16 is uniquely diabolical

  • @Wranderous0001
    @Wranderous0001 Год назад +1

    You know the code is evil when it makes a face at you. >=0

    • @o_s-24
      @o_s-24 Год назад

      From now on I'm using !

  • @mechanikate
    @mechanikate 8 месяцев назад +1

    2:08 doesn't even work because floats (e.g. -22.22) will return 22, not 22.22 :)

  • @bmusic9817
    @bmusic9817 Год назад +10

    Very entertaining, again. From where do you get all these examples?

    • @coel3572
      @coel3572 Год назад +5

      he works at google

  • @ZeNyfh
    @ZeNyfh Год назад +4

    i had an even funnier one that i caused, had a java instance in task manager, all of the sub-instances were python

  • @kris_pendragon
    @kris_pendragon 6 месяцев назад +1

    1:05 ive actually done that, but with sleep(30) when it reaches 99% loading. XD

  • @ezekiellaww2524
    @ezekiellaww2524 Год назад +1

    //main function won't start until you press a key, now sure why, but it's a feature now

  • @xenonorsomething
    @xenonorsomething 5 месяцев назад

    Once for a game I was making with no engine, I made a data type for an object that took like 8 parameters

  • @elijahbuscho7715
    @elijahbuscho7715 Год назад +3

    1:46 I just need to see the taskRow() source code

  • @ta_pegandofogo2988
    @ta_pegandofogo2988 23 дня назад

    Now I understand why ChatGPT does some weird ass shit

  • @ptbt3572
    @ptbt3572 2 месяца назад

    The worst one is the one with the absolute number

  • @FreezeBlaze
    @FreezeBlaze Год назад

    He can't keep getting away with it

  • @matze489
    @matze489 11 месяцев назад

    "i dont know why, but its a feature now"

  • @DieOffenbarung
    @DieOffenbarung 9 месяцев назад

    ReturnOfReturn - masterpiece.

  • @musikali1
    @musikali1 Год назад +6

    What's wrong with 0:50 file copying?

    • @Thomas-ko1nf
      @Thomas-ko1nf 6 месяцев назад +1

      He says: "I found a way of doing this without any modules."

  • @spongewent1479
    @spongewent1479 Месяц назад

    2:08 Dude I can't stop laughing

  • @Scorpy37
    @Scorpy37 5 месяцев назад

    0:45 the stairway to hell

  • @elomaigote5085
    @elomaigote5085 Год назад +2

    fucking cried from laughter

  • @karl4813
    @karl4813 Год назад +4

    0:55 Norwegian :D

  • @mandarbamane4268
    @mandarbamane4268 Год назад +1

    2:09 man wtf lol

  • @malkrie1444
    @malkrie1444 3 дня назад

    1:50 I... may be guilty of this...

  • @groekanne7765
    @groekanne7765 6 месяцев назад

    1:51 in my C++ course, i tried to do that when we were introduced to the ternary operator

  • @creepychris420
    @creepychris420 Год назад +2

    please more im fucking dying lol

  • @Eltik
    @Eltik Год назад +1

    I audibly exhaled

  • @mandarbamane4268
    @mandarbamane4268 Год назад

    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.

  • @knockstick
    @knockstick 6 месяцев назад

    1:55 he forgor await

  • @maxi_rios_
    @maxi_rios_ 21 день назад

    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

  • @reinbew794
    @reinbew794 10 месяцев назад

    This shows how we lose our sanity.

  • @killeandroid98
    @killeandroid98 Год назад

    0:53
    my browser stopped working at this second, i think its cursed

  • @execute214
    @execute214 6 месяцев назад

    the get(var) part is actually identity which is a mathematical law. who else is a functional programmer here?

  • @hcc3904
    @hcc3904 Год назад +1

    YOU'RE ATTEMPTING THE BIGGEST WAR CRIME. WHY DID U START TO THIS SERIE FROM 1, INSTEAD OF 0?

  • @Jakub1989YTb
    @Jakub1989YTb Год назад

    So, just another pull request from an indian extern.

  • @Mabox-sc5iz
    @Mabox-sc5iz Год назад +1

    i make 10 getcompnents for frame in the enemy script...

  • @thetntteam
    @thetntteam Год назад +1

    give me an idea in replies and ill turn it into a cursed python script

  • @ExponentialWorkload
    @ExponentialWorkload Год назад +1

    this is normal code what do u mean i ship this to prod daily

  • @illoprin
    @illoprin 9 месяцев назад

    I thought I was shitcoding until I watched this video 😨

  • @Кирилл-ы5р7я
    @Кирилл-ы5р7я Год назад

    Maybe more interesting will be to make further video in "Mr Incredible finds out" style

  • @soubakouh
    @soubakouh Год назад +1

    hello??? quality 1080p HD???? where re youuuu??? xd

  • @Charisios10
    @Charisios10 5 месяцев назад

    Find this man!

  • @adoolaTurayk
    @adoolaTurayk 3 месяца назад

    ai is just a bunch of if else statements if you think about it

  • @gamerfi9451
    @gamerfi9451 8 месяцев назад

    this is art

  • @Ristyo
    @Ristyo Год назад +4

    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

    • @elijahbuscho7715
      @elijahbuscho7715 Год назад

      it actually works when there's only one row in the table lol, I tested it.

    • @Ristyo
      @Ristyo Год назад

      @@elijahbuscho7715 well yeah, but i was commenting under the assumption that the table would be used regularly with many rows inside.

    • @elijahbuscho7715
      @elijahbuscho7715 Год назад +1

      @@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.

    • @Ristyo
      @Ristyo Год назад

      @@elijahbuscho7715 lmao

    • @allancg1022
      @allancg1022 Год назад

      I have seen people try to run stuff like this, it is not even that farfetch