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...
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.
I believe this is the first time I actually sat through the Liskov principle, thank you!
Sound was the same as always for me
thank you very much, i really appreciate it!
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
Really appreciated!!
awesome video, just like the rest of the series!
Glad to hear it! Thank you for your kind words!
Very Nice Kostantinos!
Thanks, dude!
If Square-Rectangle example violates LSP. How can we refactor it? Is it even possible to do so?
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.
@@KonstantinosReppas Got it. Thanks for the explanation sir.
Amazing, thanks!
Thank you very much! Glad you liked it :)
You might wanna reupload with better sound. The volume is very low compared to other videos.
Sorry to hear that, but at least at my speakers it's the same volume as before. Will look into it for sure though.
@@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.
I agree with sound, quite low than previous ones. Great video again
Thanks for the feedback, will try to turn it louder in the next video. :)
I agree with the sound. I had to raise the volume from 30 to 80 to get comfortable with this one.