Liskov: The Liskov Substitution Principle

  Рет қаралды 23,072

Turing Awardee Clips

Turing Awardee Clips

Күн бұрын

Пікірлер: 44
@amirkhazama7464
@amirkhazama7464 2 жыл бұрын
2:36 is just pure perfection god I hate confusing internet articles
@mydadletsmeshootatcats6754
@mydadletsmeshootatcats6754 Жыл бұрын
Tell me about it. Been trying to grok this from other videos and articles. It finally clicked when I heard this explanation.
@user-fg6ng7ej6w
@user-fg6ng7ej6w Жыл бұрын
cool to hear real meaning of the principle from first hands. thanks
@GodofStories
@GodofStories Жыл бұрын
Great to see a legitimate women pioneer. Who many girls could see for inspiration as sadly many don't have role models to look up to in comp sci/tech.
@kapsi
@kapsi 2 жыл бұрын
One of the heroes that created computing and changed the world forever.
@VastyVastyVoid
@VastyVastyVoid 6 ай бұрын
Yeah. What's great is that she's really pragmatic about it, too. She uses plain words to describe it because to her, this isn't some ivory tower principle, it's something she actually understands on a fundamental level. I feel we're teaching this badly.
@louisfrancisco2171
@louisfrancisco2171 3 ай бұрын
Created computing? What age was she? 7? (and I'm being generous, as computing was created long before that)
@kapsi
@kapsi 3 ай бұрын
@@louisfrancisco2171 are you stupid?
@loyyeeko1231
@loyyeeko1231 4 ай бұрын
"subtypes behave like supertypes.", short and clear, end al the confusions
@ahmadganteng7435
@ahmadganteng7435 11 ай бұрын
Beautiful idea, Maam.. This principle is very important to understand
@NatarajSubramanian
@NatarajSubramanian 3 жыл бұрын
Wow! Thanks for uploading this! 🙏
@itorrestp
@itorrestp 2 жыл бұрын
Without this woman, probably i would not able to write this comment.
@IndependentSpirit1923
@IndependentSpirit1923 2 жыл бұрын
Big respect to this intelligent lady.
@aaronza7218
@aaronza7218 8 ай бұрын
Finally! I understand. Thank you for sharing this video!
@dionkim
@dionkim 3 жыл бұрын
Thank you!
@muskduh
@muskduh 2 жыл бұрын
thanks
@NubeBuster
@NubeBuster Жыл бұрын
Could someone explain how code could even exist without this principle. Moreover, I dont understand how it would be possible to have either a stack or queue as a method parameter without knowing which it is. Most of my experience is in Java. Perhaps javas rules prevent you from doing this? Edit: chatgpt gave an answer which I couldn't have thought of. Say you have a super type Bird. Then a subclass Ostrich. Bird has a method called fly(). In Ostrich yoy would throw an exception because ostriches cant fly. That is horrible code and i completely see the value of this principle
@samuelskean6312
@samuelskean6312 9 ай бұрын
Code can certainly exist without this principle. Languages like C do not really provide ways to even describe subtype or super type relationships. It's pretty hard to write code in C where one type is conceptually a subtype of another. I'm honestly not sure how people approach problems that seem best expressed with sub typing relationships in C, but I know it's possible. For instance, if I had a function that needed to take some "collection" (dictionary, vector, or any other kind of collection) and act on every element of it, I could easily express that in Java as a method that takes a parameter of type "Collection". In C, I would (probably naively) create different versions of that function for every concrete type (every implementation of a collection) that I actually wanted to use it with. I'm sure there are better ways, even in C. The Bird/Ostrich example is neat, thanks for sharing that! At least for that case, Java has at least one feature that can help prevent that mistake: checked exceptions. If the exception in that example does not descend from the class RuntimeException, then you would have to declare the method fly as potentially "throwing" that exception or some super type of it. Because that declaration is part of the method's signature, you would have to declare that property in the signature of the fly method both on the class Ostrich and on the class Bird. So, you'd have something that looks like this in your Bird class: void fly(/* some parameters */) throws CannotFly { That means you've declared a fly method on Birds that you can clearly see sometimes fails to work. I don't think this is always a horrible idea as to how to define things, but it's certainly unintuitive. It doesn't technically violate the Liskov substitution principle here because we've said sometimes a Bird's fly method returns CannotFly - so the definition for Ostrich follows that rule. (I'm following the definition of the Liskov substitution principle here: en.wikipedia.org/wiki/Liskov_substitution_principle). However, if CannotFly were a subclass of RuntimeException, then this declaration would not be required, and you could more easily violate the Liskov substitution principle without knowing it. I hope this helps!
@wardibald
@wardibald 3 ай бұрын
@@samuelskean6312 The checked exception is not quite the greatest concept the Java language has ever had, and certainly in this example it's not a solution to using Liskov in Bird / Ostrich. One could have Ostrich inherit from Bird if you remove the fly() method from it (at first glance that would become a functional interface Flyer (containing only the fly()-method). Bird could still be useful for Egg layEgg(), void ruffleFeathers(), void peck() and so on, depending on what it's used for. One could argue that even the layEgg-method could be extracted, as non-birds can also lay eggs (so one has to check what's being modeled). The Liskov-principle is a clear call for being very careful with inheritance and that one should opt for composition instead whenever possible.
@lorenzrosenthal119
@lorenzrosenthal119 2 жыл бұрын
"Behavioral Subtyping" (subtypes behave like supertypes) is much more intuitive than "Liskov Substitution Principle"!!
@gloverelaxis
@gloverelaxis 2 жыл бұрын
i have huge respect for Barbara Liskov and her intellectual clarity, and her contributions to computer science should definitely be remembered, but it's also very important that we keep *everything* in CS as intuitive and simple as we can manage to, and that absolutely must include the names we use for things! "behavioral subtyping" is indeed a better name. it's ironic that it's the name she gave it, too, haha!
@arpanmukherjee4625
@arpanmukherjee4625 11 ай бұрын
I am gonna call it SOBID priciples now. 99% engineers can intuitively remember the usages and meanings of S O I D but not the L, because S O I D are intuitive names.
@aaronza7218
@aaronza7218 8 ай бұрын
100% agree!
@talideon
@talideon 6 ай бұрын
​@@gloverelaxis I'm pretty sure she didn't name it after herself.
@thevitto23
@thevitto23 Жыл бұрын
Is she Barbara Liskow?
@ArtemidorosEuthymius
@ArtemidorosEuthymius 6 ай бұрын
No, that's me
@Trick1e
@Trick1e 2 жыл бұрын
i don't know why but this is so wholesome
@MichaelKingsfordGray
@MichaelKingsfordGray 2 жыл бұрын
Anonymous coward.
@shanep7131
@shanep7131 3 жыл бұрын
AMAZING
@beegdigit9811
@beegdigit9811 11 ай бұрын
This is THE explanation from the CREATOR, so sad other videos on this subject have more views
@luke_kode281
@luke_kode281 4 ай бұрын
Subtype behaviour like SuperType
@gloverelaxis
@gloverelaxis 2 жыл бұрын
can't understate how happy I was when looking up Liskov Substitution to discover this critical idea was conceived by a woman in this catastrophically male-dominated field. we owe so much to the intelligence of women like Liskov, Hopper and Margaret Hamilton, and we should do everything we can to destroy every last vestige of bigotry in this industry, so everyone feels welcome to explore and improve computing
@walid-sb6vc
@walid-sb6vc 2 жыл бұрын
what? what bigotry? gender has nothing to do with it lol it's not like there's a system preventing them since waaay back 1930s there was Mary cury etc female scientists well recognised. STOP PRETENDING LIKE WE'RE SOME TYPE OF PATRIEARCHY it is what it is when women are smart and invent something it's immediately recognised period we shouldn't even have a debat about genders totally meaningless SCIENCE IS THE ABSOLUT nothing else don't involve it in political squabls
@martinkrauser4029
@martinkrauser4029 5 ай бұрын
Women started the field of software development from the ground up. It didn't become male-dominated until the mid-80 with the advent of personal computers, computers that were marketed to men and boys and that parents never bought for girls. Using one became prerequisite knowledge for college.
@Valdivia9494
@Valdivia9494 5 ай бұрын
OMG don't swallow the propaganda, it's nobody's fault that it's "male dominated", many women are awesome at Software Development, they simply don't like it as much as other things. It may be truth that there was marketing made towards men in the 80s, that's almost 40 years ago and the trend continues in this digital era where many has access to technology. Also you see the same trend in many countries where this sort of publicity wasn't predominant or didn't exist at all.
@Dirty_Rambo
@Dirty_Rambo 2 жыл бұрын
A very simple explanation she said - Behavioural subtyping - subtypes behave like super types 👍👍
@jja77a
@jja77a 2 жыл бұрын
that's not what she said at all!
@Dirty_Rambo
@Dirty_Rambo 2 жыл бұрын
@@jja77a : watch the video once again from 4:05. You can apologise later 😂
@Tumbledweeb
@Tumbledweeb Жыл бұрын
Is that super? Sorry, I know absolutely fuck all about programming languages. I don't even know how I ended up here... I must be a Subtype, following the lead of the Supertypes, yeah? :D No? Hm... Oh! One thing I'm REAL good at is getting software to glitch out, so... Anyone need a tester to thoroughly break what you've built? :D
@nickbarton3191
@nickbarton3191 5 ай бұрын
How much confusion there is out there about this principle.
@orek7327
@orek7327 Жыл бұрын
So ummm. Liskov is woman ?. I tought she is man
@martinkrauser4029
@martinkrauser4029 5 ай бұрын
thinking about why you thought that is something for you to think about, innit
@soonhongng7037
@soonhongng7037 5 ай бұрын
cheers matr
@vadimemelin2941
@vadimemelin2941 3 ай бұрын
Come on man, don't show that you didn't pay attention so much that you didn't some googling on the subject
MIT Professor on Data Abstraction & Object-Oriented Programming
15:44
Barbara Liskov, 2008 ACM A.M. Turing Award Lecture "The Power of Abstraction"
1:18:35
Association for Computing Machinery (ACM)
Рет қаралды 47 М.
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
37:51
bayGUYS
Рет қаралды 660 М.
Farmer narrowly escapes tiger attack
00:20
CTV News
Рет қаралды 15 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 25 МЛН
Wirth on the importance of abstraction to language design
3:48
Turing Awardee Clips
Рет қаралды 3,9 М.
Liskov Substitution Principle
20:16
Christopher Okhravi
Рет қаралды 14 М.
Liskov's Substitution Principle | SOLID Design Principles (ep 1 part 1)
16:08
Christopher Okhravi
Рет қаралды 160 М.
Kahan on HP calculators: Solve, Integrate and Matrix Operations
8:26
Turing Awardee Clips
Рет қаралды 13 М.
Dependency Inversion: What, Why & How? | By Example
12:17
About Clean Code
Рет қаралды 6 М.
The Man Who Revolutionized Computer Science With Math
7:50
Quanta Magazine
Рет қаралды 2,9 МЛН
AT&T Archives: The UNIX Operating System
27:27
AT&T Tech Channel
Рет қаралды 2 МЛН
Lamport on the origins of  Paxos
8:03
Turing Awardee Clips
Рет қаралды 4,9 М.
Master The L in SOLID
15:57
Zoran Horvat
Рет қаралды 8 М.
How principled coders outperform the competition
11:11
Coderized
Рет қаралды 1,8 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
37:51
bayGUYS
Рет қаралды 660 М.