Programming War Crimes | Prime Reacts

345,257
0
Published 2023-04-02

All Comments (21)
  • @moodynoob
    I used to be really frustrated with how difficult to understand academic papers are, but after gaining enough knowledge, I'm now a little more sympathetic - it's really easy to tersely express ideas with complex language, simplifying them requires a lot more effort and is almost always more verbose.
  • @Stirdix
    One from my brother: Code purpose: Every time list is changed, sort list. Problem: sorting list counts as a list change, producing infinite recursion. Solution: catch exception when hitting max recursion depth, assume list is sorted at that point, and continue from where you left off. As he says: "if it works, it works!" [He did fix it the next day when he worked out the proper way to do it.]
  • @capsey_
    5:31 For those wondering, this is Minecraft enchanting table language (aka Standard Galactic alphabet), which is actually not a language but just a font that looks all funky
  • @else1f
    Glad you enjoyed this 🤣. There are so many versions of this now and I'm so glad you picked mine! And sorry about the video quality 😅
  • 1:34 I actually did that recently. The stack trace sometimes contained personally identifiable information, so I caught and rethrew the error to get rid of it in our logs.
  • @OLApplin
    the funniest thing in java to me is to catch an IOException, just to re-throw an UncheckedIoException
  • I've seen this one java class that had a 6,500 line method with 5 layers of inheritance. Stuck right in the middle of the method were these two massive nested if blocks where they both were ~450 lines of if, else if, else crap. Best part was the second of the two if blocks was a copy and paste of the first with one comment saying "don't delete this because for some reason the code won't work without it," and you know what that person was right!
  • @Asto508
    I literally had seen code from a colleague with constants like this: int OneSecondWaitTimeout = 1; int TwoSecondWaitTimeout = 2; int FiveThousandMillisecondsTimeout = 5000; Not a joke, it exists and everytime I review code from this guy, I die inside.
  • @_FFFFFF_
    I've led a priviledged life. The C code I work with most days is bad, but never this bad. Thank you kernel devs.
  • @RealRatchet
    Catching and then rethrowing immediately is useful when you need a debugger trap because breaking on exception sometimes destroys the callstack legibility, I'm looking at you javascript. And then you forget it and push it to production.
  • @emjizone
    6:38 Experts, please explain to me the difference between a Git rainforest and a primitive Git jungle. What are the most toxic bugs that can be found in there?
  • can't believe this has not more views, it has to be one of your best videos
  • @d3vilm4ster
    This is one of your best videos! Loved it 😂❤!
  • @dave6012
    I love that “Bustin’” is on your watch list 😂
  • Yesterday i was refactorig some code written by a collegue and i found this gem. $files = [ ] foreach ($media_files as $file){ $files [] = $file; } return $files; Also the most evil definition of true/false ive ever seen is #define true (rand() % 2) #define false (rand() % 2)
  • @games4us132
    About sentered code - it is actually a thing that was popular back in the days where ide was not common an people programmed in simple text editors. Ive seen that myself but aside from how it looks it was pretty comfortable to read and there was no errors.
  • @TheAndreArtus
    One that always gets me: ``` if condition return true else return false ``` Or one where items were deleted from a collection in a set of nested loops and checks, e.g. ``` while true { for index in range { if (range[index] == itemToDelete) { range = range[0..index-1] + range[index..range.size] found = true } } if found break } ``` There are so many better options one can choose. One, assuming no need to preserve order or immutability is to reverse the iteration order and swap the found item with the last [unmatched] index and then just trim the collection to the new size.