I fully understood LSP when you said on 10:57 "they're trying to show us when we should not use Inheritance and when we shouldn't"
@abdullahbhojani47722 жыл бұрын
exactly!
@linjustek2 жыл бұрын
So the quote states, that we shouldn't use inheritance :D Or there is an error. :D. LSP is says that we should adhere to method argument and return types, when using implementation or when extending abstract declarations or overrides. Usually when you do not do that, but implement Interface with type declarations you get Type Error. 🙂 And we have to understand that type declaration can be abstract or interface, so child classes can be a fit for as an argument or return type.
@MrWilde3 жыл бұрын
I have been watching online training videos for more than 15 years and the you can spot a great teacher when they have as much energy and enthusiasm as you do. Fantastic video
@NdamuleloNemakh5 жыл бұрын
So basically it's, "whatever the parent can do, the descendants should be able to do that [and more]"?
@MilaBarross4 жыл бұрын
Omg, thanks a lot!
@lordmorgoth74 жыл бұрын
it's, "whatever the parent can do, the descendants should at least be able to do that"
@karthikeyancseskcet3 жыл бұрын
@@lordmorgoth7 great words
@soumavanag50253 жыл бұрын
@@lordmorgoth7 golden words
@ipodtouch4709 ай бұрын
Yes but the big caveat is just because the child must do what the parent is able to do does not mean the child has to do it in the same fashion
@McSeeMo_4 жыл бұрын
I imagine with the actual viral context you may have spare time to continue this series ! The crowd ask for it!
@waelsalama84 Жыл бұрын
Hey Christopher, Hope you're very fine! I got shocked why did you stop this serious.. where are other parts..?? You're awesome teacher and really you've the skill of explain things in a very clear and easy way.. please don't stop producing these kinds of videos. waiting for other parts .. really in a big need to them .. really appreciate your efforts .. Keep it up!
@SakethSusarla4 жыл бұрын
unique perspective and wonderful deconstruction, thanks for sharing :) it's 2020, still waiting for part 2...
@ringoaikocascade3 жыл бұрын
I am so excited for the part 2. Especially for the past several years I've been avoiding variance, covariance etc and could really use his intuitive explanation.
@michor103 жыл бұрын
Yup, we're all waiting for the rest.
@jfilipcic2 жыл бұрын
Still waiting
2 жыл бұрын
Is part 2 ever coming? We are all looking forward to it!
@davidzhou98342 жыл бұрын
It's 2022
@MontagoDK7 жыл бұрын
part 2 ?
@bananek1316 жыл бұрын
+1
@sebastianvera58306 жыл бұрын
+1
@abderrahimouakki67346 жыл бұрын
+1
@pparturo20076 жыл бұрын
+1
@yevheniisemendiak25016 жыл бұрын
+1
@radu5log767 жыл бұрын
Thank you. You have really helped me understand Design Patterns and now SOLID. You are not assuming we know what you're talking about and that really helps get your knowledge across.
@ChristopherOkhravi7 жыл бұрын
Thanks! Your comment is super helpful :) Much appreciated :) Thanks for watching and for the feedback :)
@RocckeFella3 жыл бұрын
Bro you are doing a really good job. I really love the way you explain things.. more power to you.
@hana-games2 жыл бұрын
part 2 to save my life
@driden19873 жыл бұрын
Cristopher!! What will it take to have you create the video about covariance and contravariance ?
@schmidtlachАй бұрын
Good and funny. Christopher has a nice way of explaining difficult concepts in simple terms. I loved the video.
@kinvain4 жыл бұрын
Wow! It takes you only 16 minutes to explain me Liskov principle and finally I can understand it. You are simply amazing!
@cehdmoy6 жыл бұрын
Break Liskov is too easy, that's another reason because we should not use inheritance just for "reuse" code porpuse. Well if you know what are u doing, please feel free to use inheritance. But even Efective Java encurage developer to prefer composition instead of inheritance. My point is when we use inheritance IMHO we are so naive and we think that we can handle it, but finally we get a dog that acts like a airplane (LOL) and we have broken Liskov.
@alecc82313 жыл бұрын
Thank you Roberto. That's quick and easy to understand. If inheriting from dog you end up with an airplane = breaking of the Liskov's substitution principle. Quick and easy to remember. LOL. From now on I'm going to use your explanation.
@guzideesra47434 жыл бұрын
I swear, you should be the Dean of my University. Thank you a lot Mister Bean
@Vendavalez4 жыл бұрын
This is one of the best explanations for this principle that I have been able to find out there. For many of them I would walk away feeling like I understood everything that was being said, but not like a I learned something that I could apply, let alone ideas on how to apply it. I would love for this series to be completed if you have the chance or for you to address the topic as part of another series.
@TheLifeRockss6 жыл бұрын
2018 almost finished.. still no part 2? you can't do that to us mate :-)... Imagine Game of Thrones not releasing season 8
@hiteshchalise39885 жыл бұрын
now after watching season 8, I wish they didn't released it. lol
@avnishsinghtomar77835 жыл бұрын
we would have lived without season 8.
@yawar1106 жыл бұрын
Gist: The subtype MUST be able to do what its base type can do - Excellent clip! Keep posting good stuff.
@giveexamples7 жыл бұрын
Learn the most difficult things while your brain stopped and doesn't work with Cristopher's magical videos. Thank you man.
@StuartLoria4 жыл бұрын
When I study I vocalize my ideas similar to how Christopher conducts his presentations. I love the demystification of concepts in order to allow more people to get the job done, and enjoy engineering, no reason to be selfish or arrogant, these youtubers are fighting the good fight I think.
@ChristopherOkhravi4 жыл бұрын
💛💛
@jg56455 жыл бұрын
Chris
@a.rohimsama72225 жыл бұрын
Yeah, the same here I like him.
@vunguyenhoang37043 жыл бұрын
really hope to see the next part. You are amazing broo
@shaimaaaltaay51836 жыл бұрын
OMG thank you so much I have an exam on Wednesday and I was lost with LSP principle.... I never enjoyed a lesson this much before thank you again
@ChristopherOkhravi6 жыл бұрын
Aha. Great stuff :) How convenient :) :) Best of luck on the exam! 👍👍
@shaimaaaltaay51836 жыл бұрын
Christopher Okhravi I explained LSP to my friends before exam and they were like “oh that’s it 😮 it’s so easy” and I was like “yeah can you imagine “ and then gave them the link to your KZbin channel 😁 BTW DIP came in the exam not LSP 😂 except that scenario question with classes and DIP example I think I did well
@ooredroxoo7 жыл бұрын
The funny thing is that you had a video on Liskov Substitution Principle posted on July 2016, that was the video that made me discovery your channel.
@ChristopherOkhravi7 жыл бұрын
Haha :) Awesome! Super thanks for sticking around :D :D
@salmanahmedkhan39792 жыл бұрын
Preparing for exam and this masterpiece is pop up. Great Explanation
@janabodu33923 жыл бұрын
Mr Bean mastered design principles and became Christopher Okhravi...Great Explanation ...Thank you..
@ЕдвардГригорян-н6к2 жыл бұрын
the best explanation pf lsp. Please return to make these videos. You are one of the best teacher on youtube
@RamKumar-kv1fx4 жыл бұрын
I though I knew Liskov's Substitution Principle for around a year but its only today I understand it correctly. Thank you very much Christopher Okhravi
@sunilphanimanne6 жыл бұрын
Hey @christopher okhravi, I dont think 0(phi) need not be on the type T and the subtype S, what is being said (from my understanding) is - If there exists a property (on some arbitrary class or type) which takes T as an input then the same property should work even if invoked with the subtypes of T i.e S here. I hope you agree with me.
@sunilphanimanne6 жыл бұрын
... and to add to that, the 0(phi) can be present in T and S, there is nothing wrong in it though!
@rupn96333 жыл бұрын
Very Unique way of explanation, I have see many videos on SOLID principles , this one standout. Great!!!
@LucidFabrics3 жыл бұрын
Any chance that you could do a continuation for that video ? Many thanks!
@zbigniewcwiakalski72533 жыл бұрын
Ech. That would be super cool to hear more about this in the next episode .... Hope it's going to be created eventually ;) regards
@MultiPauwel6 жыл бұрын
Top Notch explanation, i'm not a native english speaker and i followed some guides on PluralSight, came here because i still didn't get. Now i heared u talking, it's darn simpel, once u get it! Thanks alot!
@nitendratiwari37092 жыл бұрын
Hi Chris, really nice explanation, but you know best part @ 5:36 which my daughter of 3.5 years Liked a Lot, She didn't understand the principle but she likes ur expression a lot ...!!!, Thanks
@jctkc6 жыл бұрын
You are the best man!! I've watched all your videos about Design Patterns and now I'm watching this and your explanation is simply great!. Thanks a lot!
@shubhankarpaul27403 жыл бұрын
10:08 is what you have been looking for .... EXCELLENT !!!
@tsvetanpetrov59713 жыл бұрын
Amazing! Usually, this is one of the hardest questions during interviews. Thank you for the hard work!
@rohitkalya3 жыл бұрын
Hi Chrisopher, Can you please post the 2nd part of this video.
@mufizshaikh84394 жыл бұрын
It was very easy to understand with the help of your video. Thank you
@Erdling1236 жыл бұрын
Not only a great explanation, this was entertaining as well.
@ronironion5 жыл бұрын
Awesome man! So easily served!
@iamyajivhere2 жыл бұрын
anybody has the link for part-2?
@cetiah4 жыл бұрын
I just recently learned from one of your videos that the snail would speak, but it would have a NullSpeaking behavior that's returned when you run Speak() on the snail.
@toooldtobejunior6 жыл бұрын
I think the only way to violate LSP is using "override" keyword for a method. Therefore if I did not use "override" I'm safe. Do you think it is correct?
@ChristopherOkhravi6 жыл бұрын
Good point. Very interesting. I’m not sure actually. I’m suspecting there’s some further complications around generics (i.e. parametric polymorphism, think T in C#) but I need to learn more before I can have an opinion about this :/ Sorry! But thank you very much for watching the video and dropping a comment!
@toooldtobejunior6 жыл бұрын
@@ChristopherOkhravi Thank you for making these videos. I absolutely love them.
@saurabhshukla49004 жыл бұрын
This video has useful content worth just 2 mins.
@slobom.67443 жыл бұрын
The force is with you, all Jedis should be ashamed of themselves! :)
@cepi243 жыл бұрын
Sir you are doing great job and seems you are enjoying it
@divyeshkumarbalar7732 Жыл бұрын
its been 4 years since i commented, still waiting for part 2 :)
@opsherx3 жыл бұрын
this guy is so excited hahah thank you man
@aymanshaawat5 жыл бұрын
I really hope that you continue this series. Or at least start a new one talking about the same topic.
@JaspreetChhabra3 жыл бұрын
One of the best explanations...
@naito0165 жыл бұрын
2020 year, after a lot of videos listening blah blah and blah about Liskov's Substitution, finally understand the Liskov Substitution Principle then I Think this video was awesome need the next one, it's pretty weird that KZbin is not showing part two on following video, go to authors channel, looking for the part two that never comes.
@aprendemusica19312 жыл бұрын
Love his passion teaching 💞
@gourangabhattacherjee66482 жыл бұрын
where are the other video of this playlist?
@shiblimohammadarafat66026 жыл бұрын
It's indeed a great lecture! I have been trying to understand Liskov's Substitution Principle for a long time. Obviously I had some understandings which is correct but I also had some confusions as well. But your explanation is so clear that now I don't have any confusion about it. Thank you so much.
@danielmilewski76592 жыл бұрын
cannot wait for part 2 !!!!
@sunnyshekhar8625 жыл бұрын
Just discovered your channel... And my my, What a fine job you have done explaining these concepts. I am from a non-Computer Science Background and even I was able to understand the logic in one go !! Seems like it's been more than an year that you did the 1st episode... Not sure why you dropped the Series... but like me many would love to see the 2nd and subsequent episodes in this series. 😇
@tomaszb96684 жыл бұрын
i can't find part 2 of liskov's substitution
@jeffdosser42517 жыл бұрын
Your vids are great. More ppl should be watching them.
@divyeshkumarbalar77326 жыл бұрын
Where is second part?
@Name-lt2tz7 жыл бұрын
12:02 - if S inherits from T, how it can not have T methods? It is not possible, at least in PHP. Also I do not understand why you call methods as properties? For me property sounds like class variable. This was confusing. Or maybe this principle means that you cannot have empty methods. Like if there is parent class called Animal and has method speak. And we create Snail which extends Animal, and automatically snail has method speak() but we make it empty, or it is empty in Animal class - then maybe this is bad?
@c4stus7 жыл бұрын
Great as always Christopher, love your videos and your way of explaining stuff, don't stop please :)
@davidecullen15 жыл бұрын
Thank you! You helped me understand this principle the day before an interview!!
@felipeignaciocastrojara50654 жыл бұрын
THANKS bro, love from Chile!
@taskapptaskapp31387 жыл бұрын
You are great man. You should have more views. I wish you all the best, greetings from Poland. :)
@tusherkhan75313 жыл бұрын
Thanks for making it easy!
@michaelhaddad21907 жыл бұрын
Thank's a lot! I thought it's hard to imagine how we could possibly break this principle, until one day I tried to add an instant messages feature to my program, and I created a "Participant" class, which inherited from "User". Then I realized that although a "Participant" IS A "User", I could not substitute "user" with "participant" anywhere in the program, and if by accident I do it in the wrong place, things will get really bad. That is when I realized that inheritance actually doesn't represent an "IS A" relationship, but rather an "IS A SPECIFICATION OF" relationship.
@ChristopherOkhravi7 жыл бұрын
This is a great example! Thank you very much for sharing!! :) :) Super helpful! But when you said “specification”, did you actually mean “specialization” rather than “specification”? Or, if the latter, could you please elaborate? Thanks again! :) :)
@michaelhaddad21907 жыл бұрын
Thanks! I did mean "specialization". Sorry... My English is not great :P
@bryancorea6783 жыл бұрын
Please continue this amazing videos
@AdrianBlogs5 жыл бұрын
I like your way of speaking you also speak English very well and I understand what you say
@rubenbasketpalencia6 жыл бұрын
You can also talk about he exception throwing. A subclass mustn't throw an exception that it superclass can not throw. (correct me if I am wrong) Thanks for your videos!
@mevadavatsal6 жыл бұрын
Thanks for the in-depth explanation. BTW @ 7:06 : the symbol is "Phi": en.wikipedia.org/wiki/Phi
@harishnamjoshi7 жыл бұрын
Chris you are a savior. Just love you videos. Waiting for next episode. 👍
@irgatyus30907 жыл бұрын
Thanks a lot man for your visionary approach. I'm about to get my dream job thanks to your educational channel. Keep up the good work.
@ChristopherOkhravi7 жыл бұрын
Wow! Thats cool! Congratulations for the new job! 🙂🙂
@stekl.h4 жыл бұрын
Lovely lesson! Thanks
@mrinaldhawan39592 жыл бұрын
Great videos man! Complete this series. I have already watched the Code Walks of SOLID. This came to my mind while watching this video. Not sure if this is a correct analogy! At 14:17 when Chris holds the RED and GREEN Markers on screen, We believe that GREEN is Subtype of RED. Lets suppose the Marker Caps are properties of the Markers. If we remove the Cap from RED and replace it with GREEN marker cap, it should fit perfectly as GREEN is truly subtype of RED.
@amirbeheshti9010 Жыл бұрын
If you state something is true about the PARENT type, It HAS to be true all the way down the chain ... Neat👌
@abdelaziz27883 жыл бұрын
pleaseeee continue the playlist u make it so simple
@firstlast19473 жыл бұрын
One thing I never understood about Liskov Substitution Principle is why it exists? I thought a core part of Object Oriented programming is that if you have a reference to a base class, it can refer to an instance of the base class or any derived class, since all of the derived classes "IS-A" base class. Or is Liskov the person who came up with that principle in Object Oriented programming, and that's why it is named after her? Otherwise, why give a name to something that was already a part of Object Oriented programming to begin with? It would be like someone deciding to name addition the "Bubba Joe adding principle", when addition already existed before Bubba Joe came along to give addition his name.
@gunarsekaran2 жыл бұрын
I watch many videos to understand about LSP, Finally i am got my inner peace🍻
@seres36947 жыл бұрын
hi, how do you read ϕ i have been searching for a while but i cant find how let x have a circle property be a property let x have a property be a property let instance of x be a property i got confused, can you help me out with the correct word.
@andersonchica71106 жыл бұрын
Are you going to explain the others principles?
@0xlilx05 жыл бұрын
Great explanation! Been reading about it for an hour and nothing made sense, but your video made it clear :)
@binhhq893 жыл бұрын
I can't find part2 of video
@misetro1234510 ай бұрын
Christopher would like a part 2 for this video
@suhas0027 жыл бұрын
Great work man .. you are making things easy to understand.. waiting for other principles ..
@talldutchguyk82473 жыл бұрын
Where is part 2?!?!!?!
@saurabhsuman49604 жыл бұрын
You are amazing. I love the way you explain. 👌
@asharnavya6 жыл бұрын
I am waiting for you next part of this series. When you are going to post ?
@the_unico2 жыл бұрын
Never knew Mr. Bean / Rowan Atkinson is a programmer. Great Content bro
@Name-lt2tz7 жыл бұрын
where are those other videos about liskov substitution principle, which you mentioned?
@georgebockari2896 жыл бұрын
I'd really love to see you pick this back up.
@ossamabounnite49227 жыл бұрын
Thank you for the explanation, Christopher. But, what I don't understand is, this principle is always true in Object-Oriented Programming where a type can be always substitutable by its subtype. Can you, please, provide some examples where this principle is violated. Thx again!!
@kevinbenavides926 жыл бұрын
Thank you Chris. Please continue this series on the SOLID principle if possible. Your the best.
@ChristopherOkhravi6 жыл бұрын
Thanks! Will do :) Thanks for watching :)
@UrzaRage7785 жыл бұрын
You're fantastic at explaining things! (Much like Tim Corey) - where'd you go?!
@IlyaShap2 жыл бұрын
Wow! You’re an awesome teacher. Thank you so much!
@Name-lt2tz7 жыл бұрын
Also question - if we want Snail to not have method speak, but snail is still animal, then maybe we just remove speak method from the Animal class. And maybe create some class SpeakingAnimal which has speak mehtod() which extends Animal. And since Animal will not have speak() method, we can make Snail extend Animal.
@yogini13513 жыл бұрын
Hello Christoph, You are awesome. I think I have watched almost all of your sessions on design patterns. This one is also amazing and simplified, but I didn't find the part 2 in this playlist. Could you please help with quick link?
@pawekrzyzak43454 жыл бұрын
I have still waited for the next one!
@soufrk7 жыл бұрын
Really makes it's simpler to understand !! Way to go
@ChristopherOkhravi7 жыл бұрын
Thanks! I’m glad to hear :)
@B-Billy7 жыл бұрын
Woow... That was awesome Please keep it up.. Great job And yeah, thanks for sharing. BTW, I missed that cat 🐈 LOL
@abhilashbandi38667 жыл бұрын
Thanks for this :) I believe understanding SOLID will help in understanding Design patterns a lot better.
@ChristopherOkhravi7 жыл бұрын
Thanks! I’m glad to hear :) It’s all connected indeed! :)