Object Oriented vs Functional Programming with TypeScript

Поделиться
HTML-код
  • Опубликовано: 27 сен 2024
  • НаукаНаука

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

  • @TheFeriner
    @TheFeriner 3 года назад +847

    Ironic naming when SuperHuman is a subclass of Human and Human is its superclass lol

    • @TheVanuPhantom
      @TheVanuPhantom 3 года назад +72

      Save me, Superclass!
      I will, though I don't have a method to handle lasers.
      _Gets vaporized by a laser._

    • @charliebrewer1668
      @charliebrewer1668 3 года назад +3

      @@TheVanuPhantom 😂

    • @alexismandelias
      @alexismandelias 3 года назад +7

      Not really

    • @amiine90
      @amiine90 2 года назад +5

      A SuperHuman is basically a Human who finished his studies 🤣😂

    • @zzzzzz1039
      @zzzzzz1039 2 года назад +5

      It makes sense if you think of clasess as sets.

  • @Fireship
    @Fireship  5 лет назад +428

    🚨 Warning 🚨. This video makes an attempt at sarcasm in the first 60 seconds. Watch the chat replay above for the full experience

    • @Microphunktv-jb3kj
      @Microphunktv-jb3kj 5 лет назад +1

      If anyone interested i found this interesting video about Object Oriented Programming and why it's bad -> ruclips.net/video/QM1iUe6IofM/видео.html

    • @TheDeathMongrel
      @TheDeathMongrel 5 лет назад +20

      Actually the guy who created GIF says it's pronounced "JIF" and the sound comes from GEE the letter, not what it stands for, Graphics. This will be a never-ending argument... to-may-to, to-mah-to.. :)

    • @nikhilshankar4190
      @nikhilshankar4190 5 лет назад +5

      dude do you really have to use so many emojis ? are you gen z?

    • @braindeveloperdimensional5579
      @braindeveloperdimensional5579 4 года назад +15

      @@nikhilshankar4190 why do you have a problem? We are gen Z and we love it. If it wasn't for the emojis then I might not have subscribed.

    • @Guiguiandange
      @Guiguiandange 4 года назад +5

      @@TheDeathMongrel yiff

  • @osmankirpat
    @osmankirpat 5 лет назад +933

    I love how you talk fast enough so that I don't have to set the speed to 1.25.

    • @khaki32
      @khaki32 5 лет назад +50

      Or too fast so that you'll need to set the speed to 0.75.

    • @oleksiikryvtsov6938
      @oleksiikryvtsov6938 5 лет назад +36

      It is not about 'speaking fast' it is all about 'already prepared pieces of code' which create such an effect

    • @skullteria
      @skullteria 4 года назад +4

      I still have him at 1.5x

    • @Tiddle_s
      @Tiddle_s 4 года назад +14

      1.25x?? 2x and waiting for RUclips to let me go faster!

    • @marisouza5060
      @marisouza5060 4 года назад

      Gg

  • @idedary
    @idedary 2 года назад +84

    This mostly depends on what you are doing right now. OOP is better for making closed complex systems and FP is better for universal multipurpose code. From my experience It's best to mix them, I believe it works very nice combined.

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

      @@prajjwalsharma. OOP for wrappers, FP for everything else. If your functions have the same prefix, it might be a good idea to make them methods on object instead

  • @jonatangall3715
    @jonatangall3715 4 года назад +73

    The metaphor about the sandwich and the hotdog was brilhant! You guys are Genius, I love this channel, thanks a lot for share it!

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

      In the compositional world, it does not matter whether a hotdog is a sandwich. You can hold it and eat it like a sandwich, and that is good enough :)

  • @JonathanCGroberg
    @JonathanCGroberg 5 лет назад +252

    There is always going to be a bunch of ways to solve a problem, but CERTAIN programming paradigms are better for CERTAIN problems. It's not really a gif jif thing, its more of a use the best case solution for your problem.

    • @Fireship
      @Fireship  5 лет назад +84

      I agree 100% - the bigger point was that this stuff is not religious dogma. Basically every js project I've been involved in uses some combination of these paradigms.

    • @hashtagPoundsign
      @hashtagPoundsign 2 года назад +2

      @@Fireship Exactly. As for the other questions: I use pronunciation gif, and a hotdog is a taco.

    • @viniciusataidedealbuquerqu2837
      @viniciusataidedealbuquerqu2837 2 года назад

      I think OO pretty much solidified the backend and functional the front

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

      That's exactly what this video said. But thanks for the summary I guess

  • @DEVDerr
    @DEVDerr 5 лет назад +184

    Holy shit. That's really well-composed episode. Congrats man and goodluck in 2019!

    • @miszczklasykuw3025
      @miszczklasykuw3025 5 лет назад

      lul, widzialem cie tez pod romanem

    • @yamiteru4376
      @yamiteru4376 4 года назад +4

      Or is it a well-inherited video... hmmm?

    • @misterrodger
      @misterrodger 4 года назад +2

      It's quite functional too, objectively speaking.

    • @Electricity0
      @Electricity0 3 года назад +2

      @@misterrodger I extend your opinion

    • @sukhmandersingh4306
      @sukhmandersingh4306 3 года назад

      This thread is in a class of its own

  • @kevingarubba1370
    @kevingarubba1370 3 года назад +3

    I like how you took something trivial like the hotdog question and wrapped it in with the theme and made it relevant.

  • @PeepingOtterBot
    @PeepingOtterBot 5 лет назад +9

    It took me almost a hour and a half to get through this while rubber ducking the ideas and taking notes to make sure I take everything in, but it made everything super understandable. Thank you!

  • @ferinzz
    @ferinzz 4 года назад +18

    Can't wait until I can actually understand most of what just happened here. A few more weeks hopefully.

  • @arcane3327
    @arcane3327 2 года назад +1

    Thank you so friggin much. I just wanted to pick up typescript and i found your channel. Now i have a broad idea on how typescript works and i finally understood how the idea of Interfaces actually work out. Kudos! :)

  • @va9if
    @va9if 3 года назад +1

    *looked video's caption*: ok
    *looked video's preview*: wtf about GIFs ?

  • @cfmvalizan7585
    @cfmvalizan7585 4 года назад +4

    1) i believe this was answered in a different video, but you can make functions private and protected in a class, correct? i don’t recall seeing that in this one.
    2) how are you making it auto fill your return statement? that would be such a time saver!
    3) nested classes get tricky in any language. The deepest i’ve gone and think i’d ever go is a sub class of a sub class of a class.

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

      1. yes.
      2. its edited not auto filling

  • @21coltsrox
    @21coltsrox 4 года назад +65

    What plugin is installed on your ide that's printing the blue results

    • @SiddiqNx
      @SiddiqNx 4 года назад +37

      It's called Quokka.js

    • @whoman7930
      @whoman7930 4 года назад +1

      @@SiddiqNx Thanks so much buddy!

    • @weiiswurst
      @weiiswurst 3 года назад +1

      @@SiddiqNx Thanks!

    • @magne6049
      @magne6049 3 года назад +7

      WallabyJS, from the same guys, also blew my mind: wallabyjs.com, it "runs your JavaScript and TypeScript tests immediately as you type, highlighting results in your IDE right next to your code."

    • @anothermouth7077
      @anothermouth7077 3 года назад +1

      And for emoji it's plugin named Emoji, it's not useful but it's kinda fun

  • @stephane4487
    @stephane4487 2 года назад +1

    3 years old vid that is still spot on and very informative. Thanks! 👌

    • @chris94kennedy
      @chris94kennedy 2 года назад +1

      just saying, if the video is accurate on day 1 why would it be less accurate after 3 years

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

    I've only ever used OOP with languages like C++ and Python so the functional programming way of doing things was quite interesting to see. I'll have to try some F# code and make some simple stuff to try it out.

  • @SaifUlIslam-db1nu
    @SaifUlIslam-db1nu 5 лет назад +1

    "... and if there is one thing that companies hate, is that they hate creative programming solving solutions by their programmers... " and then I read your comment below. Thank goodness.

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

    Nice but you've got Composition vs Inheritance convoluted yourself. You're right that, they are not a choice for example a Tshirt vs Trouser where in upper body scenario you'd apply T-shirt and for lower body a trousers. But then when you go on to say that composition is another way for reusability, one could get an idea that it might be used interchangeably with inheritance which is not right. On the contrary, there might be scenarios where you'd need both.
    Here's an example for inheritance; Shark and Dolphin can be inherited from a base class of Fish.
    For composition, we can make a Fish class by composing it from a Fin and a Gill class in addition to it being inherited from Animal class.

  • @LOL-hc5fv
    @LOL-hc5fv 4 года назад +2

    functional programming in js is hard because map (for example) is often not enough to actually create a new object if each element is array or object as well, it simply references the old objects instead of creating new ones - works well with strings/bool/numbers that link by value. the deep copy via json.parse(json.stringify adds a lot of overhead computation that I've had to mutate state and just be careful not to reference old state

    • @chris94kennedy
      @chris94kennedy 2 года назад

      does deep copy via lodash methods add less computational overhead. And does it count as antipattern or bad practice to mutate state values ?

    • @AveN7ers
      @AveN7ers 2 года назад

      items.map(elem => ({...elem})).
      Don't know about the performance though

  • @slapmyfunkybass
    @slapmyfunkybass 5 лет назад +343

    What’s better, oop or procedural?
    Answer: yes

    • @Microphunktv-jb3kj
      @Microphunktv-jb3kj 4 года назад +6

      better : the way it gets the job done

    • @Limpuls
      @Limpuls 4 года назад +12

      You use both. Inside you classes you write methods that does procedural stuff.

    • @ml_serenity
      @ml_serenity 4 года назад +24

      @@Limpuls What are you referring to is "imperitive" programming. OOP and procedural programming are not the same. They both are imperitive (mostly), but no, they're not the same. Just because you're writing functions doesn't mean it's a procedural or functional programming. There are certain traits specific to functional (like pure functions only, very declarative approach etc) and to the procedural (modules, procedures/functions, side-effects allowed, structure is purely imperitive). Each of us in our day to day work uses some parts of imperitive and functional programming to some degree and very few of us actually doing pure functional (Haskell etc) or pure procedural (well, pure procedural is nearly non-existent nowadays... like COBOL for example). The most commonly used nowadays is OOP imperitive programming with some functional programming on top of it to make life easier. Pure functional is VERY hard to do properly, believe me...

    • @bestintentions6089
      @bestintentions6089 4 года назад

      Procedures have side effects functions do not

    • @VictorMartinez-zf6dt
      @VictorMartinez-zf6dt 4 года назад +5

      functional programming is not procedural programming

  • @uncleiroh6728
    @uncleiroh6728 3 года назад +4

    Ideally you use both functional and object oriented programming.
    Over the years, I have found function closures to work better for me than classes, as the 'this' keyword is just complete garbage in javascript. Of course this may be different for typescript but as of right now I do not have the time to refactor my thousands of lines of code to typescript, maybe something for in the future, but not for now.

  • @davidtheprogrammer
    @davidtheprogrammer 5 лет назад +19

    The sarcasm at the beginning though lol.

  • @JimSmith-u5g
    @JimSmith-u5g Год назад

    Thank you for being so clear and easy to understand programming it’s a great series tutorials that you have I don’t watch anyone else anymore

  • @damarjati693
    @damarjati693 5 лет назад +27

    What vscode extension for the console.log result appear on the side of the code?
    And the error too apparently

  • @MrAbrazildo
    @MrAbrazildo 2 года назад

    1:40, I know it's meant for didactic purposes, but it was a pointless f().
    6:55, it encapsulated the logic of how it works, but it should also encapsulate the variable changing itself! If everybody can change the var, it's prone to bugs, if the project gets complex or large. 'change' should not be public too.
    C++ has the 'friend' keyword, which says what f()s can change everything in the class. Whenever a bug occurs, you have the list of all suspects. This is key for code safety.

  • @norbqcd
    @norbqcd 4 года назад +1

    You can compare procedural and functional programming, but OOP is a higher abstraction level. If you compare functional with OOP is like you'd compare a leather seat with a car. Like inside the car the seat can be leather or other type, you can write procedural or functional code inside a class.

    • @Eagle3302PL
      @Eagle3302PL 3 года назад +1

      Thank you commenter from the past, that's what I was thinking but couldn't put into words.

  • @juancamilosepulveda
    @juancamilosepulveda 2 года назад +5

    Nice video! What VSCode extension are you using to get the console log output in the editor?? :)

  • @CunningBard
    @CunningBard 2 года назад +2

    People debating about OOP and Functional Programming
    mean while python is oop and functional

  • @HelloFromNick
    @HelloFromNick 5 лет назад +6

    First of all I want to thank you for your awesome work! Do you plan to release any Machine learning content any time soon? You are a great teacher and Machine learning lacks good tutorials and resources.

  • @davidmikan7925
    @davidmikan7925 3 года назад

    wow wow wow wow, this 12 minute video helped me (coming from python) understand the core ideas of javascript better than the last 2 weeks of studying did, what the hell?!

  • @mohamedkassoum1822
    @mohamedkassoum1822 2 года назад

    I subscribed during the intro because I found the way you introduce the ideas both brilliant and funny

  • @rebelmachine88
    @rebelmachine88 5 лет назад +3

    Extremely clear explanation, awesome job!

  • @sonoftroy8572
    @sonoftroy8572 5 лет назад +27

    I like that you communicate the content in a language based communication, but for beginners they won’t be able to follow so easily... other than that great work and thanks for the content

  • @DouglasNeves
    @DouglasNeves 2 года назад

    If you're writing code and think "a class will serve well here", you're writing code the wrong way :D

  • @CristalCody
    @CristalCody 4 года назад +3

    This confuses me...
    There are design patterns and principles in OOP that try to achieve the same that functional programming achieves.
    # No mutations - avoid mutating objects, clone them if necessary.
    # Dependency Inversion - Do not resolve dependency manually and let it be injected/provided - meaning that function/method becomes pure in a sense that it only operates with what you are providing.
    I get more confused when in video functional programming is presented as completely different thing but it still uses objects and from quick glance it's completely indistinguishable from OOP....
    So where's the difference in OOP and functional programming when in some scenarios both are the same? What are the distinguishable traits that will let me tell them apart?

    • @luizAugustoll
      @luizAugustoll 2 года назад +1

      It's more about the complexity to build something that is more functional in OO way of doing. The reason you need some extra steps to achieve the same goal, and it's not enforced by the language. But functional programming has the same problems, it's implemented at top level of imperative and state management, but abstracts that into the builtin modules, to you just code as mathematical as possible. The problem occurs when you don't have a module for that.

  • @iPepper_
    @iPepper_ 3 года назад +2

    Omg I am so addicted to your videos!! Even tho I don't understand 100% of it but you explain it so well it does not matter that I dont understand it :)

  • @Omniwoof
    @Omniwoof 5 лет назад +4

    I chuckled at the intro.

    • @Fireship
      @Fireship  5 лет назад +4

      That's good, I was worried people would not get my dry sense of humor

  • @TheKamieniu
    @TheKamieniu 5 лет назад +82

    What is the plugin for vscode to run console log with result ?

    • @Fireship
      @Fireship  5 лет назад +69

      quokkajs.com/docs/index.html

    • @WesleyOverdijk
      @WesleyOverdijk 5 лет назад +6

      Theres also wallaby which is less playground (snippet) based. Same creator I think.

    • @ZpeedTube
      @ZpeedTube 4 года назад +1

      Oh I just thought he did type it or copy paste it manually.. 😅 Awesome plugin!

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

    The advantage of the functional cake is that when you’ve finished making the cake, you still have all the ingredients. The advantage of the OO cake is that you can digest it.

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

    Why is this video so good 💚 and why are the answers to all of the opening questions just "both".

  • @ahmadali-yf6mb
    @ahmadali-yf6mb Год назад

    man your videos like fast food.. but one additional thing they are very healthy

  • @christopherwatts2499
    @christopherwatts2499 3 года назад +4

    This was a great explanation. What would be cool is if you could do an update to this but use decorators instead of the mixin function. Probably a little more advance but would be a great step into using decorators

  • @lightspeed001
    @lightspeed001 5 лет назад +8

    Great vid again, what's the intro track called?

  • @idtyu
    @idtyu 5 лет назад +5

    Composition is well implemented in php using trait... It's so awesome

    • @AlanBem
      @AlanBem 5 лет назад +5

      Junhai Yang traits are just glorified copy-paste in PHP - nothing more. Composition is something different, to be honest that this video failed to explain,.

  • @ary4051
    @ary4051 4 года назад +1

    Thank you, I wish I saw this video 5 years ago.

  • @BigPapaMitchell
    @BigPapaMitchell 5 лет назад +1

    No one ever seems to talk about the one drawback to composition, in that it weakens your type system and allows the language and tooling to do a lot less work for you. When possible I prefer to use as many interfaces as possible over composition.

    • @leonk6950
      @leonk6950 5 лет назад +3

      Check languages like Haskell. There is a lot of composition, and the types are brilliant. Typescript really just isn't that good of a system

  • @MistaSmith
    @MistaSmith 2 года назад

    Pretty sure a hot dog is also a sandwich with composition, because of duck testing. It still has bread and sausage, it's still unhealthy but easy to make, and you're still hungry afterwards but will eat it again next time anyway.

  • @StefanTravis
    @StefanTravis 5 лет назад +23

    Procedural: Easy to understand and do. Messy result.
    Functional: Harder to understand and do. Neater result.
    OOP: Once you internalise an enormous pile of impenetrable jargon, you can start to recast procedures and functions into bizarre forms. The result is elegant, and utterly baffling to the non-specialist.

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

    will composition like this be natively available on JS or TS without that ugly boilerplate anytime soon?
    Great video :D

  • @sourishdutta9600
    @sourishdutta9600 5 лет назад +4

    WOW!!!! Do more videos on js like patterns and please share some link regarding this topics that you discuss, where we will get deep knowledge. Thank you so much. 😊

  • @utkarshkukreti239
    @utkarshkukreti239 3 года назад

    Hotdog is a bun in typescript mixins class implements

  • @feritperliare2890
    @feritperliare2890 3 года назад +3

    I'm experiencing a weird feeling as I've yet to work with JS so I understand and don't understand stuff cause a lot of it is the basics of other languages I did learn and some is completely out of left field for me sometimes

  • @hinerron
    @hinerron 3 года назад +1

    Wooooowwwww......
    I loved this. Thank you so much for the great content! I'm a noob programmer so I had to pause this shit like 20 times to keep up, but I prefer that to the alternative.

  • @Lord_zeel
    @Lord_zeel 2 года назад +1

    It's really not that complicated: A "hot dog" isn't a sandwich, it's a type of sausage. A hot dog *on a bun* is a "hotdog sandwich." The same is true for a hamburger, technically the meat itself is the hamburger which is not a sandwich by itself, but if you put it on a bun it is. The hotdog sandwich is not a subclass of sandwich - this isn't an "is a" relationship, it's a "has a" relationship. The hotdog is the topping on the the sandwich. Sandwich.topping == hotdog.

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

    The irony here is that some of these concepts could be a bit difficult to understand at first but the one FACT in this video that still brings people to a complete standstill is, It's GIF, not JIF.

  • @subliminalcastillo2126
    @subliminalcastillo2126 3 года назад

    It aint easy being one of the rare programmers who likes both object-oriented and functional programming. I'm loved and hated by everybody at the same time.

    • @subliminalcastillo2126
      @subliminalcastillo2126 3 года назад

      I strongly believe that programs are at their peak when you combine different programming disciplines together and use their pro's and con's to your advantage. Instead of congregating at any end of the spectrum, and choosing to see the world in black & white.

  • @MercyFromOverwatch2
    @MercyFromOverwatch2 3 года назад

    Jeff is my favourite tech youtuber!

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

    Cool video! An interesting angle of serving this dish to the table ❤

  • @atibyte
    @atibyte 4 года назад

    There is no right or wrong choice, use what gets the job done.

  • @carlosdavila9719
    @carlosdavila9719 3 года назад

    Typescript is just beautiful. Sick explanation btw 👍🏽👍🏽

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

    Would've been great to see the OOP examples as FP and vice versa.

  • @rubenssz
    @rubenssz 3 года назад

    Please, a video about Oriented Aspect Programming !!!

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

    So ima give a tip:
    If your making a library for
    Functions make a class and add functions to it so its like:
    Urlib.function()

  • @danilodjokic5303
    @danilodjokic5303 4 года назад +8

    Semicolon vs no semicolon...
    What kind of question is that seriously, is this even a debate

  • @yupnicesongjustinkeepitupa6255
    @yupnicesongjustinkeepitupa6255 5 лет назад

    Man your vids is like svg on steroids the animation is so cool

  • @jarrettgoh8920
    @jarrettgoh8920 3 года назад

    Woah nice fonts and color, what editor or theme is this?

  • @aii-yin3800
    @aii-yin3800 4 месяца назад

    what editor/extension is used where the console.log result preview is automatically updated?
    or is it just video editing updating the console.log preview
    timestamp: 5:55 - 6:00

  • @alexstone691
    @alexstone691 4 года назад +1

    i think its best to mix them, some situations gets really messy without inheritances or idk strategy pattern

    • @anonymoususer520
      @anonymoususer520 3 года назад

      The Stategy Pattern is just a function. The only reason it exists is because OO languages like Java didn't have first-class functions back in the day. It's not necessary in JS.

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

    What extension did you use to show the “console.log” result on the right side?

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

      He's just hitting ctrl+z to undelete the stuff he had previously written and deleted. The emojis are either copied output, or he didn't even bother and just wrote what it should output. Solid video presentation technique.

  • @nikcekorn
    @nikcekorn 4 года назад +2

    The name of the song in the intro, someone please?

  • @der-lotse
    @der-lotse 5 лет назад +1

    Still not sure, in which situations functional programming is more suitable than oop.

    • @willtheoct
      @willtheoct 4 года назад +1

      1:52
      -functional code should produce no side effects
      -pure functions are easier to test, and also easier to reason about
      Use functional programming when you want testable code that is easy to reason about.
      Use OOP when you want to fit in with OOP programmers.

  • @danielmalo1753
    @danielmalo1753 4 года назад

    This channel has exactly the type of content that I would've wished I'd seen when I become a pro in two years time. Thank you!

  • @twoleggedcat_cs2
    @twoleggedcat_cs2 3 года назад

    A way to determine if a hotdog is a sandwich is to train a neural network to identify sandwiches then give it a hotdog and see what it says. It’s the only way

  • @tendies
    @tendies 4 года назад

    Thank you for this explanation, it helped me allot

  • @alberthoekstra
    @alberthoekstra 5 лет назад +1

    Great video again. Thanks!

  • @VitorGRosa
    @VitorGRosa 2 года назад +1

    what is the name of the plugin used in the video?

  • @albirtarsha5370
    @albirtarsha5370 3 года назад

    Hey! My prettier throws away semicolons. I hate that because I switch between java and javascript programming. Am I using the wrong prettier?

  • @PierreLeroy76620
    @PierreLeroy76620 4 года назад

    That an interesting subject ... And i fully in it. I find Object oriented programming esier to "imagine" as a nooby. Oriented Object seems easier for saving or exporting in Json. When Functionnal seems you have you "basics" object and you want to be able to mutate object a create new depending on what you need.

  • @JonathanAdami
    @JonathanAdami 3 года назад

    Beware anyone watching this. If you know OOP very well, this video is interesting and you can learn stuff from it I know I did, if you're discovering OOP and want to understand it, don't listen to any of this, it's missing the point of OOP. It's not about sharing functionality or code, it's about separation of concern. In cooking terms: coding is applying recipes, developing is understanding food and making recipes... This video speaks about coding! My 2 cents...

    • @Eagle3302PL
      @Eagle3302PL 3 года назад

      Yeah, the code within your OO program can be either imperative or functional. OO is more about separation of concern and modularity by abstraction.

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

    I think a good developer should learn and at least try all of these paradigms. Learning functional programming can make you a better OO programmer. Learning OO concepts will help you know when to break functional rules.
    Personally, I like OOP with inheritance so I can make a standard base class that my junior devs can extend, but put some enforcements in place that you'd have to go out of your way to mess them up. I could probably use some practice with composition, I can see sprinkling some mixins on a few classes.

  • @vin5718
    @vin5718 4 года назад

    I thought I learn about OOP and Functional, but I instead I learn that Hotdog is and is not a sandwich

  • @paulcasanova1909
    @paulcasanova1909 3 года назад

    Just so you know, a hotdog is a taco.

  • @Krishnan172
    @Krishnan172 14 дней назад

    Why do employers hate creative problem solving skills from the employees? Unless he was not over-engineering it or the final output is not benefiting the application in anyway..

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

    What are the pre-requisite for OOPs?

  • @dennisbarzanoff9025
    @dennisbarzanoff9025 3 года назад

    I don't know if the GIF explanation was a meme or not. Why is JPEG pronounced with a P, even if Photographic is pronounced /f/. Because that's not how acronyms work.
    Tom Scott has made great videos on this, I suggest you watch them.

  • @jasperduanemendiola3293
    @jasperduanemendiola3293 4 года назад +1

    Very cool vid! May I know what font are you using in your editor? '=>' looks cool haha

  • @rafesiriso2765
    @rafesiriso2765 3 года назад +2

    Is being able to see the console.log output in the IDE window clever editing or a great plugin?

  • @MCasterAnd
    @MCasterAnd 4 года назад +1

    What's the background song in the beginning called?

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

    Just saying. I have seen good OOP codebases, I have not seen good funtional codebases. I am open to examples of a big project that is functional.
    Also, functional easy to test? Yeah, because you are testing CODE, not businesss rules.
    OOP is easier to test, but I must admit, everyone is doing it wrong. We teach TDD wrong. We teach it with simple classes, which makes us think we should test on the level of functions or classes. But instead, we should test modules. That would be the right level to test at. You learn this by actually writing the test FIRST

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

    Imperative programming is not the same as object-oriented programming.
    Imperative programming: state is external to the code.
    - the code acts upon the kitchen to bake the cake
    Object-oriented programming: state is inside the code.
    - the kitchen object, which includes a oven object inside of it, uses methods to change its own state and bake a cake
    Functional programming: there is no state.
    - a cake is described.

  • @smil1906
    @smil1906 4 года назад

    I think I will functional program a hot dog today.

  • @rubberepileptic9833
    @rubberepileptic9833 3 года назад

    Hi how do you show the result of console log on the same line in your ide you use?

  • @EnriqueDominguezProfile
    @EnriqueDominguezProfile 3 года назад

    A hot dog is, structurally, a sandwich indeed. The thing is, no one will understand you when you tell them 'pass me the sandwich on the table' referring to a hot dog.

  • @ΚωνσταντινοςΧαφης
    @ΚωνσταντινοςΧαφης 4 года назад

    hotdog === sandwich... So you can combine programming and humor at the same time

  • @xBZZZZyt
    @xBZZZZyt 3 года назад

    the best is everything can do everything

  • @nicetomeetugaming7024
    @nicetomeetugaming7024 2 года назад

    Thanks sir!

  • @johannbauer2863
    @johannbauer2863 5 лет назад +1

    So the last part is basically typeclass in Haskell/ traits in Rust/ interfaces in Java?

  • @rowanatkinson9018
    @rowanatkinson9018 4 года назад +1

    Hey! Can anyone tell me what VSCODE extension he uses for getting the result in previews?

    • @UpsetPulse
      @UpsetPulse 4 года назад

      Not sure if you've got your answer but here it is: quokkajs.com/

  • @slim_mike
    @slim_mike 5 лет назад +2

    hey! thanks, I see your videos from time to time and they are always really good. Question: what do you do to get the results of the console.log directly inside the editor?

  • @ofershaham1525
    @ofershaham1525 3 года назад

    goto 11:15 - it's not clear what you are trying to show because of extra graphics