The Art Of Object Oriented Programming

Поділитися
Вставка
  • Опубліковано 15 жов 2024

КОМЕНТАРІ • 50

  • @baka_baca
    @baka_baca Рік тому +30

    Ahh OOP, a paradigm for making simple problems extremely complicated and painful. I have 4 years of experience with OOP for web development in a professional setting in multiple languages, dozens of codebases, and across many teams. I'm still waiting for a time where OOP truly made my job easier, the only times I thought it might have made my life easier just ended up being features of strongly typed languages or compiled languages. Learn OOP so you can understand it when you come across it and so you can understand why you should avoid it whenever you reasonably can.

    • @ProjectXiel
      @ProjectXiel  Рік тому +11

      Pretty much anything that can be done in OOP can be done procedurally in half the code or less, aslong as you're not an idiot

    • @shahzaibhassan2777
      @shahzaibhassan2777 Рік тому +2

      I think you are too biased with it
      OOP has made my life so much easier, it just makes compete sense.
      Everything has its pros and cons.

    • @ProjectXiel
      @ProjectXiel  Рік тому +6

      @@shahzaibhassan2777 That's a fair take, people don't realize it, but component based architectures like React, Vue ect were inspired by OOP, while they're not identical, a lot of the same ideas of reusable and modular code are there, though you could argue that functions serve a lot of the same purpose, but in Game Development especially I could see a strong argument for OOP

    • @baka_baca
      @baka_baca Рік тому +1

      @@shahzaibhassan2777 it really depends on what you're doing. OOP has made my job vastly harder than it needs to be, but maybe for what you do it makes sense. From much slower design and prototyping time, to far more verbose and difficult to debug code, to really slow ramp up time for new devs, the list of how OOP has just flat out failed to deliver what it promises just grows and grows.
      For context, when I first started with OOP, I actually really liked it and thought it was making my life easier. As the years have gone on, my opinion has clearly changed. Once I started recognizing that the ways I was "fixing" OOP for myself were just called functional & procedural programming, and I moved towards just skipping the OOP parts altogether everything just got way easier.

    • @baka_baca
      @baka_baca Рік тому

      @@ProjectXiel yep, I can appreciate that React and Vue started very OOP inspired. Vue is still pretty dang entangled with OOP, and I'm also not a fan of that either. React took a hard turn towards functional programming, perhaps a bit too hard but it is what it is.
      There's nothing unique about reusable and modular design to OOP, that's just a basic foundation of programming well, regardless of which paradigm you work with. OOP just makes it much harder to do correctly, though to be fair it can be done.

  • @yashganar9794
    @yashganar9794 Рік тому +15

    bruh I thought this channel had 1M or something subscribers, you are about to blow with this content!, kudos for the future! you made me understand in 15 mins what the university teachers take 5 hrs to understand

    • @igorskyflyer
      @igorskyflyer Рік тому +1

      I thought so too! This bro will go places with his great content, trust me 😎🥳

  • @commentvsreply2420
    @commentvsreply2420 Рік тому +5

    I just found your 'art of programming' video now I'm here.. This is great content and you seem to have a knack for it! Good luck sir, I'll be waiting for you to get 100k subs 👏

  • @Mzulfreaky
    @Mzulfreaky Рік тому +1

    More please!

  • @ChaosArtist
    @ChaosArtist Рік тому

    Nice explanation of OOP, I'm continually having to wrap my head around the details of each programming paradigm and the pros and cons of each. Looking forward to seeing more of your videos.

  • @davidkik
    @davidkik Рік тому

    Great job explaining the impossible. I've listened to many tutorial & yours are amazingly simple to understand. Keep them comming 🤜🏻💥🤛🏻

  • @VPSOUNDS
    @VPSOUNDS Рік тому

    This was so good that i felt the need to pay you for all that well put info.

  • @valentinussofa4135
    @valentinussofa4135 Рік тому

    I subscribed your channel. It seems I have become your fan. Keep working bro. I'm sure your UA-cam channel will grow rapidly. I will help promote your channel for OOP programmers. Many thanks from Indonesia.🙏

  • @mastershonobi110
    @mastershonobi110 Рік тому

    Great explanation and vid; keep them
    Coming……🔥🔥🙏🏾🙌🏿

  • @reralt
    @reralt Рік тому +1

    Great video on the topic.

  • @howdin0496
    @howdin0496 Рік тому +1

    Thanks for this great video 🫡

  • @smanzoli
    @smanzoli Рік тому

    OOP should be used when many people in a team are cooperating to write huge and complex programs... and when most of the team do prefer OOP.

  • @nuwagabaprinceaubrey
    @nuwagabaprinceaubrey Рік тому

    I Love the music in the background, where can I get it

  • @sultanalhowaish5082
    @sultanalhowaish5082 Рік тому +1

    Much appreciated 🙏

  • @filipg4
    @filipg4 Рік тому +1

    OOP exists so that you can have a failed paradigm to compare against, it's a case study, like Enron of software industry.

  • @principleshipcoleoid8095
    @principleshipcoleoid8095 Рік тому

    6:16 wouldn't Rust's Animal trait be somewhat useful? So we get composition over inheritence.

    • @ProjectXiel
      @ProjectXiel  Рік тому +1

      Rust traits are pretty nice, I'm not a Rustacian or anything, but from what I know about them they're a way of working with structs, and Composition in general can probably replace inheritance, infact its probably a better approach in most ways, inheritance promotes refactoring, bc if you decide to deviate on any children even a little, refactoring the layers of inheritance and all of the inherited classes becomes tiresome, atleast with composition you're just nesting classes within eachother, but avoiding the lack of flexibility that inheritance would bring

  • @bhanubhattarai13
    @bhanubhattarai13 Рік тому

    Game programming is fun with OOP.

  • @MrAbrazildo
    @MrAbrazildo Рік тому +1

    5:45 and 10:23, by here C++ starts to be better than Java: public modifier/setter is not a good thing, although supported. In C++ you can elect a few f()s to change private content, with or without a modifier. This is the actual encapsulation. It seems Java hasn't something alike.

  • @nm5paczek
    @nm5paczek Рік тому

    OOP is about messaging, not objects. C language isn't OOP but u still can do the same as u mention:
    struct character
    {
    int height;
    int attack;
    int defense;
    };

    • @ProjectXiel
      @ProjectXiel  Рік тому

      Structs are similar to classes, but they dont have inheritence or polymorphism, or encapsulation, or arguably even abstraction, all it is, is fields on a type, no methods and no access modifiers, though you could do some weird pointery things to maybe get some of that sort of added to structs.
      No access modifiers exist which is a pretty big part of OOP, encapsulation and abstraction (data hiding) would be a pretty big part of what Alan Kay deemed as "Object Oriented" also, if OOP isn't about objects, then it was just named poorly. C is obviously procedural, yes it has structs, but the difference is method invocation, you can't have structs "do something".
      But maybe you are right, maybe the video did emphasize too much on object properties as part of the reason to use OOP when thats not unique

  • @jimmiller9330
    @jimmiller9330 Рік тому +3

    Slow down.

  • @aa898246
    @aa898246 Рік тому +2

    i like yo videos

  • @rivierasperduto7926
    @rivierasperduto7926 Рік тому

    Why getters and setters and not mutators and accessors? You use a lot of correct terminology and then you forgot this one? Overall though I really liked your video you are good at explaining.

    • @aristle_
      @aristle_ Рік тому

      i dont know that i have ever heard "mutators and accessors" in my life honestly

    • @rivierasperduto7926
      @rivierasperduto7926 Рік тому

      @arithomas8430 they are older terms but correct terms

  • @TheDavilaramiro
    @TheDavilaramiro Рік тому

    I all depends on how your brain is hard-wired... or how can you be able to re-wire it yourself.

  • @nullity1337
    @nullity1337 Рік тому +1

    cool

  • @gJonii
    @gJonii Рік тому +8

    Inheritance, a mistake every modern programmer has to make in their path to realizing OOP sucks.

  • @AURORAFIELDS
    @AURORAFIELDS Рік тому

    I'm not sure why in god's name you thought you need severe code duplication to set the *same* variables for different entities if you don't have classes. Arrays and structs exist in C, and any intermediate programmer will figure out how to use pointer or indices to set different variables of the same type with a single function. If you're gonna argue for why OOP is good, please don't post something so offensively misinformed.

    • @ProjectXiel
      @ProjectXiel  Рік тому

      Oh no, you're absolutely correct, you can honestly just use a function with a, ...well no optional arguments exist in cpp, but like, its easy to just create 2 functions with half the code of what the classes were. I don't actually believe in OOP, some of the examples were exaggerated on purpose.

    • @ProjectXiel
      @ProjectXiel  Рік тому

      And yea especially with them being same type, there was no reason for the classes, honestly not even a struct was needed. I'm aware of this.

    • @AURORAFIELDS
      @AURORAFIELDS Рік тому

      @@ProjectXiel I think in that case you could really have thought of a different example that would highlight a genuine difference, because I feel that some people who are just learning programming are going to not understand why it is not very widely applicable, and will keep perpetuating this narrative of "OOP good, anything else bad". There's definitely advantages to OOP, but its just as much misused by people who haven't taken the time to know better.
      Mind I'm not blaming you for that, but I think you should feel compelled to represent the material in your videos accurately, and acknowledge when you're using a hypothetical example when you couldn't do so concisely otherwise.

    • @ProjectXiel
      @ProjectXiel  Рік тому

      @@AURORAFIELDS That's fair critcism, I didn't really know what example to give, in my opinion the best advantage that OOP has, is organization, and abstraction, which is a double edged sword, maybe OOP has other benefits, maybe I'm ignorant. I planned on making another video talking about OOP again (somewhat negatively) and referring to the same code explaining why it was actually a bad example. I kinda forgot about the example though. I apologize if the example upset you, I don't really like OOP, so it makes even harder to come up with a reason to actually use it, and it was also on screen for a very short period of time.

  • @Tony-dp1rl
    @Tony-dp1rl Рік тому +5

    OOP was the worst thing to happen to software development. Regardless of the intent. If we had gone down a different path we would be decades ahead of where we are now. The joining of Code and Data together was just a fundamentally bad idea, laced with the even worse concepts of Inheritance and Polymorphism. It was the software engineering version of the Imperial Measurement System.