67
OmerFlame
11d

I'm so fucking done with all those "woke" YouTube programming tutorials like: "Why you should NEVER use else statements", "Why functions should ALWAYS return a value", "Why switch statements are actually EVIL" and stuff like this
I swear to fucking god

Comments
  • 30
    I hate those "Why language X is better then Y" or "Programming language tier list" videos where the dude compares languages made for completely different purposes, like JS and C. There's absolutely zero value in these sorts of comparisons, it just makes people more stupid than they were before watching the video.
  • 21
    I also hate clickbait videos like "Why is language X DEAD", "This new thing will revolutionize the web", "If you use X you suck, use Y instead". I never click those videos, even if the content is good (which is rarely the case). I just hate giving views to people who do clickbait.
  • 9
    I like stoking the flames of language wars. But it is all in jest. I wonder how many of these videos are inside jokes.
  • 7
    Mate, you're searching for stuff on YouTube and expecting it to *not* just be clickbait crap?!
  • 7
    @AlmondSauce I mean, there’s a lot of good content which is not clickbait on YouTube, but I kinda figured out over the years what IS clickbait and what isn’t.
  • 4
    Just wait for things about js crap, angular here, react there, vue this, svelte that.

    buzzwords collectors
  • 4
    I watched one a few months ago titled "Top 5 languages you should learn in 2021" and the dude literally just searched google trends for languages off the top of his head.
  • 7
    @neeno The webassembly hawks really drive me up a wall. "wasm will kill JavaScript!"

    No it fucking won't.

    At most wasm will provide a better way to run other languages in the browser, but no one's writing a UI on C++ or something else. JavaScript will be forever king of browser languages, because that's it's designed job.

    wasm has its purposes, javascript has it's purposes, neither's going to kill the other.
  • 5
    Nothing wrong with:

    IF a = 1 THEN GOTO PROCEDURE 1

    IF a = 2 THEN GOTO PROCEDURE 2

    IF a = 3 THEN GOTO PROCEDURE 3

    IF a = 4 THEN GOTO PROCEDURE 4

    IF a = 5 THEN GOTO PROCEDURE 5

    IF a = 6 THEN GOTO PROCEDURE 6

    IF a = 7 THEN GOTO PROCEDURE 7

    IF a = 8 THEN GOTO PROCEDURE 8

    IF a = 9 THEN GOTO PROCEDURE 9

    GOTO PROCEDURE 10
  • 8
    In general it seems there’s now a huge market for incorrect beginner level CS information that gets amplified and spread by people too green to realize what’s happening. Related: can we talk about those medium articles that start with a 10 page introduction about someone’s emotional relationship to bug that could easily be a 3 sentence SO post?
  • 2
    Functions should always return values?? Wonder if he ever heard of a thing called a “setter”? No “else”, else is evil? Ok what should we do instead when the other conditions in the if and else if’s fail? else if(true) ? Lol
  • 2
    @neeno As far as the tier list goes, I don't know what video you're talking about but it sounds like it could actually be great as a joke, and not to be taken seriously.
  • 2
    Reminds me of when I started with DBaseII, it had no GOTO command !

    What, everything had to be in loops !

    Totally weird man !
  • 5
    @TeachMeCode

    The idea is that you completely avoid else, and only use early returns. If you find it difficult to avoid else and use an early return, the function is probably doing too much.

    https://dev.to/jpswade/...

    My opinion: It's a very good rule to follow, in MOST cases. There are however exceptions, where neither an early return, ternary nor pattern match can be elegantly used.
  • 4
    @TeachMeCode To be fair setter and getter methods are not exactly the pinnacle of programming concepts. Usually they're as useful as a NullPointerException.

    When you need an IDE's code generator to feel productive that's a pretty good sign of stupid design.

    Either way blindly following rules about coding style isn't the best idea.
  • 2
    Functions are always returning something though.
    If they don't, they are called procedures.
  • 2
    @Oktokolo If you look closely every function is a procedure in the lower levels, so who cares.
  • 0
    @deadlyRants
    There is no level below the lowest level having tail call optimization.
  • 2
    I barely remember, but I think there is a MISRA rule that enforces to always have an else. Guess it is meant to tell the programmer that there is "always" a case where the if-statement fails and that needs to be handled or at least ignored explicitly.
    I generally like the idea of early return, but that gets a bit hectic on nested statements in my opinion.
  • 2
    @Demolishun It's all fun and games when you know some of it are inside jokes between devs. Then a clueless manager sees the video and comes up "we need to rewrite the whole project from X to Y" and although you will know it's a pure bullshit which makes no sense, you'll be labeled as backwards idiot refusing "the progress".
  • 2
    @foox exactly, and how do we know when we should early return? How do we know at the beginning of the function without going through the if and else if’s that none of the conditions evaluated by them will be true without complicating things? If it’s meant to replace the else, the only way we can do this is to write a massive if statement that says if !condition1&&!condition2...etc which would be super terrible.
  • 2
    @TeachMeCode yes, think the early return is better suitable for checking the return value of a function on highest level. Then it's easy to follow the functions flow. And doing so you probably avoid nests more easily in the first place. But still, always depends.
  • 1
    What's that got to do with woke?
  • 3
    @AlmondSauce There are a couple good ones actually: The Cherno (C++), Jacob Sorber (C / Unix), Creel (General Low Level)

    I mean yes, heaps is crap, maybe we should have a list here at some rant where ppl can fav it and contribute on good stuff.
  • 2
    Fucking amen.
  • 1
    @Oktokolo I know in JavaScript functions that don’t return anything technically return “undefined.” I know there are a number of languages that behave like this. I think Python functions return “None” but I’d have to double check.
Add Comment