Python Object Oriented Programming (OOP) - For Beginners

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

КОМЕНТАРІ • 2,6 тис.

  • @TechWithTim
    @TechWithTim  4 роки тому +1671

    Start a high paying tech career making $60k+/year with NO DEBT: coursecareers.com/a/techwithtim?course=software-dev-fundamentals

    • @felixst-gelais6722
      @felixst-gelais6722 4 роки тому +53

      Tech With Tim “JUTS noticed” you say? Hahahah

    • @TechWithTim
      @TechWithTim  4 роки тому +136

      Shhhhh

    • @bobturner2764
      @bobturner2764 4 роки тому +54

      Hello tech with Tim I'm a 14 year old trying to learn python. I'm finding it hard to get out of the beginner phase. I tried code wars but found the problems too hard. Any advice on how to practice and improve and what resources I can use. I have pycharm ide set up and have lots of free time with this quarantine going on.

    • @xkall
      @xkall 4 роки тому +26

      @@bobturner2764 Try to learn from a book. It's easy to learn from a book because they're well organized and structured.

    • @sponzor94
      @sponzor94 4 роки тому +3

      How are you doing during these times

  • @k8ysk8
    @k8ysk8 4 роки тому +1320

    You really are a star. I got a concussion and had to miss several weeks of my intro to computer programming summer course, and your videos literally saved my grade. I'm trying to get into med school, and people like you who put in hours of effort just to help complete strangers are an absolute blessing. Thank you so much Tim. I'll make sure to donate to your patreon once I can afford to!

    • @baka_geddy
      @baka_geddy 3 роки тому +30

      Hope you are getting better now!!!

    • @TheJacklwilliams
      @TheJacklwilliams 3 роки тому +21

      @@baka_geddy WOOT WOOT! I also have to add KatieSkate, you are a STAR! Seriously? Med school? And learning OOP/Python? Wow, just wow, humbled. KEEP IT UP YOU MAD ONE YOU!!!!!! Get well and GO AFTER IT!!!

    • @baka_geddy
      @baka_geddy 3 роки тому +15

      @@TheJacklwilliams many of my bio stream friends can code python... It's not that difficult though...

    • @executorarktanis2323
      @executorarktanis2323 3 роки тому +2

      Yeah like I also want to donate to my guy Tim or bprp or any educational vids but to young to donate or have money

    • @brijeshsamal7035
      @brijeshsamal7035 3 роки тому +8

      @@executorarktanis2323 Tim is brilliant! You can donate to him indirectly by sharing his videos due to UA-cam Monetization, so you don't need to have your own money to give him some.

  • @jamescuadra169
    @jamescuadra169 4 роки тому +3388

    Are we all going to ignore that fact that the acronym for Python Object Oriented Programming is POOP?

  • @aakashjaiswal2003
    @aakashjaiswal2003 2 роки тому +398

    Never finished a 54 minute educational video without any break. So well organised and clearly explained. Not a single minute wasted or rushed. Thank you Tim. Channel subscribed!

  • @lmgesus
    @lmgesus 2 роки тому +570

    0:00 OOP basic
    28:11 inheritance
    40:53 static and class methods and attributes
    Don't mind me, just putting this here since I might need it.

    • @Psychetwo
      @Psychetwo 2 роки тому +32

      time stamps on these type of educational videos are definitely helpful. Thanks! Hopefully Tim have some time to go through some of these older videos and add chapters.

    • @smaransure2234
      @smaransure2234 2 роки тому +1

      Can an attribute be an 0bject

    • @ThsHunt
      @ThsHunt 2 роки тому

      @@smaransure2234 i think not

    • @ruonaazigbo904
      @ruonaazigbo904 2 роки тому

      Thank you

    • @Sol4rOnYt
      @Sol4rOnYt 2 роки тому

      @@Psychetwo yh

  • @DC-yf9vy
    @DC-yf9vy 2 роки тому +242

    I'm over a year late, but this is the best explanation of classes I've ever seen. Great work, thank you!

    • @artistpw
      @artistpw 2 роки тому +3

      I was about to mention this as well. Really excellent examples and well delivered information!

    • @cuboembaralhado8294
      @cuboembaralhado8294 7 місяців тому

      Who cares if you're a little bit late! Learning is eternal

  • @troyke
    @troyke 3 роки тому +113

    As someone who's visually-impaired, I REALLY appreciate you using larger fonts in brightly-contrasted colors to do your tutorial. It REALLY helps!

  • @piquat1
    @piquat1 4 роки тому +347

    I've tried to understand classes many times. This is the only one that got me there. Self, methods, inheritance, init ect. I get it now. Thanks!!

    • @aammssaamm
      @aammssaamm 4 роки тому +2

      His interpretation is incorrect. You may want to read some good books.

    • @JayMaverick
      @JayMaverick 4 роки тому +1

      @@aammssaamm can you elaborate? Which part is incorrect?

    • @aammssaamm
      @aammssaamm 4 роки тому

      @@JayMaverick Already.

    • @dicksang2
      @dicksang2 3 роки тому +10

      @@JayMaverickDon't bother with his speech. He is only a poor UA-camr with 91 audiences, compared with Tim, 466K subscribers.
      An average guy knows who to choose to believe. :)

    • @nayan9672
      @nayan9672 3 роки тому

      @@aammssaamm tell a good book for python OOP

  • @0xBerto
    @0xBerto 4 роки тому +281

    Wait seriously this was just uploaded woo. Haha. So happy I found this channel
    Edit: this was the “easiest” 53 min of coding to digest on a video. Tone, example, audio quality, clarity. First step slow and explained. Then doing it again a little faster. Loved this video. More intermediate Python vids please ! 🙏🏼

  • @SyedMuhammadZubairShahBukhari
    @SyedMuhammadZubairShahBukhari 2 місяці тому +2

    Totally worth it. ( spending 3 hours)
    I was new to these topics and after this video i feel like that now i can make my own custom classes.
    Thank you sir

  • @developertools95
    @developertools95 3 роки тому +546

    Tears from my eyes when I finally understood what "self" keyword here is all about. Thank You!!

    •  Рік тому +21

      I look at it like "this" keyword in c++

    • @lozaur9837
      @lozaur9837 Рік тому +7

      I’m struggling to understand self 😢😢

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

      Update: after watching the video. I now understand what you mean… i understand it now! 😮😮😮

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

      ​@@lozaur9837🎉👏👏👏

    • @purpletom_yt3138
      @purpletom_yt3138 Рік тому +35

      Explanation on self: self refers to the class. Say you are defining a function and you use the parameter self. That parameter means that you will use that class you’re defining the function in. You will have access to all its attributes by just typing in self.attribute

  • @machibutinenglish1468
    @machibutinenglish1468 3 роки тому +100

    "I hope this make sense"
    man, it was clearer than water. Thank you so much.

    • @JackDaniels08
      @JackDaniels08 4 місяці тому

      What if someone is watching this video from Africa? It wouldn't be clearer than water for them.

    • @maximofernandez196
      @maximofernandez196 4 місяці тому

      @@JackDaniels08 everything would be

    • @JackDaniels08
      @JackDaniels08 4 місяці тому

      @@maximofernandez196 Btw, it's been almost three years since you posted your comment. How has life treated you since then? Have you found that learning OOP was worth the effort?

    • @maximofernandez196
      @maximofernandez196 4 місяці тому

      @@JackDaniels08 I'm the same person with a different account. Yeah, it is useful because it's used, but that doesn't mean you have to use it for everything, but rather combine the great things about procedural programming, functional programming and oop. A ton of people say that inheritance is not useful and that's true most of the time, because it sounds great at the start, but once you have to make a change to the parent class, things tend to break. Also, maybe python is not the best language to learn oop with, cause it's not an object oriented language. But overall I would say that objects tend to make sense to describe things in your program, and learning the basics is very very useful :)

    • @JackDaniels08
      @JackDaniels08 4 місяці тому

      @@maximofernandez196 Thanks a lot for your detailed explanation. And yeah as a beginner programmer I was curious about the uses of OOP.

  • @khmsalhuas1
    @khmsalhuas1 4 роки тому +36

    at 39:00 the reason we do super().__init__(*args) is to extend the Pet.__init__() method and add more attributes without completely overwriting the Pet.__init__() that gives us access to the self.name and self.age attributes that are used in the other methods like show. So the way I think of inheritance is there are four ways of doing this: 1) straight stealing from the parent class , 2) completely overwriting the parent class methods, 4) partially overwriting the method (extending the parent method (using super)), 4) independent new method.

  • @kesavae9552
    @kesavae9552 3 роки тому +51

    Tim is the kinda guy who uses his name as an example for a dog's name❤️

    • @shadow5296
      @shadow5296 3 роки тому +12

      And give himself a 95 grade as well.

  • @rajatchopra1411
    @rajatchopra1411 2 роки тому +4

    that's probably the best object orientation programming overview on youtube so far

  • @MohamedAhmed-rf5bk
    @MohamedAhmed-rf5bk Рік тому +9

    He is so good at explaining the basic stuff that other instructors neglect

  • @justinstuder7703
    @justinstuder7703 4 роки тому +40

    This is absolutely the most comprehensive look at OOP that I've ever had. Thank you for being so thorough with your explanations. I had multiple "oh so that's what that means" moments.😁

    • @obiwanfisher537
      @obiwanfisher537 2 роки тому

      That's the sign of a good explanation.

    • @tristansargent7010
      @tristansargent7010 2 роки тому +1

      Hey, its a year later, and I am having this same experience watching his video. This is a fantastic introduction to OOP.

  • @ooagabonjoaga2680
    @ooagabonjoaga2680 4 роки тому +29

    The quality of these FREE tutorials are amazing. thank you Tim.

  • @letslearnabout4934
    @letslearnabout4934 4 роки тому +317

    When I started learning OOP it took me a while to differentiate between methods types, so if you are struggling with that too, here's a quick summary:
    Method = function related to that instance of a class. Use this type it when you are using values of the own instance (its own name, age, etc). You need to create one instance to use it.
    Classmethod = function related to that class and that class only. Use this type when you are using values of the class, not the instance (For example, using a class that retrieves the total count of instances of that Class created and stored in a class variable). You don't need to create one instance to use it.
    Staticmethod = function not related to that class. Used for organization purposes (For example, a Calculator class with add, subtract, multiplicate, etc methods). You don't need to create one instance to use it.

    • @WasiMaster
      @WasiMaster 4 роки тому

      No reply, why? Thanks for this, it really helped me :)

    • @adrielbradley6677
      @adrielbradley6677 4 роки тому

      This really helped, thanks!

    • @sharafmzaman7412
      @sharafmzaman7412 4 роки тому

      Finally what I was looking for

    • @abhinabkhanal4662
      @abhinabkhanal4662 4 роки тому

      Thanks for the awesome explanation. Keep up the good stuff 🤗

    • @MG-wx8yx
      @MG-wx8yx 4 роки тому

      I thought staticmethod and classmethod are the same thing, the function related to a class not to instances of that class.

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

    "if you can't explain it simply, you don't understand it well enough" - Einstein, your video really make complicated things easier to understand, i have paid about $300 on a programming course that explained OOP poorly, watching your video really helps me a lot

  • @origamiguy
    @origamiguy 3 роки тому +3

    you are litterally the best teacher in programming

  • @juborajroypavel8342
    @juborajroypavel8342 4 роки тому +15

    It's probably the best Python OOP course on UA-cam. Thank you so much, Dear Tim.

  • @mjhessami
    @mjhessami 4 роки тому +16

    Just Wow, and Thank you, Tim! I am learning python for 3 years and all of the time I had issues with the OOP concept in Python as my degree is not IT ( I am a biotechnologist, PhD), but with this amazing video, I learned all I needed and looked for through passed years! Thanks a lot, I follow all of your job and advice all to use your channel! your teaching style is wonderful!

    • @alkhiljohn3813
      @alkhiljohn3813 2 роки тому +1

      I have been learning py for a year and am quite comfortable with it now, but I still don't know OOP very well :,)

  • @samwel8671
    @samwel8671 4 роки тому +13

    Tim I would like to thank you as I have made my first project using java, and its thanks to your tutorials that have helped me through learning python

  • @mxbtc
    @mxbtc 10 днів тому

    Honestly man gotta say that this really helped me have a clear idea about what the hell was the "class" things i was constantly seeing on yt videos of people doing projects in python. Thanks man!

  • @alexkerasidis
    @alexkerasidis 2 роки тому +3

    I cannot describe how glad I finally am to get to understand the basics of Object Oriented Programming in one afternoon! Thank you!

  • @lylerogers8694
    @lylerogers8694 3 роки тому +9

    He's very good at explaining everything he's saying.

  • @michaelperryman57
    @michaelperryman57 3 роки тому +5

    Programming since 1978. Now 72 years old. This is the first time that object-orientated programming has made sense. Many thanks

  • @favhwdg
    @favhwdg 4 роки тому +4

    I never understood this subject, this and pointers were the biggest hurdles for me, hopefully after I watch this I will understand it completely. Thank you tim

  • @evancooper7336
    @evancooper7336 2 роки тому +8

    Mate this was fantastic. I am quite an experienced programmer in my own area, as an actuary, I have a good amount of experience with R and python, never much use for classes in my line of work and I have always found the concept a bit confusing, both the how and why. This took me about 10 minutes to see the value add in OOP and understand it. I've had other people explain it to me for hours and still struggled to understand the benefit. Well done!

    • @JesseHughson
      @JesseHughson 2 роки тому +2

      Same. OOP always seemed like a way to complicate code. Tim does a great job explaining how it simplifies code and why to use it

  • @gingerbread_GB
    @gingerbread_GB Рік тому +13

    I studied computer engineering more than 10 years ago, never learned python or objective oriented programming and haven't done any serious coding in a decade. Your video was absolutely perfect for me to get back into the game. The pacing was just right for me to absorb the information at a casual pace and not get bored.
    PS: Also like how clean Python is compared to C.

  • @azr6767
    @azr6767 3 роки тому +4

    Dude this is genuinely such an amazing tutorial. You don’t bombard us with unnecessary technical jargon and you keep things simple. Love and respect from the U.K.

    • @aammssaamm
      @aammssaamm 3 роки тому

      Simple and incorrect.

    • @狐-u2i
      @狐-u2i 3 роки тому

      @@aammssaamm Funny that you can't prove it

    • @aammssaamm
      @aammssaamm 3 роки тому

      @@狐-u2i Should I? 😂😂

    • @狐-u2i
      @狐-u2i 3 роки тому

      @@aammssaamm If you can't then no. But if you can then its your choice, I'll hear you out.

    • @aammssaamm
      @aammssaamm 3 роки тому

      @@狐-u2i Ctrl+F 😂

  • @radi_dev7628
    @radi_dev7628 4 роки тому +4

    I've been studying python for some time now with Zed Shaw's book 'learn python 3 the hard way'. The whole process has been smooth till I got to oop, my confusion started. But now, watching your video, things are clearer.
    Thank you for the effort you put into this, very informative.

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

    It is 2023 I started and finished this today. Thank you TIm for helping me along my python journey.

  • @AlI-xy9jx
    @AlI-xy9jx 2 роки тому +6

    Super easy to understand, all the other youtube videos were hard to understand but your's was perfect. Thank you so much

  • @snsa_kscc
    @snsa_kscc 4 роки тому +52

    Says naming convention for classes is camelCase, when he should say PascalCase. Jokes aside, great content Tim, thanks a ton, just sharing this so we all could be smarter. Stay safe, much love

  • @leopuerto8039
    @leopuerto8039 4 роки тому +41

    you should be a college professor. This is so clear and smooth

    • @aammssaamm
      @aammssaamm 4 роки тому

      He has a lack of data architecture knowledge. College professors normally go through college first :)

    • @arthurbttf
      @arthurbttf 4 роки тому +3

      A shame there isn't more professors like this guy. There is a lab professor in my college that mocks whoever doesn't fully understand c++ or that has many questions or has troubles completing the challenges..

    • @xfire3778
      @xfire3778 4 роки тому

      Don’t know of any professors who are in their twenties, but go off I guess

    • @sharmishthabapuli8673
      @sharmishthabapuli8673 3 роки тому +1

      @@aammssaamm data architecture knowledge???
      That's a term used in Big data and Data science field. This has no use with OOP.

    • @狐-u2i
      @狐-u2i 3 роки тому +7

      @@aammssaamm I laughed pretty hard when I saw this comment, you must have missed the "OOP for BEGINERS" part. Then somehow was able to deduce that he has no knowledge of "DATA ARCHITECTURE" based on an hour long video going over very basic uses of OOP. Okay mate, seems like all that university and math's you were going on about didn't teach you common sense haha.

  • @TopBagon
    @TopBagon 4 роки тому +29

    Ayee perfect timing ^^ I'm having hard time with OOP but I'm pretty sure I'll be able to understand quite a lot from you. Thanks a lot for posting this

  • @haidar_belajar6101
    @haidar_belajar6101 2 роки тому

    What I like about Tim's explanation is that he doesn't start his explanation with terms that are difficult to understand, thanks a lot Tim, god bless you

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

    This is simply the best video on oops . Thanks a lot for helping me

  • @superspyjim
    @superspyjim 4 роки тому +33

    'here is an old dog, here is a young one'
    bro if Tim reached 34 years old he's gona be breaking some doggo world records...

  • @barnabykent6698
    @barnabykent6698 2 роки тому +11

    Absolutely brilliant lesson for high content to background noise ratio. This video has made for a really educational and enjoyable code-along morning. Thank you!

  • @Donnyq22
    @Donnyq22 4 роки тому +5

    Dude - I love your videos. Thank you so much for doing this. Your ability to explain concepts is the best on UA-cam. Thank you!

  • @seraphweathers5808
    @seraphweathers5808 3 роки тому +2

    I didn't even realize this tutorial was a whole hour long. I'm like "waittt elaborate more" then realized how much he was actually already going through. Wild how I just get sucked into these things

  • @Jackofall41
    @Jackofall41 2 роки тому +2

    I rarely comment on UA-cam.
    This video made me leave an appreciation comment for Tim. You are a great teacher. You explained everything like a primary teacher explaining alphabets. I have an udemy course on OOP. But, when I find this video, I haven't opened Udemy. Thankyou so much for awesome tutorials. I appreciate your efforts.

  • @plesinsky
    @plesinsky 4 роки тому +9

    Finally an actually great video with in-depth and simple explanation, that's what I call quality content. The video made it much easier for me to understand the basics of OOP, also I'm not afraid of it anymore. Thank you again

    • @aammssaamm
      @aammssaamm 3 роки тому

      It teaches you wrong stuff

  • @ricardotijerina886
    @ricardotijerina886 4 роки тому +6

    0:44 into the video and i must say "Thank you" for the font size.. Well done mate.

  • @gonzaloflores6700
    @gonzaloflores6700 2 роки тому

    I spent 3 days reading and trying to understand OOP , you just clarify everything , thanks

  • @JamesPearson
    @JamesPearson 2 роки тому +6

    Really fantastic, you have a gift of explaining things very well, especially for someone so young. Thank you for your efforts in producing these videos!

  • @NothingButFactsToday
    @NothingButFactsToday 2 роки тому

    After 10 minutes of watching, I am amazed at this great mind. Truly a hero. Thanks for this.

  • @iammomoha
    @iammomoha 3 місяці тому

    Most clear and composed video on Class so far. Thanks you.

  • @Prasad-ny7ff
    @Prasad-ny7ff 4 роки тому +16

    That's what I wanted 🔥🔥🔥

  • @Ifian23
    @Ifian23 8 місяців тому

    THANKYOU SO MUCH! I have my assignment due tomorrow and i understand none in my oop class. Really happy I'm starting to understand this, thankyou so much!

  • @Cryp2nalist
    @Cryp2nalist 11 місяців тому

    I was stuck on this subject in another platform because I couldn't comprehend what was being taught, then I came across your channel. Honestly I couldn't be happier. This is one of the best tutorials on UA-cam when it comes to OOP. Thanks for clearing things up.

  • @FullRamenAlch3mist
    @FullRamenAlch3mist 4 роки тому +60

    The real question is, what kind of mad man would ever name their dogs Tim or Bill?

  • @MarsLanding91
    @MarsLanding91 4 роки тому +4

    Excellent tutorial, Tim - thank you!
    Do you have any recommendations on what we can work on to improve our understanding of OOP?

  • @milfordjohnson2289
    @milfordjohnson2289 3 місяці тому

    this was the best video i have ever seen in my entire life. the audio, the presentation, the detail, the cross referencing of subjects. absolutely marvellous :)

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

    Two year old class or explanation done simply. I took several singular classes dealing with in python "OOP" . Sort of got it but not really. Cleared the confusion for me. Thanks

  • @sheez-5486
    @sheez-5486 3 роки тому +4

    Udemy: -Drake No*
    Tech With Tim: -Drake Yes*

  • @diomarcosta9980
    @diomarcosta9980 2 роки тому

    Tks from Brazil, man. I decided to learn Python in English, and I'm leaning more with you although I'm not 100% fluent.

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

    The 'ah behy' shocked me for a sec. I didn't realize I was listening to a fellow Tunisian. Thanks for the video. It was helpful

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

    Wayyyyy more confident in using classes now! If you can master classes you can really think about the world programmatically!

  • @CycloidalHeadache
    @CycloidalHeadache 4 роки тому +253

    "I wanna delete dog object Bill"
    *animal rights activists crash through the door*

  • @ShivamPilleyIXA
    @ShivamPilleyIXA 3 місяці тому

    There is nothing better than this.
    Good job Tim.

  • @sergeychistov8162
    @sergeychistov8162 2 місяці тому

    Thank you!! This is better than 2 years I spent in programming school, although it's not a good comparison.

  • @babytiny5807
    @babytiny5807 9 місяців тому

    After 26 years I finally know how to POOP, this video is a godsend

  • @nick8144
    @nick8144 Рік тому +4

    Only in programming tutorials you will find a 34 year old cat named Bill

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

    great video. but one thing that was confusing that you could've made clearer.
    in class Course, you use "student" as an argument in method "add_student".
    That's okay, but then you use "student" in your for-loop in the get_average_grade method. That makes me, as a beginner, think there are related somehow.
    But they're not, so it seems. You could rename the argument in "add_student" method to "new_student", and you could rewrite the for loop as "for i in self.students: value += i.get_grade()
    That would make it clearer.
    Nevertheless, I thank you for your amazing work.

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

    It's sad how my college classes, even though have some of the best professor's in the world fail to realise that just throwing a bunch of terms on slides will not get us those concepts... but the approach here that tim uses of just using simple examples however nonsensical ... do the job wonderfully well ... i think i will remember class with dogs and cats for a while now ... thanks mate

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

    You made an amazing OOP summary in less than one hour!!!

  • @thomash7247
    @thomash7247 2 роки тому

    One of the best video to explain how to use OOP. Thank you so much.

  • @xinhaofan396
    @xinhaofan396 4 роки тому +11

    In this video, you'll not only learn the coding but also meet the 34-year-old cat and 10-year-old fish.

    • @samaaaron
      @samaaaron 4 роки тому +1

      Apparently Tim has never had a pet or has an amazing vet.

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

    I am taking a coursera online couse and I am at this stage. I was just not getting it and saw your video about OOP in python and you explained it really well!

  • @Psychopatz
    @Psychopatz 2 роки тому

    I love the way you verbosely explains the inner workings of code even in its low level, it makes me understand more.

  • @Kamil-rf5qn
    @Kamil-rf5qn 7 місяців тому

    I'm only at minute 11 but this is by far one of the best OOP videos i have ever seen.

  • @lilyfullery4779
    @lilyfullery4779 7 місяців тому

    only video explained OOP well. you are truly a gem

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

    Your arguments names are the same as your variable names and the self declarations are also the same. This makes your examples so confusing. Everything has some variation of the same name. For example self.name=name. That is confusing. Then your instance of your class matches your instance name. Course = course (self.student). Too many things have the same name in your examples. It would be so much simpler differentiate different objects, functions, classes, methods, variables, arguments with different names to we see that they are being used differently and keep them the same if they represent the same item.

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

      Yes, you can call everything differently... which means you are writing more and more completely irrelevant characters into your code. What's that going to get you? Will it satisfy your OCD? Probably not even. The compiler doesn't care, the user doesn't care, the CPU doesn't care... so who are you doing it for? The little child inside your mind?

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

      @Lepi Doptera You don't get it. If you are teaching then you must actually try and teach and differentiate different areas of your code so new coders can follow the data structures you are creating. New coders need to track the flow of data. Obviously if you are giving each object and global and local variable and functions and constructors the same name then it is going to confusing to students. If you are coding for yourself or an experience coder then he can write code any way he likes and will not matter. A good teacher tries to actually teach and makes each object with a unique name so the students can track the flow of the objects and variables.

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

      @@tonysmith7759 If you are teaching, then you should be teaching important things, not how to bloat code. Your criticism leads to bloat, not to understanding. The first thing a good teacher would teach about OOP is what it does and what it doesn't do. In case of the combination of a dynamic language and OOP it basically doesn't do anything useful. For that, of course, you would have to know something about OOP that is fact rather than fiction. Which you don't. ;-)

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

      @Lepi Doptera What is the point of your last message? How does sending your last message help you?

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

      @@tonysmith7759 It doesn't help me. I already know how to code reliable systems. The last thing that makes a system reliable is how you name things that will be translated by your compiler into 32 or 64 bit addresses anyway. May I suggest that you read up on what happens when you compile your programs? Your boss pays for days, weeks or months of work for your carefully handcrafted variable and function names and your compiler removes all of them in a few milliseconds. :-)

  • @p4r4d0xhacks
    @p4r4d0xhacks 7 місяців тому

    Thanks Tim thanks a lot. Have been searching for a good video on oop and was stuck on this concept. Randomly on my feed this video popped up and with no hope of learning something new i started this video and this video literally taught me this complete topic. ALL THANKS TO YOU

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

    Best tutorial I have seen in object oriented programmin

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

    Good vídeo brow, your english is very easily to understand to me. I'm from brazil and i'm not fluent in english, but i can understand and comprehend everything you say.
    Thank you fom this amazing vídeo.

  • @omarnazzal8701
    @omarnazzal8701 3 роки тому

    Dude, Keep going
    I was really dreaming to understand OOP in python, I've searched for a lot of videos, watched them haven't understood but you ,
    you explained every thing and I understood them clearly.
    And I'm just a 14 yo kid who have python dreams.
    Thanks,

  • @Terik17
    @Terik17 4 місяці тому

    very good summary, the only other thing i was hoping you'd mention was public protected and private attributes/methods
    thanks for sharing! you summarised it better in less than an hour than my teacher in multiple classes haha

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

    I'm impressed! I watched some vids about that topic and could understand shit... came here and in 10 minutes I'm illuminated, thanks a lot man!

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

    neat and crisp presentation. i came here after getting confused by MIT's Introduction to Computer Science and Programming Using Python where Prof.Eric Grimson presented the same topic. Thank you for your clear, easy to understand approach and presentation.

  • @zewdiherring9528
    @zewdiherring9528 2 роки тому +2

    Dude, literally saved my life . This is the best OOP video Ive watched and its broken down so, so well. Im so glad you made this Tim , literally godsend. Thanks so much. I now understand OOP and enjoy it due to you :D Thanks again for making it so easy to follow with the examples!

  • @PsychicBarbershop
    @PsychicBarbershop 2 роки тому

    Lol I'm in school learning python and you literally explained this better than the course I'm taking. Gold star for you.

  • @alimuhammadabdool
    @alimuhammadabdool 3 роки тому +2

    Thanks a lot!!! I hope that this will helps me pass my coding interview test:-)
    (TPM role but I need to do a coding test)

  • @anjalimesh
    @anjalimesh 2 роки тому

    Superb !
    Class, method, object, instance, classmethod, staticmethod etc...

  • @shokryhussein2247
    @shokryhussein2247 2 роки тому

    Masha Allah Your language is clear so we understand your explanation Thank you

  • @Firetech2004
    @Firetech2004 2 роки тому

    As someone who learnt Java and then python I understood certain things:
    1. The __init__ method is the python equivalent of a constructor as it instantiates a class.
    2. The object definition is similar to java with object name = classname()
    3. There’s no data / return type in python but you know it’s void if it doesn’t return anything and if it does then it’s not void.
    4. You have both parameter and non parameter functions.
    5. You can access variables created inside init function outside. In Java however that’s not possible and you need to create variables outside the constructor (Called instance variables). You can give values to them inside tho.
    6. Inheritance in python simpler compared to Java. In Java, when you define the derived class constructor you give all the parameters and to define the super class constructor you write Super(parameters for super class); and define the rest as usual. To execute a super class method on a sub class, you use super.method(); (useful when you have the same method names in super and derived class)

  • @kwilde2387
    @kwilde2387 2 роки тому +1

    Small nitpick: Classes are in Pascal Case, Camel Case has the first word starting with lower case and all subsequent words starting capitalized, e.g. camelCase.

    • @NisYT
      @NisYT 2 роки тому +1

      Thanks for this, new dev here lol.

  • @peace01787
    @peace01787 3 роки тому +1

    Love your logic building skill.

  • @JulioCesar-ly2zm
    @JulioCesar-ly2zm Рік тому +2

    great contetnt man amazing, better than a lot payid courses over the internet

  • @parthmahajan6535
    @parthmahajan6535 2 роки тому

    HANDS DOWN! the best explanation of classes I've ever seen. Great work, thank you!

  • @mr.goldenweek8463
    @mr.goldenweek8463 2 роки тому

    I have been trying to understand this issue for a long time. And I could not understand at all what they were talking about. 2 minutes in your video, and I already understood what it was all about. Thank you Thank you Thank you Thank you I really love you so much, I learn so much from your courses. So much, really. I'm 16 and my dream is to be a software engineer, and you do not understand how much you help me in your videos. Thank you Thank you Thank you!!!!

  • @samuelkovanko7198
    @samuelkovanko7198 2 роки тому

    I'm a semi-beginner and I understood everything.. great job, thanks!

  • @Grungydan
    @Grungydan 2 роки тому

    I have struggled to "get" OOP in the past, and this video was fantastically helpful. Thanks!

  • @russnagel1
    @russnagel1 Місяць тому

    Great video, Thank You. Finally an explanation to understand 'self'.

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

    I took the OOP course in CS with Java and I can say this sums up at least half of what we saw in a whole semester. Of course you need to do your own exercises to really learn it but the information here is really concise instead of going through unnecessary abstractions to make this a 5h video.

  • @malcolm-the-third
    @malcolm-the-third 2 роки тому

    Gonna have to watch that again... SO GLAD YOU MAKE THESE VIDEOS!!!!