CS50P - Lecture 8 - Object-Oriented Programming

Поділитися
Вставка
  • Опубліковано 19 січ 2025

КОМЕНТАРІ • 407

  • @sabouraram5628
    @sabouraram5628 11 місяців тому +151

    Having spent over 100 hours across various paid and free resources, nothing matches the unique teaching style and enthusiasm of Professor David Malan. His passion and approach to teaching are truly remarkable. What makes this course unique is how he gradually sets the stage for different concepts. CS50 is absolutely the best course to learn Python.

    • @lepidoptera9337
      @lepidoptera9337 8 місяців тому +2

      Why would you pay for Python? It's free. ;-)

    • @Aramil4
      @Aramil4 5 місяців тому

      CS50P* (CS50 is a different course)

  • @WarbossPepe
    @WarbossPepe Рік тому +131

    How does this man have so much energy and focus to shoot at 2 hour 50 minute lecture. Incredible.

    • @CherifRahal
      @CherifRahal Рік тому +27

      it's more then that with the cuts and some edits

    • @matthewbailey6234
      @matthewbailey6234 8 місяців тому +9

      Unbelievable. He still looks fresh at the end! He was surely taking breaks?!!! The level of teaching on this course is so high, really carefully guides and enthuses the viewer. Very grateful to have free access.

  • @nobertwekesa8923
    @nobertwekesa8923 2 роки тому +343

    CS50 is best course out there. Malan is the best teacher I've seen . His understanding on OOP and python in general is outstanding. How lucky are these harvard students

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

      He is!

    • @timothykahil8007
      @timothykahil8007 2 роки тому +93

      How lucky are we they put it online for free also. I love David!!

    • @abbagarba1
      @abbagarba1 2 роки тому +19

      Malan in my language is called teacher. He is a really great Malan I learned a lot from him. Thanks 🙏

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

      @@mythbuster6126 I've completed like 7 or so 3 of them were related to programming and for me he is the best teacher tied with anither teacher but since they taught completely different things I can't quite compare them

    • @davidjmalan
      @davidjmalan 2 роки тому +44

      Thank you!

  • @kanwalkaur1221
    @kanwalkaur1221 Місяць тому +11

    I think I'm doing this course too late, however it made me believe that I can also do programming and start all over again after a big failure in my career, I thought I'm lost, but now I think, I can still do it. The ship has not sailed yet.. A huge thanks, respect, love and blessings from my side to Sir David Malan and The Team. Maybe one day I would love to be part of the in person class.

    • @BroomAtoom
      @BroomAtoom 7 днів тому

      The best day was yesterday, the next best day is today. It's never too late to learn something new and start over. You got this!

  • @yqhanliving
    @yqhanliving Рік тому +24

    This was soooo good. This class took me longer than any other previous CS50P classes, but it was worth it. I love the metaphors, they are vivid and to the point. Having took CS50P for more than a month now, this course has certainly grown on me. Sometimes, when I feel down or upset in life, watching David's teaching just gives me a sense of order and inspiration. And the problem sets are equally fun, engaging and challenging. Just want to say a big thank you to the whole CS50 team.

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

      Bro, i swear same here when I feel down or blue I watch david Malons course even though I don't hv a PC I'm trying to code in my phone for the last 5 yrs till now

  • @mehreentabassum1474
    @mehreentabassum1474 2 роки тому +46

    The best thing that happened to me this year is CS50.

  • @javierdemendonca257
    @javierdemendonca257 2 роки тому +91

    Wow David got so passionate on this one that he almost had no voice to say "This was CS50". Such enthusiasm, im so glad this got to be my first programming course ever. Thank you thank you!

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

    I nearly use about 6 hours to finish this OOP class. David malan explains so carefully and the example is well-designed. In some part of this video I watched it again and again. the best class in CS50P

  • @adfinemrising
    @adfinemrising 2 роки тому +47

    extremely engaging way to teach programming. i wish all teachers are like this. very precise, articulate, consistent and masterful. especially at the end. the most difficult concepts to comprehend (on your own) were explained like they were nothing. this guy is my hero

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

      Anither quality of him is hoe he teaches new information with an actual context like in the cs50x when he talked about sql, I've never understood the point of sql but the way he build up the lecture (talking about csv, how variables don't hold info etc) actually made me feel the need to use that, that's a huge deal in programming, you have to feel the need to use something for some problem if raw information is presented to you without a context you'll probably forget about it in no time

  • @alainrouleau
    @alainrouleau 9 місяців тому +32

    I've been using OOP and objects for years in Python. Still learned quite a lot. Great introductory video. So, thanks!
    For those who may feel a little discouraged about objects, don't worry. It's one of those things where a lightbulb has to go off and then you're like wow, now I understand. And you won't be able to control yourself, lol.
    Few suggestions to help out:
    • Focus on concepts, not syntax
    • Concepts are too simple, that's why it's hard, it just instances
    • Everything is an object including the space above your head, date/times, parking spots, lanes on a highway, a web page
    • Objects are responsible for their own methods which means it's not a mechanic that changes the oil on a car, it's the car itself that changes it's own oil
    • Objects are composed of other objects like a Car() which has 4x Wheel()
    • Extremely important, all the data & functionality travels with the object (known as encapsulation). So, you don't keep a separate birthday list for family members. You ask the instance of the Grandma() object directly if it's her birthday. She's responsible for knowing, not you.
    Fun example... Create 100x Casino() with 50x Table() with 1x Shoe() of 8x Deck() of 52x Card(). Randomly distribute the 40,000 deck of cards amongst the casinos and various tables. Shuffle the cards for each shoe. And oh ya, each card has a unique serial number. And card #888 of 2 million+ is defective and needs to be replaced. Find the casino and table where card #888 is located. Thats the power of OOP.

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

      can you tell me what's the concept behind self?
      and why to create instances like self.name = name instead of just name

    • @lepidoptera9337
      @lepidoptera9337 8 місяців тому +1

      @@abdqasrawi self refers to the instance of the class you are in. self.name is the variable name that belongs to that instance. In a real OOP language classes define private name spaces that can not be accessed from the outside of the class. Python is not such a language. It does not (and probably can not by design) isolate variables and methods of a class. That makes OOP in Python basically useless from an architect's point of view. The language simply does not check for programming errors that may result from external modifications of class variables. In C++, Java etc. such checks happen, which can be useful if you are dealing with novice and undisciplined programmers. Python assumes that you are a grownup and that you don't need such nanny measures.

    • @MescalineBanana
      @MescalineBanana Місяць тому +2

      Thanks for this excellent comment 🫡

  • @DeejayManiaNYC
    @DeejayManiaNYC Рік тому +43

    I started my computer science journey with watching CS50 videos over two years ago, nowadays I'm using them to quickly brush up on concepts. Either way, CS50 changed my life :')

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

      How is it going?

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

      @@Safar_Galimzyanov He is still posting bullshit on the internet while working as a cab driver. How do you think it's going? ;-)

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

      @@andoryus I am simply calling bullshit when I see bullshit. There is just an awful lot of bullshit on the internet. ;-)

    • @yulana990
      @yulana990 11 місяців тому +3

      @@lepidoptera9337 Someone who studies CS watching a free CS course from Harvard, is somehow ''bullshit''? Please, get a grip.

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

      @@yulana990 He is watching videos on UA-cam. That's not studying. Studying is when you are living it 24/7 at a university. I did teach CS as a grad student, by the way. You would not have passed our CS 101 exams with the materials that you can find online. Not even close.

  • @shakeelahmed07
    @shakeelahmed07 Рік тому +12

    Thank you so much Harvard for keeping this treasure trove for free on UA-cam available for everyone. Dear Sir David J.Malan , your energy and enthusiasm just flows like a Lava when you teach and you're the best instructor I have ever seen ❤.

  • @rdwells
    @rdwells 18 днів тому +2

    FWIW, the problem that Dr. Malan fixes at 21:25 is no longer an issue. Python now treats quotes within curly braces in an f-string as independent of the quotes defining the string. So a line like
    print(f"{student["name"]} from {student["house"]})
    now works despite the use of double quotes within the substitution strings. I know this is true in Python 3.12, but it may have been introduced in 3.11.

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

    How did Mr. Malan manage to speak for 3 hours straight while giving us a thorough understanding of the topic? mind blowing

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

    the magic is he's saying the same thing that a lot of youtubers do, but his expression somehow make it so easy to understand !!!!!!!! It's magic !

  • @Neojs565
    @Neojs565 2 роки тому +16

    Woww ! I'm doing mentally high five. I'm glad I found CS50. The teaching skill is exceptional ! Thank you so much !!

  • @hafsirayen4508
    @hafsirayen4508 Рік тому +19

    Dear David,
    I just watched your video on OOP and I finally understand it. Your clear explanation and examples made all the difference. Thank you so much for sharing your knowledge with us. Your teaching has made a big impact on my learning and I am grateful for it.
    Best regards, from tunisa

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

      So glad you found the material helpful!

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

    Just amazing, I’ve been trying to understand OOP for a while and here it is all explained brilliantly by David and his team. The learning cycle isn’t complete without some practice and application, so that’s what next with the assignments and my own programming needs. Many Thanks for the incredible generosity in sharing these lectures.

  • @catocross9542
    @catocross9542 Рік тому +9

    David is a world class educator who must surely be in the top 0.5% of python teachers on this Earth. Add that to the greatest practice labs of any python course on Earth and it becomes an undeniable fact that this is the best python course that exists anywhere on this planet.

  • @GG-uz8us
    @GG-uz8us 2 роки тому +9

    CS50 rocks! The author of Harry Potter would never expected her story provide an perfect example for OOP.

  • @НатальяУдовенко-ф4ф

    З Днем викладача! Щирі побажання найкращому Вчителю.

  • @brucebergkamp
    @brucebergkamp Рік тому +21

    David is such a legend as he is able to understand / decipher what his students are asking. i had a hard time understanding them :/

  • @absadiq702
    @absadiq702 2 роки тому +5

    The best teacher I've seen so far.

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

    3h of energy and passion. Obrigado David 💛💚

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

      Huehuehuehuehue brbrbrbrbr Valeu!

    • @5hitao
      @5hitao Рік тому +1

      Chama que chama chama
      Bora rodar uns code brbrbrbrbrbrbrbr

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

    I have been struggling to understand OOP for days now, but David just made my year! This Man is amazing

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

    its amazing to see some of the questions the students are coming up with. Very interesting questions raised towards the end that gave even David some pause. Perfect critical thinking on part of the students.

  • @yonghuidong888
    @yonghuidong888 2 роки тому +9

    This teacher is literally AMAZING!!!

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

    this class was awesome! I did watch videos on OOP before but none of them explained it as clear and oral as you did, thank you david!

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

    Thank you guys for delivering these awesome lectures and bringing knowledge to others. I'm so grateful that I was born into this era, where such precious knowledge is handed for free.

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

    This one was so good. I feel like I am finally comfortable creating classes and implementing them in my code.

  • @kylofps
    @kylofps 2 роки тому +5

    I'm super grateful for this class and it's availability for students online! His teaching is super inspiring :)

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

    So passionate! even though it's my first time to learn programming formally when i am pursuing a master degree in other major, i am excited. Thanks for sharing. If possible, i will further my research next year in US. best wishes

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

    Thank You, CS50P Team.
    You guys are the best. I love you all.

  • @georgejaniec
    @georgejaniec 2 роки тому +26

    The best explanation of the OOP out there. I like the way it has been structured. Thank you🙇 CS50P!

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

      I disagree, inheritance for example shouldn’t be mentioned like they way he describes it and will lead inexperienced people to create tight coupling, overly nested hierarchies and overlook some of the SOLID principles. They are better points to start from, not some contrived person example. Go study any respected GitHub repo and see how it’s used or not rather.

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

      @@coderider3022, sure I will take a look. Thanks for your reply!

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

      @@coderider3022 Do you have any good GitHub Repo for recommandation

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

      @@MrDante1947 lol and then he never replies again, that's what you get yo pay attention to people who always criticize others without showing proofs and yeah people with no programming experience will surely learn looking someone else's code used in specific context, and in fact when there's so many code samples from all different sources why bother watching a video right best advice nothing can go wrong

    • @Nagim-d3z
      @Nagim-d3z 2 роки тому +1

      @@sayori3939 Yeah ikr, David J Malan is literally a harvard professor with decades of experience in Computer Science but some random guy that's been programming for 3 weeks always knows better somehow

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

    this guy is a phenomenal instructor

  • @kadirv
    @kadirv 10 місяців тому

    Thank you Prof Malan for a detailed session on strong fundamentals. 👏

  • @ramantinuwal1810
    @ramantinuwal1810 5 місяців тому +4

    I couldn't understand this lecture well at first but after earning through various online resources on and off within the past 2 months, I am trying to fill in any gaps I have

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

      Same

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

      No joke 😥😥😥

    • @jotarokujo312
      @jotarokujo312 4 місяці тому +1

      I've understood basically everything before this vid, I'm really struggling with OOP

  • @HairoHeria
    @HairoHeria 8 місяців тому +9

    by far the hardest lecture week so far. I'm having difficulty trying to understand the concept of OOP. Probably will take a look at another sources on this OOP concept.

    • @SREEVATHSARISE
      @SREEVATHSARISE 5 місяців тому +1

      hes using too much vocabulary then showing the real stuff its not good to understand that way

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

      Same

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

    Note that from about 1h 14 minutes into the video, if you don't have Python 3.10 or higher, you'll get a "SyntaxError: invalid syntax" for the match self.patronus: line since Python 3.9 and below DOES NOT support the match/case syntax

  • @BerkGoknil
    @BerkGoknil 9 місяців тому +1

    If you're scared of OOP, watch it from start to finish, you'll see how easy it is. One of the few teachers in the world. God bless you, David.

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

      It's easy and it's the wrong way of looking at software, too. ;-)

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

      @@lepidoptera9337 explain

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

    cs50 is a game change
    i really love it
    Thanks David and team

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

    I wish I could give more than one thumbs up, take my fingers and toes too... What a legend David is!!

  • @BieStrings
    @BieStrings Рік тому +84

    Anybody else feel like this was the hardest lecture to understand to date?

    • @raiyan9956
      @raiyan9956 9 місяців тому +5

      man i have already watched it twice and it still feels equally hard 😥. Although i've watched the regex video in 2x speed and that was very easy, but this topic is something

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

      Yeh v much so

    • @abdou_belounis
      @abdou_belounis 8 місяців тому +1

      Absolutely

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

      ​@@abdou_belounissearch up Corey Schafer watch his videos of first class variables then closures then decorators then his playlist of 6 videos on object oriented programming . You'll gain a better understanding trust me

    • @kellzbaker
      @kellzbaker 8 місяців тому +1

      search up Corey Schafer watch his videos of first class variables then closures then decorators then his playlist of 6 videos on object oriented programming . You'll gain a better understanding trust me​@@abdou_belounis

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

    00:18:39 - Dictionaries
    00:59:49 - Validating Attributes
    1:34:00 day 3
    2:03:00 day 4

  • @_carbon.acid_
    @_carbon.acid_ 2 місяці тому

    He puts so much energy and effort in teaching ❤

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

    For the first time in this course, professor said “This was cs50”. It brings back memories from cs50x 2024 😭😭 they used to say it in every class 😭 really miss those golden days ❤

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

    This man knows how to teach! 👏

  • @ardin222
    @ardin222 2 роки тому +10

    Hello friends, I hope you are at your best time ever.
    CS50 has been one of the best courses I have attended so far. 👍
    unfortunately this part is very difficult for me, even though I have watched this video many times, but I still cannot solve the problems of this lesson.
    I don't know how to get through this part !!!🚑🚒🚑🚒🚑🚒

    • @akish933
      @akish933 2 роки тому +7

      There is a community on discord and people are very helpful with each problem set. Check it out!

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

    I feel like standing under a waterfall of his energy, knowledge and enthusiasm! So so so awesome!!! Thank you so much David! It's a kind of magic!
    Btw, what's David's patronus?

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

    Awesome lecture. Wonderful teacher & teaching!!

  • @RomiVa...
    @RomiVa... 2 місяці тому

    This course is amazing. thank you for this opportunity❤

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

    self is there because in reality the first thing that happens is __new__ constructs the object and then when __init__ runs, it takes the just instantiated object as the first argument, i.e. self.

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

    This IS a lot of syntax in one shot. More of the step-by-step walking through what the code is supposed to be doing as in previous lectures would be helpful to encourage understanding. I'm sure that would add some time, but at 2:47, it's already almost worth breaking into two lectures.

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

    Let's have a brief silence for the folks who are still living in a world without this cs50.

  • @sushmasingh9040
    @sushmasingh9040 4 місяці тому +1

    Inheritance is the best and my personal favourite topic i leraned in cs50p

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

    CS50 team you aur doing great work Adding value in our life
    Iam a new subscriber in your channel and i will continue this searies after my MHTCET PCM This is a state level Exam and get admission in CSE it take around a month because my exam is in 11th August 2nd shift

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

    Man needed OOP for exams ..the premiere came in clutch 😂💞💞

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

    Learning python -> Super Class
    Learning more_about_harrypotter -> Sub Class

  • @skafiend4319
    @skafiend4319 10 місяців тому +2

    I was so confused about @property and setter, so I tested it a little on my own:
    - basically, when we declared our property, we told python to treat an attribute now like read-only, so if we try to do any assignments without defining a setter, we get AttributeError: property 'name' of 'Student' object has no setter. that's why we have to declare a setter after getter.
    - We can name our property function however we want, and it'll work, for example:
    class Student:
    def __init__(self, name2, house2):
    self.name = name2
    self.house = house2
    # Getter for name
    @property
    def thing(self):
    return self.name
    print(student.name)
    print(student.thing)
    but in this case if we want to prevent incorrect inputs, we have to do it twice in our constructor and setter, and that doesn't seem like a good thing to do.
    I need some time to wrap my head around the lecture :D

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

      The problem with suppressing "incorrect" inputs with a setter is that you are making it impossible to test your code from the outside against the case that the variable takes on an incorrect value. It's a naive strategy that sounds and looks good on the outside but causes nothing but grief for the programmer, the test team and the user later. It also requires that your are locating entry error recovery code inside a business function... which architecturally is an absolute no-no. That's something the frontend has to take care of. Don't do it.

  • @Thanos-Cassoulet
    @Thanos-Cassoulet 2 роки тому

    so much free content thats amazing tysm. TY Malan for all your amazing lectures

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

    Thank u a lot for sharing knowledge in a very interesting way!!!

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

    Learned so much from Dr Malan's lecture!

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

    Malan you are a great teacher.

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

    this man has taught me so much

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

    I loved this. I knew the theory, but it made me understand some concepts better.

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

    Can someone help me undrestand a change in the code?
    At 1:15:20, david writes the "charm" method, using match to figure out which emoji to return.
    However a bit after that, while he shows the code, it's shown to have been changed to use a series of conditionals instead.
    There's probably been some editing of the video but I still wouldn't understand the reasoning by which to choose a specific path to code the method.
    Thanks in advance!

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

      case is just an alternative way to check multiple cases for matching values. the long way would be chains of if/elif/else. explanation is in the first lecture here: ua-cam.com/video/_b6NgY_pMdw/v-deo.html
      the change in code here is due to editing of the video, there were unedited lectures on this channel where he corrects or modifies minor stuff on the go and then it is edited down

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

      @@nikitarasskazov4715 thanks a lot!

  • @MyFavoriteBand
    @MyFavoriteBand 6 місяців тому

    He made me to watch Harry Potter again! The best course for Python beginners

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

    Nice tutorials is much more simple than I thought

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

    We’re so lucky listening to the G.O.A.T.

  • @MaziarHeidari-i4e
    @MaziarHeidari-i4e 6 місяців тому

    About the 93 min , when Mr.Malan is asked why isn't _house being used in the init, i think there is better answer . The thing is that self.house is not a field, it's the setter itself which return a self._house so house is the setter and _house is the field . Thank you cs50

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

    The greatest professor ever!

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

    You are the best teacher

  • @ТатьянаЛарина-ш8у
    @ТатьянаЛарина-ш8у 2 роки тому

    Здорово! Складна тема дуже доступно викладена

  • @BodySnatchers-v5f
    @BodySnatchers-v5f Рік тому +1

    could i make a suggestion? When students ask questions use an overlay in the upper right /lower right corner instead of blanking out the whole screen.
    It is a bit jarring when focusing on the code and listening.
    🥰love the videos thank you.

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

    Cs50 team you’re the best❤

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

    Beautifully taught ❤impeccable

  • @bmaellet
    @bmaellet 2 роки тому +5

    ❤️ CS50 Lectures

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

    I evolved from Pikachu to Raichu in the python world after this lecture . Thanks professor.

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

    i dont want to start a conspiracy theory.... but did you ever notice how the questions asked just tie right into the next topic david is about to get into?

  • @LAAL0_O
    @LAAL0_O 7 місяців тому +2

    0k usually its the exercises are the hard part, but ngl this lecture is more difficult to wrap my head around then any exercise so far. saying that I can't even imagine how hard the exercise is going to be😅

  • @MartaBayou
    @MartaBayou 25 днів тому +1

    I'm from Ethiopia Addis Ababa

  • @debbahisaad109
    @debbahisaad109 2 роки тому +16

    In my humble view, it is fine illustrating OOP concepts using a flexible language/syntax like python, but the real truth is, if one considers going OOP at full scale, C++ or Java would be the most relevant way to go... I'm no python expert but few weeks ago I've started prototyping a numerical model using python, I naively went on writing some code to overload "the default constructor", as can be done in C++ seamlessly, it was a nightmare, even on stackoverflow I've gotten to a point where it was all about workarounds and trick this or that, which gave me a very bad insecure feeling about the OOP implementation completeness in python. So OOP concepts implementation maturity and language completeness around these concepts are indeed of crucial importance when choosing which OOP language to use for problem solving.

    • @GG-uz8us
      @GG-uz8us 2 роки тому +1

      Python is more suitable for functional programming.

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

      I agree with mostly of what you said yeah, it’s about using OOP patterns to allow the code to evolve with problem so building In factories, decorators ( wrapper not python attribs !) and the occasional ABC as a pseudo interface helps a lot. Python can do it but yeah, better suited to web scripting than real engineering problems currently solved by oop languages.

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

      Google:
      1. Fragile Base Class syndrome
      2. The definition of Monads
      Then avoid Object Oriented Programming and Functional Programming. They are both useless.

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

      I really hate people who recommends some random language in a language specific course like what's the point? If a project is written in python that won't change also you can't change languages like clothes if you try to learn language for some and another for something else you won't make progress unless you're a genius or you already know at least one

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

      Oh sorry i forgot to tell i tried some oop in c++ long ago, it felt like it all made sense, and in python it is a little weird but, yeah we're using python here so....

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

    Such a great teacher and such a great course. I've learned so much watching the lectures and working through the problem sets. I'm so happy this is a thing.

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

    21:16 da audio decrypting scene's incredible

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

    Excellent course.

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

    Dictionary vs classes. Classes give you error checking abolity before you populate it.
    Code defensively so that the user cabt change the atrributes. Decorators define properties
    Use class methods when you don't need to create objects of a class. You only use the class as a container for some functions and variables (no init).
    you do not automatically inherit all of init. You must use super().__init(name)__. Thus the init method of the subclass calls the init methods of the super class
    Exception classes are hierarchical in nature. This is why you can you "with Excception" to capture almost all exceptions

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

    Sorry for writing so many comments it's bc i get excited, which is really rare when it comes to educational videos/classes

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

      Glad to see someone as excited as me 😊

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

    Think positively

  • @fabio.1
    @fabio.1 Рік тому

    I'd love Java classes taught by David

  • @tuwi-me123
    @tuwi-me123 7 днів тому

    really really good course

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

    So... Is David Bombal speaking at minute 2:47:53 ? :)

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

    I took CS50X already, but I still found this lecture 8 is hard to understand for me 😭

  • @شیداعسکری-ل5ل
    @شیداعسکری-ل5ل 10 місяців тому

    Thank you Prof Malan❤

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

    *Massively helpful👌*

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

    Excellent Video Sir ..💜

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

    Not even once did Harry get into Slytherin while using random.choice(). Magic indeed

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

    David Malan is as awesome as always.

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

    2:12:31 to 2:13:22 David always crack me up at this part

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

    One question still remains: why light mode?

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

    This guy is amazing ❤