S.O.L.I.D. | Liskov Substitution Principle feat. Kotlin

Поделиться
HTML-код
  • Опубликовано: 6 фев 2025
  • Open Closed Principle Video: • S.O.L.I.D. | Open - Cl...
    Hello World, this is a practical overview of the Liskov Substitution Principle, as part of the S.O.L.I.D. principles popularised by Robert C. Martin.
    Thanks for watching!
    Follow me on
    Twitter: / konstantinosr92
    linkedIn: / konstantinos-reppas-48...

Комментарии • 19

  • @ibrahimylmaz8378
    @ibrahimylmaz8378 2 года назад

    Mister, even though I didn't fully understand a single sentence in this series, this is awesome! Thank you! I'll be re-watching these over and over again. It's a shame that real content creators don't get the credit they deserve.

  • @stefdinaki249
    @stefdinaki249 4 года назад +4

    I believe this is the first time I actually sat through the Liskov principle, thank you!
    Sound was the same as always for me

  • @mehmoodrehman6336
    @mehmoodrehman6336 2 года назад

    Excellent explanation!!!
    3) Introduction and explanation 0:00
    4) LSP Rules: 6:00
    a) Signature Rules: 6:35
    i) Method Argument types
    ii) Return types
    iii) Exceptions
    b) Properties 8:30
    i) Class invariants
    ii) History constraints
    c) Method Rules 10:00
    i) Preconditions
    ii) Postconditions
    5) Summary/Recap 11:15

  • @rafaelcagliari6747
    @rafaelcagliari6747 Год назад

    awesome video, just like the rest of the series!

  • @matt-g-recovers
    @matt-g-recovers 3 года назад

    Very Nice Kostantinos!
    Thanks, dude!

  • @MDDanishAnsariDev
    @MDDanishAnsariDev 4 года назад +2

    If Square-Rectangle example violates LSP. How can we refactor it? Is it even possible to do so?

    • @KonstantinosReppas
      @KonstantinosReppas  4 года назад +2

      Thank you for your comment!
      Well of course we can refactor it, but we would not use inheritance. It's a different shape, maybe we could use a base shape class that simply has number of edges or total perimeter etc, and make rectangle and square a subclass of the base shape class. But we should avoid the inheritance between rectangle and square, the way we would avoid an ellipsis being inherited by a circle for the exact same reasons. They are simply incompatible software-inheritance wise.

    • @MDDanishAnsariDev
      @MDDanishAnsariDev 4 года назад +1

      @@KonstantinosReppas Got it. Thanks for the explanation sir.

  • @Sc2MooDy
    @Sc2MooDy 4 года назад +1

    Amazing, thanks!

  • @JustTheHighlights
    @JustTheHighlights 4 года назад

    You might wanna reupload with better sound. The volume is very low compared to other videos.

    • @KonstantinosReppas
      @KonstantinosReppas  4 года назад +1

      Sorry to hear that, but at least at my speakers it's the same volume as before. Will look into it for sure though.

    • @JustTheHighlights
      @JustTheHighlights 4 года назад

      @@KonstantinosReppas Hmmm... for me it's much quieter compared to other videos. I tried on a couple of devices and I can hear the same thing.

    • @broncebronce100
      @broncebronce100 4 года назад +1

      I agree with sound, quite low than previous ones. Great video again

    • @KonstantinosReppas
      @KonstantinosReppas  4 года назад

      Thanks for the feedback, will try to turn it louder in the next video. :)

    • @kafran
      @kafran 4 года назад

      I agree with the sound. I had to raise the volume from 30 to 80 to get comfortable with this one.