Тёмный

The Worst Lines of Code Ever 

Tobi The Great
Подписаться 4,7 тыс.
Просмотров 190 тыс.
50% 1

EDIT: I address the wrongs of this video here: • Righting My Wrongs Wit... .
In this video, I'll show you a few examples of REALLY BAD code. What qualifies as bad? Anything from tedious, to redundant, to even dangerous lines of code that have 100% been used in some of the most popular apps and services in the world. Bad coding is all over the tech world; so hopefully, you can learn from these examples how to be a responsible software engineer.
Thanks for watching! Subscribe for cool and kinda funny videos: bit.ly/2WesyrH.
Use Tubebuddy to optimize and grow your channel: www.tubebuddy....
===========================
CONNECT WITH ME GREATS
===========================
Discord: / discord .
Twitter: / iamtobithegreat .
Instagram: / iamtobithegreat .
=========================
MY GREAT HOMIES WITH THE TUNES
=========================
Sudani - / sudani_15 .
J-Prime - / jtotheprime .
OUTRO: If Only, by J-Prime.
open.spotify.c....

Опубликовано:

 

27 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 675   
@garmboy47
@garmboy47 4 года назад
this show’s up when you search up “Yandere dev code” lol
@TobiTheGreat
@TobiTheGreat 4 года назад
I’ve been made aware 😅, although I had no idea who he was when I created this video. I hope he doesn’t take this the wrong way!
@RyderMonkeyGamer
@RyderMonkeyGamer 4 года назад
SCP Foundation lol I searched up “are ya coding son?”
@souna889
@souna889 4 года назад
@@TobiTheGreat it's in your tags though
@TobiTheGreat
@TobiTheGreat 4 года назад
Souna thanks for pointing this out. When this video started to gain traction out of nowhere, I didn’t initially believe that Yandere dev was related. So, I experimented with a bunch of different tags to see if and where it would rank when you search for that topic. It doesn’t seem to have made much of an impact though, so I took most of the terms off
@entruh4520
@entruh4520 4 года назад
I searched are you coding son
@SrSeed
@SrSeed 4 года назад
Yandere Dev will copyright your bad code as his own
@TobiTheGreat
@TobiTheGreat 4 года назад
Yo I hope not 😭, this video came out a while ago
@jabberduhdabber9538
@jabberduhdabber9538 4 года назад
Are you coding son?
@SrSeed
@SrSeed 4 года назад
@@jabberduhdabber9538 Ahah!
@retardeda
@retardeda 4 года назад
@@jabberduhdabber9538 sure I am father
@sponcer_kils6724
@sponcer_kils6724 4 года назад
Ace Looc good
@ZenoDovahkiin
@ZenoDovahkiin 4 года назад
"What is the issue here?" Me: That tomorrow isn't three years in the past?
@devilaoszwann7970
@devilaoszwann7970 4 года назад
Also, if(today) will always return true, since it's not 0 or NULL
@michaeledmunds7266
@michaeledmunds7266 2 года назад
Dang time traveling coders.
@26dollar
@26dollar 4 года назад
yanderedev is turning 43 next week
@TobiTheGreat
@TobiTheGreat 4 года назад
really? It says that he's 31 on wikipedia
@soup2600
@soup2600 4 года назад
@@TobiTheGreat Knowing how bad he is at code, the reason his age doesn't reflect properly is because hes Amish.
@flare6x
@flare6x 4 года назад
@@soup2600 lol
@brutal6129
@brutal6129 4 года назад
He is a millionaire, and you?
@soup2600
@soup2600 4 года назад
@@brutal6129 Not a shit person lmao
@helix1016
@helix1016 4 года назад
Yandere Dev *Angry Noises*
@nihilsinedeonihilsinedeo3137
@nihilsinedeonihilsinedeo3137 4 года назад
*angry incel noises*
@najmaht.a.1314
@najmaht.a.1314 4 года назад
Today: 2019 Tomorrow: 2016
@timeforrick5413
@timeforrick5413 3 года назад
I wish
@Reilers
@Reilers 4 года назад
Are ya coding son? *ARE YA CODING SON???*
@TobiTheGreat
@TobiTheGreat 4 года назад
maybe
@thelightbrigadef4172
@thelightbrigadef4172 4 года назад
Yes I am dad. He banned my ass off the discord server when I wrote that words. It's hilarious XD
@Angel-hb3ro
@Angel-hb3ro 4 года назад
@@LurkingM1nt ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-TZ7t304R4Xg.html
@Guywiththetypewriter
@Guywiththetypewriter 4 года назад
You brain farted at 6:06 "if (x&&y)" does NOT take into account a situation where it is just x But "if (x)" takes into account both where it is x and where it is x && y.... So it should actually of been "if (x)" Thanks for coming to my TED talk
@ceablue8037
@ceablue8037 4 года назад
_audience claps_
@jp3354
@jp3354 4 года назад
You are both wrong
@oliverlindgren4447
@oliverlindgren4447 4 года назад
@@jp3354 no? If(x) would yield the same result as if(x || (x&&y)
@VORTEXXNEON
@VORTEXXNEON 4 года назад
I dont understand but i agree
@lomarix
@lomarix 4 года назад
I was looking for this observation
@ilonachan
@ilonachan 4 года назад
6:06 Actually that simplification is not right: the intuition is that OR'ing a statement with a smaller statement makes it "weaker" (true in more cases), but you kept the "stronger" of the two terms. What you meant to say was: If the first part (x) is already not true, the second part (x && y) is just impossible, so we can ignore it. The final simplification would have been just x.
@Torbeng
@Torbeng 2 года назад
Thank you, I was wondering…
@onlybobbylee9046
@onlybobbylee9046 2 года назад
Actually came to post this
@yoavmor9002
@yoavmor9002 Год назад
That's the consequences of bad code. People touching things up in it will make mistakes.
@xbzq
@xbzq Год назад
@@yoavmor9002 Actually, the "bad code" here was made up by the matter of this video and the teacher in this case is just stupid. But most people are so go ahead and follow this dude who clearly doesn't know what he's doing because he may just know more than you and if you follow him closely at least you won't be much more wrong than him, however much that may be.
@matheusaugustodasilvasanto3171
@@yoavmor9002 The right answer is to have a tool that programatically makes these simplifications for you. Avoid human mistakes!
@lozat414
@lozat414 5 лет назад
Thats crazy, I never knew that reversing the password was done often. I assumed they always used hashing methods..
@TobiTheGreat
@TobiTheGreat 5 лет назад
For the most part, passwords are responsibly protected. But there's always that one slipup....
@wchen2340
@wchen2340 9 месяцев назад
its an elegant workaround if your frameshitworklib doesnt support rot13 natively.
@fosterthecat6625
@fosterthecat6625 4 года назад
I have searched "are you coding son?" How fitting...
@fosterthecat6625
@fosterthecat6625 4 года назад
Thanks for the heart Toby
@stephenkamenar
@stephenkamenar 4 года назад
6:00 lmao i see you're an expert at bad code
@ChrisLuigiTails
@ChrisLuigiTails 4 года назад
6:07 - if (x || (x && y)) should be replaced with just if (x)
@tropical2153
@tropical2153 4 года назад
No because we wanna make sure y is true too which is a different variable
@ChrisLuigiTails
@ChrisLuigiTails 4 года назад
@@tropical2153 Truth table time! a = x and y b = x or (x and y) = x or a x | y || a | b 0 | 0 || 0 | 0 0 | 1 || 0 | 0 1 | 0 || 0 | 1 1 | 1 || 1 | 1 See? b always equals x. Therefore (x or (x and y)) = x.
@ChrisLuigiTails
@ChrisLuigiTails 4 года назад
@@tropical2153 Also, b = x or a means either x or a must be true for b to be true. 1. If x is true, b is true independently of a. 2. If x is false, then a must be true for b to be true. 3. But for a to be true, x must be true, and as we've seen in 1, it makes a useless.
@ChrisLuigiTails
@ChrisLuigiTails 4 года назад
@@tropical2153 Again, let's say I'll give you 10$ if you get me an apple, OR an apple and an orange. That means if you get me an apple you'll get 10$, you don't need to get me the orange.
@tropical2153
@tropical2153 4 года назад
@@ChrisLuigiTails didn't read
@Fegro963
@Fegro963 4 года назад
Indian company "Hello sir, I understand your pain, you call too soon we have to update the days" "What do you mean, updating day ?" "Sir, days are changing, when you go to bed, a new day happens and we have to make the change" "Are you saying your dates are static and you have to update codebase every day ?" "Its best practice sir"
@not_herobrine3752
@not_herobrine3752 3 года назад
this comment is the other reason why aliens skipped over the earth in search of intelligent lifeforms
@amymialee
@amymialee 4 года назад
wait but like If(x or (x and y) isn't the same as If(x and y) surely it'd just be If(x)
@ligulu
@ligulu 4 года назад
Im a little confused here At 6:05, the "wrong" version of the first case would return True even if only x was true, which wouldn't happen on the fixed version, But it would work as first mentioned if it was just if(x); because y doesnt seems to really matter, hope im not just being dumb here Also great vid
@TobiTheGreat
@TobiTheGreat 4 года назад
Thanks for watching up to that point! That case is a bit confusing actually. In trying to decipher what the original intent of the conditional is, it appears that the author (me lol) is trying to make sure that both x and y are true. In that case, having the (if x) part is redundant. What you’re saying makes sense though. You could think that the variable y doesn’t matter, with the way it was first written.
@ligulu
@ligulu 4 года назад
@@TobiTheGreat hmmm considering that original intent i understand it now lol thanks for explaining
@57dmario30
@57dmario30 4 года назад
I thought the same thing, cause the existence y didn’t matter in the original if lol. I guess it’s a practical warning on why you shouldn’t write needlessly complex statements because of there chance to confuse.
@redxxiv739
@redxxiv739 4 года назад
x || (x && y) => x Your right theres a mistake in the video
@nr2up
@nr2up 4 года назад
yup the absorption law!
@xwtek3505
@xwtek3505 4 года назад
problem: encrypt a password normal person: use bcrypt or the similar algorithm noob: use actual encryption algorithm another noob: use md5 or SHA this person: reverse the password.
@theshermantanker7043
@theshermantanker7043 3 года назад
I dare you to use the Russian encryption method from world war 2 that used pencil and paper
@FloatingSunfish
@FloatingSunfish 4 года назад
Kek, why is this showing up when you search for yanderedev?
@TobiTheGreat
@TobiTheGreat 4 года назад
🤷🏾‍♂️
@jaydeejay664
@jaydeejay664 5 лет назад
hi just wanted to let you know that my day is going pretty okay, hope yours is too
@wolfyx100
@wolfyx100 4 года назад
I like your pfp
@jaydeejay664
@jaydeejay664 4 года назад
thanks, idk how i feel about yours
@wolfyx100
@wolfyx100 4 года назад
@@jaydeejay664 lol
@TobiTheGreat
@TobiTheGreat 4 года назад
LMAOOOO
@YEWCHENGYINMoe
@YEWCHENGYINMoe Год назад
"There is no bad variable naming in asm, 2:45, because it's just a bunch of hex values" - me
@Disatiere
@Disatiere 3 года назад
if (x || (x&&y)) this means x is present OR x and Y are present, meaninging the correct simplification is if(x) since otherwise y is now required, it wasnt before.
@kimgkomg
@kimgkomg 4 года назад
I like how he says "that's a whole lot more simpler" instead of just "that's simpler"
@jeremygillespie5482
@jeremygillespie5482 4 года назад
For the first example, if today, is a boolean check against a date object. Another terrible part.
@itwasag.ijanejoke386
@itwasag.ijanejoke386 3 года назад
For, Today and tomorrow , the other problem is logic if (today) will always evaluate true
@baksoBoy
@baksoBoy 3 года назад
as a bonus, dont forget to breath, breathing is very important and you have to make sure that you do it constantly, it is very bad practice to not breathe since it can cause a multitude of problems, hope I was able to teach you something new!
@mrgreenboy644
@mrgreenboy644 2 года назад
I'm just starting on my path to a software-based career, and I've been looking for stuff like this to improve. Thank you!!
@sabishi2404
@sabishi2404 4 года назад
Yeah I was trying to get a random letter so I made a switch statement with a single letter for every case and used a random number to pick one
@TobiTheGreat
@TobiTheGreat 4 года назад
Hmmm, that’s definitely not a bad way to do it. But wouldn’t it be easier/more readable to store all the letters in a list variable, and randomly choose one of the indices? Python has a few built-in methods for this: alphabet = string.ascii_letters random_letter = random_choice(alphabet) Hope I got this one right lol
@sabishi2404
@sabishi2404 4 года назад
@@TobiTheGreat Well considering I was using c++ when I did that I probably would have made an array of the alphabet and with a random number chosen the specific letter from the array. Using a 26 case switch for it was a little overboard I think.
@cringeworthybears5500
@cringeworthybears5500 4 года назад
Use a random integer in the ASCII range you need and a char variable, and it will use the ASCII character that corresponds with the number you get from rand. No offense, but I thought you were trolling at first lol
@marcuspeixoto4871
@marcuspeixoto4871 4 года назад
*char letter = 'a' + rand() % 26;* like this?
@sabishi2404
@sabishi2404 4 года назад
@@marcuspeixoto4871That's probably the best way to do it
@AmadorDesigns
@AmadorDesigns 3 года назад
The first one the problem isn't only the date, it's the if statement. There is no condition.
@silviutm3448
@silviutm3448 4 года назад
I came here looking for mistakes I may do, but to my surprise I was already aware of all of them despite being an amateur coder. Nevertheless, nice video!
@analisamelojete1966
@analisamelojete1966 4 года назад
Thanks for this video. I got a new job and the person that was before me wrote code and used way to many loops with the conventions i, j, k. Bad variable naming is a pain in the ass.
@Minitomate
@Minitomate 4 года назад
You forgot to put a infinite loop with for or while in this video. This is one of the most pathetic errors I could've done and I'm still doing sometimes.
@loszhor
@loszhor 4 года назад
Well done, when people wonder about YandereDev's coding and they hear "Else Ifs" it's hard to explain it to normies in simple terms like this.
@stellarphantasmvfx5504
@stellarphantasmvfx5504 4 года назад
I searched "Are you coding, son?" And this shows up lol
@tartb0x811
@tartb0x811 4 года назад
You know what to me the worst lines of code ever is... "Else if"
@carlossegura403
@carlossegura403 4 года назад
2:20 If it is the first thing I see - I'll immediately close the file and virtually toss that shit in the garbage.
@SlyphYT
@SlyphYT 2 года назад
As a first year comp-sci student, this is actually very helpful as well as very entertaining!
@FusionDeveloper
@FusionDeveloper 4 года назад
The worst code I've ever heard about was someone using a variable name to represent the number it spells, "Seven = 7".
@adgVelaepyaety
@adgVelaepyaety 4 года назад
0:43 potential for another Else If nightmare.
@AlexPBenton
@AlexPBenton 2 года назад
The code: If (x || (x && y)) Is not the same as: If (x && y)) The first one has a truth table of: X | Y | Output 0 | 0 | 0 0 | 1 | 0 1 | 0 | 1 1 | 1 | 1 The other one has a truth table of: X | Y | Output 0 | 0 | 0 0 | 1 | 0 1 | 0 | 0 1 | 1 | 1 You should have written: If (x)
@elijahobviously1288
@elijahobviously1288 Год назад
Yeah I was just thinking that. And why does he get "tomorrow" dynamically lol? Tomorrow will literally never get called if it always equals today + 1.
@frindjinny6
@frindjinny6 4 года назад
Read through the code and every time you see an if statement you take a shot.
@menschderguckt
@menschderguckt 5 лет назад
I like the type of this video, but Im not sure what the audience of the content is?
@TobiTheGreat
@TobiTheGreat 5 лет назад
Thanks for watching! I just like making videos, for whoever wants to see them. Whether is about coding, basketball or whatever.
@menschderguckt
@menschderguckt 5 лет назад
@@TobiTheGreat yes, I know. Just following you for a few days but this video seems like a tutorial for absolute beginners. But keep going the good work!
@TobiTheGreat
@TobiTheGreat 5 лет назад
L C thanks again for the kind words, but you’d be surprised. All of the examples are taken from real codebases, written by “experienced engineers”. Sometimes people get slipped up with the fundamentals. Glad to know you’ve been following for a while, the next video will be even better!
@menschderguckt
@menschderguckt 5 лет назад
@@TobiTheGreat ok, that makes me sad :D. Great!
@101Rouge
@101Rouge 4 года назад
I never thought I'd find a worse encryption method than rot-13
@borisvassilev5185
@borisvassilev5185 4 года назад
let x = true; let y = false; x || (x && y) returns true x && y returns false yeah, that really fixes the problem....
@evam2351
@evam2351 4 года назад
Remember, even if your code works, there's probably a better way to do it.
@Jmcgee1125
@Jmcgee1125 4 года назад
5:58 correct me if I'm wrong (I do Java and C#, not JS) but... x || (x && y) does NOT equal x && y. The problem isn't redundancy, it's that y is made completely irrelevant because the value of x always takes precedence (If x is true, it shorts on the first or. If x is false, then x && y shorts and the whole thing fails (x || x, in effect). The value of y is irrelevant in either case). I get that you're trying to show that x && y is better than x || (x && y) (which it is, unless you really do just want to check for only x), but it's still an error. Considering this is aimed at programmers with less experience, this distinction is necessary.
@TobiTheGreat
@TobiTheGreat 4 года назад
Thanks for watching! And you’re definitely right there
@HayoTubes
@HayoTubes 4 года назад
The fact that youtube shows me a video about terrible coding because I saw a lot of Yandev videos is one big laugh to shoot.
@RupluttajaGames
@RupluttajaGames 4 года назад
I have a hard time imagining anybody to make these mistakes, just saying.
@loszhor
@loszhor 4 года назад
*YandereDev* Blows by in the wind.
@obikantv7887
@obikantv7887 2 года назад
Where would you ever write the code if(today){ } else if(tomorrow){ }? Today can never be tomorrow. The code in general viewed as an example makes no sense.
@elijahobviously1288
@elijahobviously1288 Год назад
and Dates don't evaluate to True or False lol they're just Date objects
@meep3043
@meep3043 4 года назад
This content is pretty chill, keep it up man. 👍
@TobiTheGreat
@TobiTheGreat 4 года назад
Thanks!
@xbzq
@xbzq Год назад
X || (x && y) is actually just x, not x && y. Very very bad teaching here. Actually teaching people to do it wrong.
@pangolinh
@pangolinh 4 года назад
if lag then() dont end (this was before i actually learned lua, i attempted to make a low detail mode for my game lol)
@angelalen1615
@angelalen1615 4 года назад
We did it boys, Lag is no more
@dreadheadedguardian
@dreadheadedguardian 4 года назад
Yandere Dev: "Write that down. Write that down."
@Kaelefoda
@Kaelefoda 4 года назад
2:12 The issue with you declaring those variables is that you skipped "n" from the alphabet. I know, beginner mistake, did it myself in the past.
@farenhite4329
@farenhite4329 4 года назад
I made the bad variable names mistake and it is very painful to deal with afterwards.
@TobiTheGreat
@TobiTheGreat 4 года назад
So painful 😔
@yoavmor9002
@yoavmor9002 Год назад
When studying engineering there are entire lectures on how to simply logic statements like those you showed with x, y, a, b and c. Can't blame Yandere dev for messing those up, the one with a, b abd c is kinda hard to notice imo unless you realize that it's a canonical SOP form that fills the entire 2x2 logic table short of one value, making the POS (canonical) form smaller
@jameslannister3743
@jameslannister3743 4 года назад
The worst code ever: if(conditionA == true) { return true; } else{ return false; } *return conditionA;
@DJ_AwesomeSauce
@DJ_AwesomeSauce 2 года назад
I thought the problem with the first example was that the "tomorrow" date was 2016 and not 2019.
@TheyCallMeIce
@TheyCallMeIce 3 года назад
3:22 Me reading the last item in the short note list: *nervous whistling in UserCount, CountUsers, NumOfUsers etc all in the same function*
@senadistik1208
@senadistik1208 4 года назад
This was recommended to me after I watched a video on Yandere Simulator code lol
@CarlosTrejo2309
@CarlosTrejo2309 4 года назад
In 6:10, you will need to change the code for only if ( x ) -> You are ultimately comparing if x is present or not, regardless of y
@frogfan449
@frogfan449 4 года назад
i think that one of the worst things to do is to put a bunch of logic statements where using a multi-dimensional array would be a lot faster
@hissingfaunaa
@hissingfaunaa 4 года назад
2:29 you skipped n, i win
@dracenmarx
@dracenmarx 4 года назад
"If today" makes no sense at all, since a date object is not a boolean...
@gdjosef
@gdjosef 4 года назад
okay So, storytime. I'm learning C# because a lot of programs use it and I decided to take THE WORST CRASH COURSE. I was writing the practice code and it would NOT WORK. You know why? THEY DIDN'T TELL ME TO PUT SEMICOLONS.
@TobiTheGreat
@TobiTheGreat 4 года назад
😢 I feel u
@upgrade_levels
@upgrade_levels 4 года назад
0:17 me yelling at my PS4 in response to a broken HDMI port
@TobiTheGreat
@TobiTheGreat 4 года назад
I STILL DON'T KNOW WHAT WAS WRONG WITH IT
@upgrade_levels
@upgrade_levels 4 года назад
As an avid PS4 user; I feel your pain.
@upgrade_levels
@upgrade_levels 4 года назад
Update: the PS4 has been dropped off for repairs and should be up and running within a week!
@kane5645
@kane5645 3 года назад
Before I took a programming course, I had no clue what I was watching. But now, it all seems like common knowledge.
@vieilatome2257
@vieilatome2257 2 года назад
For me, in the EncryptPassword, the real issue is that we could just type reversed("kayak") and it would be shorter than EncryptPassword("kayak") That's one function for nothing :(
@jpjaye
@jpjaye 4 года назад
I tend to name variables letters which is not good but I only do that to test something out really quick
@Hodebrot
@Hodebrot 4 года назад
Can you spot the issue? Yes, you‘re right. There‘s a typo in the syntax... That‘s how this video feels to me...
@koromarudademmonodoggo7171
@koromarudademmonodoggo7171 4 года назад
in 10,000 lines of code, you still cant code. and have ended up not only failed to execute your edits as instantiating a function return is Invalid, but also breaking code by removing a functional case from multiple if statements. i hope to dear god for everyones sanity. you NEVER get hired into a project until you CAN ACTUALLY be productive.
@TobiTheGreat
@TobiTheGreat 4 года назад
Did you comment on the wrong video? I don’t really understand the context of your comments here. Also, you don’t need to critique me on multiple accounts to get my attention 😉
@koromarudademmonodoggo7171
@koromarudademmonodoggo7171 4 года назад
@@TobiTheGreat you "fixes/solutions" in quite a few cases outright broke the code leaving it unable to be ran or removing valid functionality from the code. in short breaking it further. you didn't end up fixing it you ended up making it worse.
@multistuff9831
@multistuff9831 4 года назад
Oh boy today i will make a game that checks the position of clothes and hair on each character model every single frame making he game run at dogshit speed
@vadiks20032
@vadiks20032 4 года назад
i mean thats kinda genious idea. you know, i'd also add the check of the color, the check of the each body verticle and the check of the background just in case and put wait(5); on every line
@chriswysocki8816
@chriswysocki8816 2 года назад
i think the video contains an error. The condition (x && y) example reduces to something different than what is presented. In fact it reduces to (x)
@HaveiorLP
@HaveiorLP 4 года назад
Sleep is not bad design. It's literally good to call if the thread has nothing more to do. It gives processing time to antoher process. Sometimes u just need to wait for example in multithreading or networking for a operation to finish.
@edward9487
@edward9487 4 года назад
Thank you, kid. This should help me understand simple problems with code that people keep making. If only redundancy wasn't so huge...
@wauwaukleff
@wauwaukleff 3 года назад
Actually in the first example the wrong dates are the least of worry. As "Date" will always evaluate to true, it will always run the "today"-block no matter what the date and the "tomorrow"-block is unreachable code.
@koenderbb5191
@koenderbb5191 4 года назад
There's a lot more wrong with the first example: (1) 'today' is in 2019 and 'tomorrow' is in 2016 (2) The date objects aren't being compared to anything (3) (After fix) The present is always today. You COULD wait for it to become a day later, because the dates never get updated, but that would mean the variables' identifiers don't really say what they mean, which is just bad practice
@TobiTheGreat
@TobiTheGreat 4 года назад
You’re right, i designed the example incorrectly 1 and 2. When I first made this video last year, I was just looking for an easier way to describe the main issue (setting the current day to a constant value). This was definitely not correct. For your third point, that was partly the point of the example. You can’t have a “Worst Lines of Code” video without some bad code!
@itsvollx9684
@itsvollx9684 2 года назад
Tomorrow is Now +1 to Date
@DaVultCave
@DaVultCave 4 года назад
Pretty sure the else block in the first example wouldn’t run at all. It’s simply checking that the ‘today’ var isn’t falsely as opposed to checking whether the current date equals some constant.
@orenong
@orenong 4 года назад
6:03 nooooooooooooo!!! it's not the same!!!!!!
@beyondhaircraze4418
@beyondhaircraze4418 4 года назад
If today == sunday.... *SELF DESTRUCT*
@SeanAlunni
@SeanAlunni 4 года назад
At the minute 6:03 the "behaviour" of the "wrong" if is not the same as the "right" one, it would be if the first if was "if (x *&&* (x && y)) -> ?". In the case presented by the video the if could have been simplified writing "if (x) -> ?".
@IamusTheFox
@IamusTheFox 4 года назад
1) not sure what this has to do with my search history. 2) those, while not great, not the worse. 3) I think the worse is out of bounds indexing, and careless for loops
@d3foko
@d3foko 4 года назад
If(1) Else If (2) Else If (3) Else If (4) Else If (5) Can You See a problem?
@Truly4alexx
@Truly4alexx 3 года назад
Tbh. I feel like having spaghetti noodles codes. Will make pc horrible. You know what I mean I feel like all pc won’t handle high quality stuff in yandere simulator
@100xstacks9
@100xstacks9 4 года назад
Seeing the var part remember my self scrolling up codes just to check "wtf did i name that var again?"
@ryanblake2978
@ryanblake2978 3 года назад
3:20 you could also add comments to your work to make it easier to identify those variables but i don’t recommend putting that many
@catkook543
@catkook543 4 года назад
5:21 Wrote a bit of code that infintly counts up. The sleep function was useful for that to allow it to count slowly enough for a human to read the numbers :P
@mat8791
@mat8791 4 года назад
2:16 You're missing an n that's the problem.
@shiba2ndworlder
@shiba2ndworlder 3 года назад
"The past is tomorrow"
@official-obama
@official-obama 2 года назад
complaints: you’re treating the date as a boolean, we will not travel to 2016 tomorrow, skipped variable n, should instead sleep for 60 instead of looping
@EstelonAgarwaen
@EstelonAgarwaen 4 года назад
at 6:10 or something: (x || (x && y)) actually resolves to just x, because if x is true, the statement is true, regardless of the value of y
@oancemr
@oancemr 3 года назад
6:23 If I find that code in an pull request, I'm gonna commit homicide
@stinkygot2387
@stinkygot2387 4 года назад
Y’all don’t worry about the people who claim Yandere Dev is a millionaire. His net worth is 330k. (I’ve estimated it to be lower considering his lack of monetization, but I thought I’d highball it for arguments sake. The national median, (skewed to count out the 1%) including projected homeless and immigrants is about 100k. It seems impressive until you realize he lives in Cali, which is way hyper inflated in comparison to the average us citizen. The median cost of a suburban home in Cali is about 440k. He’s performing pretty mediocre for someone who has such a large patreon, following, and overall notoriety. I was gonna compare him to other RU-vidrs, but he’s not a regular uploader, and again, he’s not monetized 90% of the time so I think it’s a silly point. He makes about 2k a month, but it’s not solid as his Patreon fluctuates regularly. Currently his monthly donations stand at 1.8k. His primary source of income nets him nearly 24k a year. Less then the average minimum wage worker in Cali, which sits at 27k. Now the hard part: His twitch. He streams pretty frequently, but recently his following is on a decline, hitting about 19k viewers this past month, which is honestly not very impressive considering his follower count of over 40k. Nick Merks has about 45k active subs and about 3 million subs. If we scale this with five other high grossing streamers and two other streamers, and follow the logic that two hundred and fifty dollars are applied for every one hundred subs then yandere dev, makes by my calculations, at most maybe around 18k on twitch every six months. This is EXTREMELY generous since I rounded him by the same standard as GIANT streamers. So let’s assume that he makes 36k from twitch every year, and 24k from patreon, and throw in an extra 2k for twitch donations, financial aid, loans, etc. and we hit a gross income of 62k. After taxes, he takes home 42k a year if we high ball the hell out of him, a great deal less then the median salary in California, 63k, and WAY LESS then the mean salary of 91k. In conclusion, Yandere dev is a below average earner, and fanboys can suck my balls. Sources: lao.ca.gov/reports/2015/finance/housing-costs/housing-costs.aspx www.marketwatch.com/story/whats-your-net-worth-and-how-do-you-compare-to-others-2018-09-24 www.financialsamurai.com/the-average-net-worth-by-age-for-the-upper-middle-class/ statsmash.com/calculator/yandere-dev-net-worth www.minimum-wage.org/california#faq www.patreon.com/YandereDev#no_universal_links socialblade.com/twitch/user/yanderedev twitchtracker.com/yanderedev smartasset.com/retirement/average-salary-in-california www.ziprecruiter.com/Salaries/How-Much-Does-an-Average-Make-a-Year--in-California wwe.commonfuckingsenseyou/retardfanboys/Your-God-Is-Poor
@cristianjuarez1086
@cristianjuarez1086 3 года назад
1:10 you mean that "tomorrow" was back in 2016????
@jacktheinklerboy
@jacktheinklerboy 4 года назад
Me: Founds this video Me in my head: Alex
@smokkinzone
@smokkinzone 4 года назад
That moment when you use "if" and "else" in you're code line.
@naftalinas8575
@naftalinas8575 4 года назад
*I didn't even know I could learn game codes with 13 by only watching a RU-vid video* lol
@deveshp9998
@deveshp9998 4 года назад
the irony is that a tech giant like Facebook actually stored like millions of user passwords in plain text
@404NameN0tFound
@404NameN0tFound 2 года назад
Tobi, wouldn't (x || (x&&y)) return true and (x&&y) return false in the case of x=true y=false?
@atlasxatlas
@atlasxatlas Месяц назад
Your boolean algebra doesn't work out. The first one is simplified to just if(x). The second one you did correctly.
Далее
Is Computer Science still worth it?
20:08
Просмотров 323 тыс.
When Optimisations Work, But for the Wrong Reasons
22:19
С какого года вы со мной?
00:13
Просмотров 100 тыс.
Stop Recommending Clean Code
27:05
Просмотров 491 тыс.
Code Crime: Yandere Dev
14:00
Просмотров 186 тыс.
Why You Shouldn't Nest Your Code
8:30
Просмотров 2,7 млн
Undertale is a horribly made game
10:32
Просмотров 584 тыс.
When you Accidentally Compromise every CPU on Earth
15:59
If Programming Was An Anime
3:26
Просмотров 10 млн
How to STUDY so FAST that it feels ILLEGAL😳
7:21
Просмотров 1,1 млн