Object-Oriented Programming, Simplified

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ก.พ. 2025

ความคิดเห็น • 1.4K

  • @dizelvinable
    @dizelvinable 4 ปีที่แล้ว +2820

    Finally an example of OOP without a car! Thank you!

    • @xfire3778
      @xfire3778 4 ปีที่แล้ว +12

      Сидредин this was a good one

    • @mintes_son
      @mintes_son 3 ปีที่แล้ว +172

      1:20 - 1:25 is a car example

    • @shivangchaturvedi237
      @shivangchaturvedi237 3 ปีที่แล้ว +120

      Haha.. there is no oops without a car example

    • @ghostinthewires7006
      @ghostinthewires7006 3 ปีที่แล้ว +62

      @@shivangchaturvedi237 there is...with animals

    • @reihanerahnamaee4155
      @reihanerahnamaee4155 3 ปีที่แล้ว +4

      :))))

  • @chrisaga6253
    @chrisaga6253 3 ปีที่แล้ว +499

    1:02 Encapsulation
    3:29 Abstraction
    4:41 Inheritance
    5:27 Polymorphism

  • @PavanKumar-pn2tc
    @PavanKumar-pn2tc 2 ปีที่แล้ว +88

    Encapsulation : grouping related variables and functions operating on them. (Reduce complexity)
    Abstraction: hiding complex data and methods from user (simple interface)
    Polymorphism: many forms .. to avoid long if else statements RENDER
    Inheritance: inherent the qualities of a code (to remove redundant code)

    • @windyjay4627
      @windyjay4627 6 หลายเดือนก่อน

      Thank you for this!

  • @thallesaraujo7814
    @thallesaraujo7814 5 ปีที่แล้ว +571

    I have tried many times to understand what object oriented programming really is. This was the first successful try. Thanks and congrats for the very high quality video!

    • @danny3036
      @danny3036 5 ปีที่แล้ว +6

      100% Agreed - Great job Mosh Thank you.

    • @srikanthpen3250
      @srikanthpen3250 4 ปีที่แล้ว +2

      Just go through the libraries and the namespaces used in linux code. Thats the best way to understand OOPs. When C++ compiler can covert that c code and layout into OOPs only then we can totally understand how OOPs is being handled.

    • @MeghItPretty
      @MeghItPretty 4 ปีที่แล้ว +1

      @@srikanthpen3250 where can we learn that from? I mean what would you recommend?

    • @Lana-gi7ox
      @Lana-gi7ox 4 ปีที่แล้ว

      100% agreed!!

    • @sagessemusic5391
      @sagessemusic5391 3 ปีที่แล้ว

      You need to learn more about Java animation and Graphics

  • @aroxing
    @aroxing 4 ปีที่แล้ว +360

    For me encapsulation is not only about storing properties together and decreasing number of arguments, but what is more important it is all about HIDING implementation details and PROTECTING code from random access. At the same time abstraction is about ignoring unimportant parts of objects providing only essential interface for 'outer world'.

    • @rahulj2167
      @rahulj2167 4 ปีที่แล้ว +30

      I learned it that way, I was a bit confused here.

    • @HOWYOUDOIN884
      @HOWYOUDOIN884 3 ปีที่แล้ว +13

      This video has other errors, too.

    • @thinkersandimaginers6334
      @thinkersandimaginers6334 3 ปีที่แล้ว

      You learned from herbet schidlt book??

    • @aroxing
      @aroxing 3 ปีที่แล้ว +1

      @@thinkersandimaginers6334 It's just from my personal experience,

    • @sudaneeinamharic5891
      @sudaneeinamharic5891 2 ปีที่แล้ว

      you just repeated what he said

  • @bapple7844
    @bapple7844 4 ปีที่แล้ว +342

    Computer scientists: "ah yes this is an implementation of polymorphism and encapsulation"
    Also Computer Scientists: "This some spaghetti code right here"

    • @cyrusrice5228
      @cyrusrice5228 6 หลายเดือนก่อน +4

      Moms spaghetti, knees weak arms are heavy

    • @laelsnail5787
      @laelsnail5787 5 หลายเดือนก่อน

      ​@@cyrusrice5228 th-cam.com/video/Q5HGDWlcCRs/w-d-xo.htmlsi=kYsRLEXScugmP5ml

  • @FiReOaNdDeMoS2121
    @FiReOaNdDeMoS2121 5 ปีที่แล้ว +79

    OMG everything just clicks and makes so much sense, thank you for making this video

  • @Farreach
    @Farreach 5 ปีที่แล้ว +30

    as a CS major who is in my Senior year.. this is a great clean & concise explanation on the basics of OOP...I came to this video for a refresher since this is material we went over my first year ....I rarely use OOP but i definitely should ..would of made my life at Uni so much easier

    • @archiewoosung5062
      @archiewoosung5062 5 ปีที่แล้ว +1

      "of" is not a verb

    • @debrachambers1304
      @debrachambers1304 2 ปีที่แล้ว +1

      *have

    • @saynotoid
      @saynotoid ปีที่แล้ว

      "of" as in "because of" imho @@archiewoosung5062

    • @facts-ec4yi
      @facts-ec4yi 5 หลายเดือนก่อน

      @@archiewoosung5062 He is smarter than u. Stop it.

    • @facts-ec4yi
      @facts-ec4yi 5 หลายเดือนก่อน

      @@debrachambers1304 He is smarter than u. Stop it.

  • @talidan3421
    @talidan3421 5 ปีที่แล้ว +1819

    Memory trick: "Oops I ate A PIE"
    A - Abstraction
    P - Polymorphism
    I - Inheritance
    E - Encaspulation
    thumbs up to help someone out

    • @ivybrandyn
      @ivybrandyn 4 ปีที่แล้ว +3

      I memorized it the same way! :))

    • @ADevStory
      @ADevStory 4 ปีที่แล้ว +3

      hahaha really nice mnemonic trick!

    • @shayanshaikh534
      @shayanshaikh534 4 ปีที่แล้ว +3

      Haha thanks!

    • @plamennakoleva3726
      @plamennakoleva3726 4 ปีที่แล้ว +1

      thank you for this! :)

    • @stevencvisuals
      @stevencvisuals 4 ปีที่แล้ว +3

      I just remember it!?

  • @zarakhaliq6163
    @zarakhaliq6163 4 ปีที่แล้ว +17

    I just looked at so many different explanations of OOP for my interview prep including the "simple for even a child" freecodecamp explanation but this one is by far the best one! Great work. Thanks :)

  • @ilyakortasov2637
    @ilyakortasov2637 6 ปีที่แล้ว +46

    I have been Googling these concepts almost all day yesterday. Now this short video and that is it, I get it now :) I guess you made my day!!!

    • @HOWYOUDOIN884
      @HOWYOUDOIN884 3 ปีที่แล้ว +3

      The harsh reality is, though, that you probably don't understand from watching this video to pass an OOP exam. It takes years to get to a professional level of understanding of OOP. It's a major dedication, as opposed to something that can abstracted and encapsulated into a short video. And that's not even telling you that this video contains errors, despite the speaker's voice being very confident.

  • @shsoh6726
    @shsoh6726 4 ปีที่แล้ว +6

    Mosh, I read lots of OOP books, you just extracted all the useful contents out of it and translated it in simple words with no jargon. Damet warm.

    • @HOWYOUDOIN884
      @HOWYOUDOIN884 3 ปีที่แล้ว

      But you didn't notice the glaring mistakes? The part on abstraction is about 99% wrong.

  • @paisleybunk9352
    @paisleybunk9352 6 ปีที่แล้ว +35

    Finally a video explaining OOP that is well organized, thorough, and applies it to real programming examples. THANK YOU.

  • @julianagrutzmann2223
    @julianagrutzmann2223 4 ปีที่แล้ว +17

    What a simple and illustrative way of explaining OOP. I love your videos, Mosh. Keep up the exceptional work!

  • @georgechristovich6239
    @georgechristovich6239 3 ปีที่แล้ว +6

    Nice work. I have no doubt that you are a competent programmer, but more importantly as a teacher, you are a gifted presenter. I usually have to watch tutorials at 1.75 - 2.0 times normal playback to keep from stabbing my eyes out. Your tutorials are actually enjoyable at normal playback speed. Thank you.

  • @wittyhumour29
    @wittyhumour29 2 ปีที่แล้ว +10

    Encapsulation is just not about making variables private, it is much more. It is about
    breaking up the application into different logical and organized parts. So that you can
    change one part without generally changing all the other parts. Therefore encapsulate
    the parts that vary from the parts that remain the same.

  • @btkcodes
    @btkcodes 3 ปีที่แล้ว +161

    With Encapsulation: Resides Object oriented programming backbone of encapsulating data and functions into single unit called object
    With Abstraction: We reduce the impact of change in other objects
    With Inheritance: We can eliminate redundant code
    With polymorphism: We can refactor codes according to different types in simple manner

    • @HOWYOUDOIN884
      @HOWYOUDOIN884 3 ปีที่แล้ว +1

      You got the definition of Abstraction wrong, and your definition of Polymorphism is not quite right. You wouldn't be refactoring anything to achieve poly.

    • @HOWYOUDOIN884
      @HOWYOUDOIN884 3 ปีที่แล้ว

      Those aren't very good definitions, though. Your definition of abstraction is incorrect. And polymorphism can be acheived before any "refactoring".

    • @HOWYOUDOIN884
      @HOWYOUDOIN884 3 ปีที่แล้ว +2

      @@kcs3248 But that's not really what polymorphism is. You don't have to refactor anything, and who knows what in the world he meant by "according to different types". Types of what? One of his other definitions was also not right. Just be careful what you read if you are trying to learn OOP. There's a lot of impressive-looking videos about OOP and many of them are wrong.

  • @robertstimmel1100
    @robertstimmel1100 3 ปีที่แล้ว +9

    Great video! I am trying to teach myself C# and I really struggle to research certain things when I get stuck because I don't know the name of the concept that I need to look into. This video lays a lot of the groundwork in simple and concise terms. Thank you!!!

  • @spaceageexp8679
    @spaceageexp8679 2 ปีที่แล้ว +4

    I'm currently in Programming II at my college which is specifically an object oriented programming class. This video really helped me see what my current class is about. Thanks!

  • @mehrshadsoltani1165
    @mehrshadsoltani1165 4 ปีที่แล้ว +21

    you're insane man. i'm reaaaaaly proud of having a compatriot like you. you know our difficulties from iran. for example i can't buy your tutorials. so i will be reeeaaallly thankfull if you publish more contents with us.

  • @ifstatementifstatement2704
    @ifstatementifstatement2704 5 ปีที่แล้ว +23

    Been programming for 22 years and going to try OOP for the first time. Looks like it will make my programming easier in some aspects. All this time I got away with procedural programming and my current job (programming automation) does not need me knowing OOP but I hope to get a job in software engineering, and I feel OOP is a must to master.

    • @eritert
      @eritert ปีที่แล้ว

      How is it going now?

  • @Broughtvulture
    @Broughtvulture 5 ปีที่แล้ว +6

    This video cleared up the fog I had when it came to Object Oriented programming. Thanks man. It feels like I've broken down huge barrier.

  • @Andrea-np3dh
    @Andrea-np3dh 6 ปีที่แล้ว +45

    This is the best, clearest explanation I've seen so far... Thank you!!!

  • @mateusloubach
    @mateusloubach 3 ปีที่แล้ว +1

    the BEST channel for programming explanation. even the easy english words are explained!

  • @benzymatic
    @benzymatic 2 ปีที่แล้ว +31

    Woah that DVD player metaphor is outstanding. I’ve been really struggling with wrapping my head around OOP but that metaphor really helped things click for me. Well done, and subscribed! Looking forward to checking out your python vids!

    • @clerpington_the_fifth
      @clerpington_the_fifth ปีที่แล้ว

      yep, you can think of the dvd player as a class, and the buttons on the dvd player as methods inside that class

    • @togfanatic3781
      @togfanatic3781 ปีที่แล้ว

      ​@@clerpington_the_fifth thanks but what are the properties ?

  • @njourawebdev
    @njourawebdev 2 ปีที่แล้ว +1

    You just helped to understand oop after two years of university in just 7min!!!! I will blog about this in my future blog app for suree

  • @sumant9189
    @sumant9189 5 ปีที่แล้ว +3

    My God...
    7 minutes and alot of things in detail.
    Thanks Mosh.

  • @mr.logicpants2835
    @mr.logicpants2835 ปีที่แล้ว +2

    Mosh is AWESOME. He was made to be a good teacher. You RULE Mosh! 😛

  • @Gamabunta24345
    @Gamabunta24345 3 ปีที่แล้ว +11

    Encapsulation 2:00
    Abstraction 3:30
    Inheritance 4:45
    Polymorphism 5:28

  • @aaronstone_9965
    @aaronstone_9965 3 ปีที่แล้ว

    This was so needed. There's tons of material out there explaining OOP. But usually the explanation is either vague or a bit impractical. Congratulations for not beating about the Bush and yet not missing anything important.

  • @MrValdesbg
    @MrValdesbg 2 ปีที่แล้ว +8

    This is the first ever video that I watch about OOP, in fact this is the first ever information I learn about the OOP. Honestly speaking - I grasped the general idea. After watching it two more times I think I understood the concepts. From a single video from the first time. Thank you, Mosh! Thank you for braking down the complex matter into easily digestible bite sized bits.

  • @stephanietucker5909
    @stephanietucker5909 11 หลายเดือนก่อน

    You helped me understand OOP in minutes more than my professors did in hours of lecture. Thank you!!

  • @geetapatil2680
    @geetapatil2680 6 ปีที่แล้ว +36

    Hi Mosh..
    Really your videos are smooth understandable...Thanks

  • @HCEveningWalk
    @HCEveningWalk 6 ปีที่แล้ว +181

    Wish f**king college textbooks were as short and straightforward! Thanks for the upload Mosh!

    • @HOWYOUDOIN884
      @HOWYOUDOIN884 5 ปีที่แล้ว +6

      You just want things to be easier than they are. You are probably the type that is going to lie on your resume.

    • @metaparalysis3441
      @metaparalysis3441 4 ปีที่แล้ว +2

      @tiluu you mean people that created child labour

    • @Heisenberg355
      @Heisenberg355 4 ปีที่แล้ว +27

      @@HOWYOUDOIN884 I partly agree, but I've seen many times, that teachers and professor deepdive into very subtle details before explaining the whole picture simplified. This is not how you teach things. A video like this before getting into details would help many people understand topics way faster and better

    • @angelomartino4667
      @angelomartino4667 4 ปีที่แล้ว +3

      @@Heisenberg355 exactly

    • @HOWYOUDOIN884
      @HOWYOUDOIN884 3 ปีที่แล้ว

      @@One.Zero.One101 I didn't miss the point of what the guy was saying: "College text books are too hard". OOP takes years to get good at, assuming one's brain is worthy of the challenge and the commitment. And yes, I'm tired of people lying on their resume claiming to be good at OOP, when in reality they were just intrigued by a fancy TH-cam video and have just dabbled in writing classes . I saw one misuse of the word "interface", and then jumped a little past half way and found another mistake @ 4:39 (confusing abstraction with encapsulation). So as pleasing as it may appear to a newbie, they easily could walk away misinformed. It's easy to be attracted to easy material, indeed, but it's also easy to be misinformed and not realize it. That's my complaint about the majority of people who quickly fall in love with an educational video, not realizing the information is not quite right. I think people should read OOP books written by authors with well-established expertise, and not be so attracted to fancy youtube vids.

  • @erikschiegg68
    @erikschiegg68 6 ปีที่แล้ว +1976

    Hey,
    if you you watch the video in double speed, you master oop in even three and a half minutes!

  • @jak9777
    @jak9777 6 ปีที่แล้ว +2

    I understood more about these concepts in 7mins than 2 hours with my teacher. Thanks!

  • @voodoochili12
    @voodoochili12 6 ปีที่แล้ว +3

    Best example of encapsulation I've ever seen, thank you

  • @ronp-eb9bh
    @ronp-eb9bh 10 หลายเดือนก่อน

    Mr. Mosh, thank you for explaining Python in such a base-level common sense manner. You took a 4 hour class and summed it up better than the CISCO Network Academy that I'm going thru. Thank you so much!

  • @mccama19
    @mccama19 5 ปีที่แล้ว +8

    Thank you for focusing in this one topic, I've been having a hard time wrapping my head around this. Your video really helped.

  • @andreisas9649
    @andreisas9649 5 ปีที่แล้ว +1

    This is the simplest, precise and easy to understand explanation I have found until now.

  • @leonelp9593
    @leonelp9593 5 ปีที่แล้ว +5

    i officially declare this as the best POO intro i ever saw in my life
    thankssss so much my friend!!

  • @JotoheKian
    @JotoheKian 4 ปีที่แล้ว

    I don't even know why I'm watching OOP-oriented videos - I was simply searching for UE4 Blueprints tutorials, so only loosely related topic - but that was a very solid explanation. Thank you, I'm glad I've watched it.

  • @niteshkumarsukumaran
    @niteshkumarsukumaran 5 ปีที่แล้ว +3

    Polymorphism : you gave the best example with inheritance 🔥🔥🔥 many of them will never appreciate it...

  • @gregsonnawahin6251
    @gregsonnawahin6251 4 ปีที่แล้ว +1

    To be honest, I like every tutorial of you on programming. In PNG the university dont have such a lecturer that can explain in the lectures room the way you explain in all your upload tutorial its amazing.

  • @harbisetyonugroho2312
    @harbisetyonugroho2312 3 ปีที่แล้ว +3

    Thanks, Mosh! I learned a lot! I just learned to code recently, but I am really passionate about it. I hope I can always be a better programmer over time.

  • @Noxxys
    @Noxxys 6 ปีที่แล้ว +11

    Best programming teacher I've found so far! I have a lot of his courses on Udemy.

    • @HOWYOUDOIN884
      @HOWYOUDOIN884 5 ปีที่แล้ว

      Let me guess, you are a lil fucker from India that just likes to sound confident.

    • @HOWYOUDOIN884
      @HOWYOUDOIN884 5 ปีที่แล้ว

      @Major Key like most Indians you don't make sense but you'd like to think your conference in what you're saying is all that matters

  • @matychp
    @matychp 5 ปีที่แล้ว +2

    The best explanation about the 4 pillars of OOP that I watched in my life, ty Mosh!.

  • @FredoCorleone
    @FredoCorleone 6 ปีที่แล้ว +501

    Perfect for a coffee break ;)

    • @ThingEngineer
      @ThingEngineer 6 ปีที่แล้ว +13

      HA agreed, that's exactly what I was doing while watching this. Great video for new comers or to recap OOP basics! THX

    • @manudelmarche
      @manudelmarche 6 ปีที่แล้ว +12

      A coffee break that's less than 30 minutes ain't a real coffee break.

    • @daanielacosta2395
      @daanielacosta2395 5 ปีที่แล้ว

      Indeed

    • @denisblack9897
      @denisblack9897 5 ปีที่แล้ว +10

      you should relax and breath fresh air on coffee break, for fucks sake man

    • @zeevlogs4250
      @zeevlogs4250 4 ปีที่แล้ว

      Yeah!! Similar thing happened with me

  •  6 ปีที่แล้ว +3

    "We can change or modify one of the methods and it will not impact the rest of the code" - famous last words ;) Class extending, sharing "this" all around the place, mutating the state - that's all the consequences of OOP and it WILL impact the whole program. Granted - it's all about the patterns. But we all know how you can end up with "Spaghetti" code even with OOP. Not to mention presented "Procedural" programming claims should be also contrasted with Functional Programming since Procedural would focus highly on imperatives rather than abstraction functions. Beginners could easily confuse Procedural with Functional at this point.
    With that being said - thanks for gr8 video :)

  • @N00B283
    @N00B283 5 ปีที่แล้ว +10

    This video just made me pass my exam in structured system development course at my university (y)

  • @dimitarmihov7757
    @dimitarmihov7757 6 ปีที่แล้ว +56

    As a person who has bought the complete Mosh courses i must say that the paid content is EVEN MUCH better and i highly recommend anyone to purchase his courses.
    This is not a sponsored post, i have not received a damn $ from Mosh but i truly wish i had found his courses when i was learning .NET development at first!

    • @guitarockdude
      @guitarockdude 6 ปีที่แล้ว +2

      Yeah, I've bought a few Mosh courses. Can definitely vouch.

    • @Scarabola
      @Scarabola 6 ปีที่แล้ว +6

      That's exactly what a sponsored post WOULD say.

    • @donkyer
      @donkyer 5 ปีที่แล้ว

      @@Scarabola
      Actually if a sponsored post said that, that'd be illegal.

    • @HOWYOUDOIN884
      @HOWYOUDOIN884 5 ปีที่แล้ว

      Let me guess, you are just another fucker from India who is so confident but really doesn't understand any of this shit but are more than happy to lie on your resume and act like a confident fucker.

    • @playdatewiththetans3379
      @playdatewiththetans3379 5 ปีที่แล้ว

      Hai

  • @roopashree3545
    @roopashree3545 6 ปีที่แล้ว +18

    This is the best video on oops that I watched till now . Thank you Mosh. You made our life easy by showing oops s this easy to understand 👏👏

    • @HOWYOUDOIN884
      @HOWYOUDOIN884 3 ปีที่แล้ว

      But in reality, you couldn't watch this video and pass a test over OOP. Not to mention the mistakes in the video, where he uses the wrong word, like "abstraction", which has nothing to do with reducing impact of change. So in reality, just because this video made you feel good, you have a long road ahead of you to become an expert at OOP.

  • @matt96533
    @matt96533 3 ปีที่แล้ว

    2.23 - "they are decoupled". This really helped my understanding. Thanks

  • @southern_smacker
    @southern_smacker 5 ปีที่แล้ว +5

    Amazing... I never found such easy and to-the-point explanation of OOP Principles as Mosh described in only 7 minutes.

  • @matthewnaylor8792
    @matthewnaylor8792 4 ปีที่แล้ว +7

    Mosh is just handing me a free education better than my college

  • @skilz8098
    @skilz8098 4 ปีที่แล้ว +11

    C++ gives you all of those benefits, plus procedural when need along with lambdas, functions pointers, function objects and templates consisting of function templates, class templates, and variadic templates... but c++ also gives you the added benefit when a set of classes that are related can reference or modify internal protected or private members by labeling them as a friend. This doesn't account for the fact that C++ is a strongly typed language, and has various storage type classifiers such as static, const, mutable, inline, etc... Modern C++ also has constexpr which is a very useful precompile feature.
    Suppose you have a class called Motor this could be a nested class within a Car class, however, you might want the Motor class to be an independent class because you can have a motor in a Boat, a Bike, Train, Plane, ATV, or it can even be an electrical motor to some kind of power tool. So in this situation, your base Motor class would be complete abstract, then your VehicleMotor class would derive from that. Then your derived Vehicle class objects such as a Car would have friend access to the VehicleMotor class so that it can change its internal properties such as HorsePower, NumberOfCylinders, etc. Now the Vehicle Motor class might not be able to access the Car's private members directly but could be a friend to access its private methods or its protected members...
    This doesn't even account for the preprocessor directives and macros. Yes, many people frown upon Macros, but in some contexts and if done carefully and correctly, they can make for good text expansion and replacement. I wouldn't rely on them for setting or changing values, or passing data types around, but they can still be useful.
    With the current release of C++20 in which I do not have a current compiler as of yet, we are now being introduced to Concepts, Coroutines, Modules and more! It's just that with C++ you need to know what you are doing as C++ will allow you to write code to shoot yourself in the foot as long as it compiles and links and provided you don't have any run time errors or crashes. You can still have memory leaks, dangling pointers or references, invalid pointers, and references, etc. Other things such as out of bounds indexing or accessing memory that doesn't belong to you will cause unhandled exceptions. Knowing when to cache something into a local variable within its a specific scope or stack frame is vital compared to knowing when to put something on the heap. Dynamic programming is good in many contexts but one has to be careful, that's why the standard library is so versatile with its containers and algorithms, smart pointers, etc.
    C++ gives you almost all of the concepts of OOP without the garbage collection of C# and Java with very minimal overhead and more. It is also considered a lower layer of the high-level languages next to C and Objective C, any lower and you'd be working with ASM. It is very fast and efficient and when done correctly, the source code for the application or the program is practically invisible as modern C++ compilers are excellent at what they do and are only improving. They aren't completely perfect as they do have bugs, but they can generate object code or assembly code much better than you can! They will utilize specific operating system functionality and CPU instructions in manners that you would never think of! Their error messaging systems are becoming much better along with their linker and debugger tools.
    I've messed around with C# a little, JavaScript a little and Python but when it comes to the type of programming that I'm into doing such as 3D Graphics Rendering Engines, Hardware Emulators, Sound Processing, Compiler Design, etc. this is where languages such as C, Objective C, and C++ excel above your high-end languages.
    If you're looking to do something quick and fast such as an online interactive program for quick access and basic functionality then yes, by all means, Java, JavaScript, C#, Python and others are perfect for the job. However, when you are writing the backend, frameworks, libraries, server code, etc. that's where these languages are usually preferred.
    This is why C++ is considered a multi-paradigm language! It can still work like C, it has the ability to inline assembly blocks as their own scope within a function for optimizing loops, etc. the capabilities such as C# and Java without the overkill of the garbage collection, and it isn't restricted to have everything as a class or an object or a smart pointer behind the scenes such as seen in Python, C#, or Java. However, it is a strongly typed language which makes it a great tool to master!
    Happy Coding!

    • @muhammadshoaibmushtaq5693
      @muhammadshoaibmushtaq5693 2 ปีที่แล้ว +1

      Bro, Wtf? You tryna scare me?

    • @skilz8098
      @skilz8098 2 ปีที่แล้ว +1

      @@muhammadshoaibmushtaq5693 No, not at all, just pointing out some of the benefits of the language. Don't get me wrong, there are also cons, but the pros outweigh the cons by a huge advantage!

    • @muhammadshoaibmushtaq5693
      @muhammadshoaibmushtaq5693 2 ปีที่แล้ว +3

      @@skilz8098 lol, I was just kidding. Thanks for sharing.

    • @Azul719
      @Azul719 2 ปีที่แล้ว +1

      You just wrote a book dude haha

    • @skilz8098
      @skilz8098 2 ปีที่แล้ว +1

      @@Azul719 It's barely a chapter. Only a few paragraphs.

  • @tiffanymclean4
    @tiffanymclean4 5 ปีที่แล้ว +8

    I love your videos! There always so easy to follow and understand. This one definitely didn't disappoint!

  • @rany21
    @rany21 6 ปีที่แล้ว +13

    Well done. Thanks for sharing this content. Simple and easy to follow.

  • @ismailvittal
    @ismailvittal 6 ปีที่แล้ว

    Every computer science lecturer should watch and understand this video before confusing the students. Thanks Mosh Bro.

    • @HOWYOUDOIN884
      @HOWYOUDOIN884 5 ปีที่แล้ว

      Let me guess, you're just another fuck head from India?

    • @johnwig285
      @johnwig285 5 ปีที่แล้ว

      @@HOWYOUDOIN884 oh u mean ur future bosses? 😂

  • @kuyafrex480
    @kuyafrex480 6 ปีที่แล้ว +11

    I'm already applied these concepts in my code without even knowing the terms for that. At least now I know

  • @hugopfeffer4175
    @hugopfeffer4175 4 ปีที่แล้ว

    Your sketch showing object property as variables and methods as functions really sparked a light in my brain. Thanks.

  • @muhammadamir4964
    @muhammadamir4964 6 ปีที่แล้ว +41

    Mind Opening, Informative, pactical

  • @gabrielferrin
    @gabrielferrin 5 ปีที่แล้ว +1

    Other courses make it so much more complicated to explain what here has been plainly expressed. Congrats!

  • @m.u.550
    @m.u.550 6 ปีที่แล้ว +20

    What a brilliant Video! Thank you!

  • @Александр-р3э3м
    @Александр-р3э3м 5 ปีที่แล้ว +1

    That's the best video I've ever seen about OOP. Here I found lot of info I coudn't find at other sources! Thank you so much!

  • @kokalti
    @kokalti 5 ปีที่แล้ว +6

    Great video I wish I watched this before my interview. You forget these things

    • @ChrisFouadHabibifromMars
      @ChrisFouadHabibifromMars 5 ปีที่แล้ว

      Yeah man same, like i understand it in my head but I get nervous

    • @kak8895
      @kak8895 4 ปีที่แล้ว

      @@ChrisFouadHabibifromMars This may be old but I'll appreciate your reply to a question if you don't mind. Do they ask questions concerning these in interviews?

  • @fnerd7518
    @fnerd7518 2 หลายเดือนก่อน +1

    Funny how things change, In the era of modern application development, where components and microservices dominate, procedural-style short and modular code might seem more appealing these days. It provides a practical alternative to the complexity of OOP, helping you build fast, maintainable, and scalable small modular components with less overhead. Sometimes, less really is more.

  • @ShunguRocks
    @ShunguRocks 3 ปีที่แล้ว +3

    Thank you Mosh, I really enjoyed this concise and clear video. I understand what OOP is now and can’t wait to get to that topic in my learning. I have just started learning to code in Python.

  • @sproutboot
    @sproutboot 3 ปีที่แล้ว +2

    Encapsulation : in oop, we group related variables and functions that operate on them into objects
    Abstraction : all that complexity is hidden from user

  • @SteveUrlz
    @SteveUrlz 5 ปีที่แล้ว +5

    Came with low expectations, but it was actually really good, tnx

  • @hasancheckman416
    @hasancheckman416 5 ปีที่แล้ว

    Best description among many and many text books and papers that I have read or videos I have watched. Thank you Mosh!

  • @7Trident3
    @7Trident3 5 ปีที่แล้ว +3

    That was a lot of info to cram into 7 min. Bravo!!!!

  • @LenSys-AE
    @LenSys-AE 3 หลายเดือนก่อน +2

    Danke!

  • @martynaskir7852
    @martynaskir7852 5 ปีที่แล้ว +7

    One of the best explanations about the subject. Well structured and easy to follow.

  • @petsandpaws8906
    @petsandpaws8906 2 ปีที่แล้ว

    I can say nothing but. Thank you for sharing your knowledge with those that want to learn programming.

  • @juliorodriguez4946
    @juliorodriguez4946 5 ปีที่แล้ว +3

    flawlessly explained. Thank you, Mosh.

  • @takeuchi5760
    @takeuchi5760 ปีที่แล้ว +2

    This was very good, I read 5 different explanations of OOP before coming here, I had the basic idea about the terms but it's definitely clearer now, what each term actually means.

  • @hs_harsh
    @hs_harsh 6 ปีที่แล้ว +5

    This is only of the best one can find! Thank you so much. :)

  • @kennethweerasinghe6501
    @kennethweerasinghe6501 5 ปีที่แล้ว +2

    I am trying to learn some programming and your video presentation is wonderful!
    Thank you !

  • @adeelkhan9636
    @adeelkhan9636 6 ปีที่แล้ว +3

    your way of teaching .....awsome man..very well explanation..!!

  • @KeirLoire
    @KeirLoire 2 ปีที่แล้ว

    I code pretty well with classes on C# and I know access modifiers and class responsibilities and make clean code, but I still don't understand OOP concepts. This video helped me understand it.

  • @RaviSargam
    @RaviSargam 6 ปีที่แล้ว +13

    Your videos are simple to understand, you make very clearly for .net platform... Thank you for your videos👌😔🙏

    • @RaviSargam
      @RaviSargam 6 ปีที่แล้ว +1

      Programming with Mosh definitely bcoz you are the only TH-camr who makes super quality videos on dot net...

    • @HOWYOUDOIN884
      @HOWYOUDOIN884 5 ปีที่แล้ว

      Let me guess, you are a fucker from India that just likes to agree but doesn't understand shit, and you also don't wear deodarant?

  • @mustafabilalokan9482
    @mustafabilalokan9482 2 ปีที่แล้ว +2

    Sir, you are an excellent teacher.

  • @SimpleLangSolution
    @SimpleLangSolution 6 ปีที่แล้ว +25

    That was so beautiful. I love you.

  • @beatrizassumcao1728
    @beatrizassumcao1728 3 ปีที่แล้ว

    This is the best OOP explanation i've ever seen. Thank you so much for that!

  • @آدیگوزل
    @آدیگوزل 6 ปีที่แล้ว +48

    Started good explaining encapsulation very well but after that, he just tried to finish in 7 minutes.

  • @sneakyniek
    @sneakyniek 6 ปีที่แล้ว +2

    Clear, complete and straight to the point, thanks!

    • @sneakyniek
      @sneakyniek 6 ปีที่แล้ว

      @Sergio Díaz Nila Didn't know that, thanks for the tip Sergio!

  • @ilhamakhyar4849
    @ilhamakhyar4849 5 ปีที่แล้ว +16

    i liked this video so much, it's really informative and perfect explaining

    • @roarznz
      @roarznz 4 ปีที่แล้ว

      Yeah, Mosh is great at explaining things

  • @BaherZakhary-o6q
    @BaherZakhary-o6q ปีที่แล้ว +1

    Thank you for the super clear and short explanation, it has helped so much, could you explain the difference between functional and procedural programming in a similar video ?

  • @ryanm7263
    @ryanm7263 4 ปีที่แล้ว +9

    Personally, I think switch statements are beautiful.

  • @daedalusjones4228
    @daedalusjones4228 2 หลายเดือนก่อน +1

    You’re an excellent instructor. Thank you.

  • @SmartProgramming
    @SmartProgramming 6 ปีที่แล้ว +6

    nice explanation sir, thank you 👍👍👍🙂🙂🙂

    • @amandev4892
      @amandev4892 6 ปีที่แล้ว

      Sir aap bhi bahut acha explain krte h

  • @markdaly818
    @markdaly818 ปีที่แล้ว

    As somebody relearning how to code Java, Mosh's youtube releases have been invaluable.

  • @ethana1523
    @ethana1523 4 ปีที่แล้ว

    Thank you so much. It took me years to understand what object-Oriented programming is and this video explains it so well.

    • @HOWYOUDOIN884
      @HOWYOUDOIN884 3 ปีที่แล้ว

      Except for the mistakes and wrong definitions ;)

  • @cheriecheung4164
    @cheriecheung4164 5 ปีที่แล้ว +3

    Very clear and you make the subject interesting! :)

  • @atenglenon
    @atenglenon 6 ปีที่แล้ว

    simple analogy comes from the person who understand it.. and you made oop become clear.. thank you..

    • @atenglenon
      @atenglenon 6 ปีที่แล้ว

      done, without any doubt.. :)

  • @Rachman01
    @Rachman01 5 ปีที่แล้ว +31

    I felt personally attacked in that intro, I have a variety of fettucine, cavipati, angelhair, bowtie and penne code thank you very much.. :D

  • @TheSamale
    @TheSamale 2 ปีที่แล้ว +1

    Thank's profesor, your my "STAR"

  • @Ray-jg5dj
    @Ray-jg5dj 5 ปีที่แล้ว +31

    "The best functions are those with no parameters"
    No ! Please *don't* interpret this as "Functions without parameters are better !" because it's *not true* . Just because someone famous said it doesn't mean it makes sense.

    • @af_125
      @af_125 5 ปีที่แล้ว +2

      True. One should read the mentioned book chapter before making a video with that bold statement without the full context.

    • @rumfordc
      @rumfordc 5 ปีที่แล้ว

      do you have any examples of when you would prefer _more_ parameters when _less_ is an option?

    • @kuhluhOG
      @kuhluhOG 5 ปีที่แล้ว +5

      @@rumfordc it's more meant that instead of building some very complicated structures to avoid functions with parameters, just use one functions with a few parameters (for example I once saw code where someone built a whole object with 10 methods resulting in about 200 lines of code instead of just using that one function with 4 parameters directly)

  • @raandomplayer8589
    @raandomplayer8589 2 ปีที่แล้ว

    5 years and still a very good explanation. Bravo!