2:36 is just pure perfection god I hate confusing internet articles
@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 Жыл бұрын
cool to hear real meaning of the principle from first hands. thanks
@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.
@kapsi2 жыл бұрын
One of the heroes that created computing and changed the world forever.
@VastyVastyVoid6 ай бұрын
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.
@louisfrancisco21713 ай бұрын
Created computing? What age was she? 7? (and I'm being generous, as computing was created long before that)
@kapsi3 ай бұрын
@@louisfrancisco2171 are you stupid?
@loyyeeko12314 ай бұрын
"subtypes behave like supertypes.", short and clear, end al the confusions
@ahmadganteng743511 ай бұрын
Beautiful idea, Maam.. This principle is very important to understand
@NatarajSubramanian3 жыл бұрын
Wow! Thanks for uploading this! 🙏
@itorrestp2 жыл бұрын
Without this woman, probably i would not able to write this comment.
@IndependentSpirit19232 жыл бұрын
Big respect to this intelligent lady.
@aaronza72188 ай бұрын
Finally! I understand. Thank you for sharing this video!
@dionkim3 жыл бұрын
Thank you!
@muskduh2 жыл бұрын
thanks
@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
@samuelskean63129 ай бұрын
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!
@wardibald3 ай бұрын
@@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.
@lorenzrosenthal1192 жыл бұрын
"Behavioral Subtyping" (subtypes behave like supertypes) is much more intuitive than "Liskov Substitution Principle"!!
@gloverelaxis2 жыл бұрын
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!
@arpanmukherjee462511 ай бұрын
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.
@aaronza72188 ай бұрын
100% agree!
@talideon6 ай бұрын
@@gloverelaxis I'm pretty sure she didn't name it after herself.
@thevitto23 Жыл бұрын
Is she Barbara Liskow?
@ArtemidorosEuthymius6 ай бұрын
No, that's me
@Trick1e2 жыл бұрын
i don't know why but this is so wholesome
@MichaelKingsfordGray2 жыл бұрын
Anonymous coward.
@shanep71313 жыл бұрын
AMAZING
@beegdigit981111 ай бұрын
This is THE explanation from the CREATOR, so sad other videos on this subject have more views
@luke_kode2814 ай бұрын
Subtype behaviour like SuperType
@gloverelaxis2 жыл бұрын
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-sb6vc2 жыл бұрын
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
@martinkrauser40295 ай бұрын
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.
@Valdivia94945 ай бұрын
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_Rambo2 жыл бұрын
A very simple explanation she said - Behavioural subtyping - subtypes behave like super types 👍👍
@jja77a2 жыл бұрын
that's not what she said at all!
@Dirty_Rambo2 жыл бұрын
@@jja77a : watch the video once again from 4:05. You can apologise later 😂
@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
@nickbarton31915 ай бұрын
How much confusion there is out there about this principle.
@orek7327 Жыл бұрын
So ummm. Liskov is woman ?. I tought she is man
@martinkrauser40295 ай бұрын
thinking about why you thought that is something for you to think about, innit
@soonhongng70375 ай бұрын
cheers matr
@vadimemelin29413 ай бұрын
Come on man, don't show that you didn't pay attention so much that you didn't some googling on the subject