Polly want a message Sandi Metz

Sdílet
Vložit
  • čas přidán 2. 06. 2024
  • Sandi Metz explains what object-oriented programming wants, using straightforward examples to indoctrinate you into object-oriented thinking. You’ll be raring to write loosely-coupled, message-centric, small-object object-oriented code that isolates conditionals and leans on polymorphism. Once you understand object-oriented programming's natural affordances, everything becomes easy.

Komentáře • 24

  • @ChillerDragon
    @ChillerDragon Před 4 lety +4

    wow did i just watched the full 40 mins. Interesting talk I guess I finally understood that polymorphism means addapting to the same api.

  • @TheKokoG
    @TheKokoG Před 5 lety +9

    It's just wonderful. So clean, easy to understand, ... Congratulations!

  • @ross2204
    @ross2204 Před 5 lety +12

    Thanks for sharing Sandi, I love your work!

  • @donjciii
    @donjciii Před 5 lety +12

    Great talk, Sandi, thank you :-) !

  • @kim15742
    @kim15742 Před 3 lety +2

    I enjoyed this talk and I like having these examples that clearly show what's wrong and how to fix it. These are not OO patterns, though. You can do all of this in any functional language and even in C with function pointers. And if you are choosing between just two choices then I really must wonder how much better a class/function is compared to an if condition. You can still take out the if condition from the original function and put it in its separate function/class/whatever you like. Your code will be much faster and you'll concentrate more on what actually needs to get done

  • @layerok315
    @layerok315 Před rokem

    This information is pearl. I regret I didn't know it in the beginning. How much terrible code wouldn't be written. Thanks

  • @robertjones811
    @robertjones811 Před 4 lety +2

    Go ahead, make my day. And you did, Sandi! I will forever more be referring OO noobs to this video, and most especially _Procedures vs OO_ (at time 6:00 ). This gem should be on StackOverflow with its own tag - "OO Zen".

  • @Spiun666
    @Spiun666 Před 4 lety +7

    People don't say "I can't write code like this" because they don't trust the objects to do the right thing. They say it because abstractions don't always remove cognitive cost, sometimes they add it. The cognitive cost is added when the roles are chosen poorly: people don't know what a justifier is, or what a subsetter is, or what a source is. These ad-hoc abstractions are a product of the programmer's mind and have to be carefully documented and explained once introduced.

  • @BeALeaderAndAnInspir
    @BeALeaderAndAnInspir Před 3 lety

    I have just found out that Sandi makes a CZcams channel. Please keep posting amazing work, Sandi...

  • @SalixAlba256
    @SalixAlba256 Před 5 měsíci

    I like the idea that OO affords certain styles of programming.

  • @elisson357
    @elisson357 Před 5 lety +2

    Thanks for Sharing This.

  • @VictorMartinsPT
    @VictorMartinsPT Před 5 lety

    Really good, thank you Sandi :)

  • @ratias0
    @ratias0 Před 3 lety

    I loved it. Thank you very much for this

  • @VictorOrdu
    @VictorOrdu Před 5 lety +1

    I found this refreshing. Thanks Sandi, for sharing your wisdom. Where's Part 3 and 4?

    • @medthehatta
      @medthehatta Před 5 lety

      I think she misspoke a little when she said "part 2". Parts 1 - 3 of her original numbering are part 1 in the misspoken numbering. Part 4 is the part 2 she misspeaks.

    • @ElectricScribe
      @ElectricScribe Před 4 lety

      You need a Factory to get Parts 3 and 4. ;)

  • @joshuacarlson4558
    @joshuacarlson4558 Před rokem

    Great talk!

  • @ElectricScribe
    @ElectricScribe Před 4 lety

    Fantastic talk, well researched and explained but I think one mistake on the code. At 36:32 you can see .new(...).lines -> each sub-class calls 'lines'. At 37:00 when that logic is moved to the factory the .new does NOT call lines on the sub-classes. Hence the factory will return an instance of the subclass, and not the result of calling lines as before. At 37:16 you say it will 'give you back the right thing' but actually it will give you back the class instance, and not the result of calling lines. Because Clump.lines is calling the factory lines method, not the sub-class lines method.

    • @AlexZavalny
      @AlexZavalny Před 8 měsíci

      New calls lines of subclass, actually. So no mistake here

  • @rushyscoper1651
    @rushyscoper1651 Před 5 lety +6

    Welp my whole program is a death star lol

  • @robertfwler5399
    @robertfwler5399 Před 5 lety

    She never mentioned where do you call Listing class, in a script? in another method? in a factory?

  • @wulymammoth
    @wulymammoth Před 5 lety

    Watched this 3x and while sometimes OO seems contrived what you've spelled out is such reprieve

  • @happytrippy69
    @happytrippy69 Před 3 lety

    Ayy my name is sandi! and why it 40 mins? why don't u play ronblox