Hey folks!👋 Want to have hands-on practice on these concepts? 🤓 Try out CodeCrafters.io we have partnered and you can get 40% off 💸with this link: app.codecrafters.io/join?via=DevStory They have great hands-on tutorials and easy to get up to speed with complex systems. Check them out!
@NaumRusomarov3 жыл бұрын
I picked this video to watch not because it's the best, I don't know that, but because it's short. :-)
@ADevStory3 жыл бұрын
Nice! Yeah I'm trying to make them fairly short, though I keep failing to make them < 5 minutes AND useful :)
@johnnyxp642 жыл бұрын
And because is not another annoying Indian accent that makes your brain omelette, so instead of focusing to understand the point you try to slow down the fast bad English accent of the presenter and you are missing the point.
@jacktilley72992 жыл бұрын
Yes. Too many lectures in this industry
@ganybaba9377 Жыл бұрын
@@johnnyxp64 lol. Loser.
@demontime41922 жыл бұрын
I was trying to find a starting point to digest all this information but kept running into content that over explained and brought in new terms without context. Your vid was the perfect place to begin understanding these new concepts. Great examples and explanations without going too high level. Thank you!
@ADevStory2 жыл бұрын
Glad you enjoyed it and thanks for the feedback! Any other topic that you may want to learn about?
@persiansayed2 жыл бұрын
I have an interview tomorrow, and I just wanted to quickly revise some of the common topics. This is one of the best video I have found to understand SOLID principles. Thank you for this clear and concise video. 👍
@ADevStory2 жыл бұрын
Thank you for the feedback! Glad it was useful and good luck in the interview!
@kisan-majdoorkalyansamiti7390 Жыл бұрын
Lot of novice interviewer always ask methodology name rather than saying about challenges and asking solution . Always ask tell in your challenges and then I give solutions then 90% interviewer has no answer 😂😂😂
2 жыл бұрын
I would separate the vehicle into automatic vs manual, because there are also automatic combustion vehicles. Electric cars have a gear box similar to automatic cars, but specialized. Otherwise, great and concise explanation of the principles :) I had difficulty with understanding the liskov principle, but you've explained it well and now I get it.
@ADevStory2 жыл бұрын
Glad it helped!
@davepascual392 жыл бұрын
This is a great and short on how SOLID principles works. It really helps me understand the basic of it .
@ADevStory2 жыл бұрын
Thanks! Glad it was useful!
@ivaXP4 жыл бұрын
This was short and very easy to understand with the practical examples. Thanks!
@ADevStory4 жыл бұрын
Glad you enjoyed it!
@alexhandzhiev2 жыл бұрын
Thank you!!1 I have like 11-12 years of experience but just now I actually understood what SOLID means! Thanks again :D
@ADevStory2 жыл бұрын
Amazing! Glad it was useful!
@faithyintii84572 жыл бұрын
Wow, I just understood all this under 7 mins , thanks kind Sir.
@ADevStory2 жыл бұрын
Nice! Glad it was useful!
@david_ramoraswi17113 жыл бұрын
preparing for an interview and you made this concept way easier for me,thanks
@ADevStory3 жыл бұрын
Glad it was useful! That was part of my idea originally. You can check the playlist for other topics that are common in technical interviews. And BTW good luck in your interview!
@TheLovableRascal Жыл бұрын
A good, brief summary, thank you for taking the time to make the video 🙌
@ADevStory Жыл бұрын
Thanks! Glad you liked it!
@stevestorniolo2573 жыл бұрын
Awesome video for when I need to remind myself of these principles.
@ADevStory3 жыл бұрын
Glad it is useful for you!
@gabrielbott4659 Жыл бұрын
Wow thank you for this wonderful, im beginner teaching myself it very hard to find clear and concise materials on OOP. ;-)
@ADevStory Жыл бұрын
Glad it was useful!
@JustinK02 жыл бұрын
1:40 seems like a good way to use a façade pattern, the engine class can be the top level class with the other subclasses underneath,
@ADevStory2 жыл бұрын
I'm not sure I follow what you mean. At that time I'm talking about vehicle, engine and tire. Engine can't be a façade for those two 🤔
@pointer333 Жыл бұрын
another banger! thanks again!
@ADevStory Жыл бұрын
Glad you enjoyed it!
@harsh95587 ай бұрын
Great explanation,🔥
@ADevStory7 ай бұрын
Thanks you! Glad you liked it!
@silkogelman2 жыл бұрын
Very clear and to the point, thank you Christian! 🙏 The examples with the diagrams really made it clear, going to apply these in Python. Love to see more about these principles and design patterns. Liked and subscribed ✅
@ADevStory2 жыл бұрын
Oh so nice it was useful for you. Will make a few more on design patterns. Thanks!
@silkogelman2 жыл бұрын
@@ADevStory🥳I'm looking forward to them, thanks! 😀
@ruudiluca2 жыл бұрын
Thank you! This has been useful.
@ADevStory2 жыл бұрын
Awesome! Thank you! Glad you liked it!
@chrisdietrich15336 ай бұрын
Great explanation thank you
@ADevStory6 ай бұрын
Thank you! Glad you enjoyed it!
@prathieshnavekneswaran27462 жыл бұрын
Thank You! Helped a lot!
@ADevStory2 жыл бұрын
Thank you!
@vabav0072 жыл бұрын
Really well put. Thanks a lot for this.
@ADevStory2 жыл бұрын
Thank you! Glad you liked it!
@sebon113 жыл бұрын
Great explanation, clear examples :)
@ADevStory3 жыл бұрын
Thanks! Glad you enjoyed it!
@CloudGamingTheOriginal4 жыл бұрын
Great summary bud!
@ADevStory4 жыл бұрын
Thank you very much!
@markrankin40783 жыл бұрын
Good video, best and most concise I've seen
@ADevStory3 жыл бұрын
Glad to hear that!
4 жыл бұрын
Great video! Congrats, keep rocking!
@ADevStory4 жыл бұрын
Thank you mate! :)
@florianvanbondoc35392 жыл бұрын
Thank you, I really like the fact that this video was kept small.
@jamestill4172 Жыл бұрын
SOLID programming means abstracting your code, having classes depend on abstractions (like interfaces), and not other classes. The best code is simple and de-coupled, easy to modify without breaking everything, and easy to read. Single responsibility: Each class should have a single responsibility. Open/closed: Classes should be built to extend and be closed for modification. Liskov substitution: Changing instances with sub-types shouldn't break your code. Interface segregation: Delegate functionality to interface classes. Too many interfaces > too few. Dependency inversion: High-level classes should rely on abstractions (like interfaces) rather than on lower-level classes. You're inverting their dependency.
@AllanJeremy3 жыл бұрын
Subbed. Succinct and perfect refresher!
@ADevStory3 жыл бұрын
Glad you liked it!
@josemtz64303 жыл бұрын
great explanation, thanks!!!
@CS-eh8eo3 жыл бұрын
I don't think I understand what open closed principle REALLY means... Like how can a class be closed for modification? I think it's talking about using immutable objects and stateless classes, because it's the state of the class that can change. Open for extension on the other hand is saying you should use interfaces to swap out implementations, I don't think using inheritance is a good idea because you're tied to that base class, especially if the class is part of an Api. Basically you should program to interfaces so your implementations can be swapped out for different ones and your existing code doesn't change, new code is added. This is what open closed principle really means. What do you think?
@ADevStory3 жыл бұрын
Yeah the principles can be confusing. And the specific naming of the open/closed one it's tricky. I'd say the main idea is that in case you need to add behavior to a program/class, instead of adding the behavior to the class, make it easier to replace or extend the behavior of it. Not necessarily with inheritance I'd say. Here's an article that I think explains it very well. medium.com/@alexandre.malavasi/why-is-the-open-closed-principle-so-important-bed2f2a0d4c7 Let me know if it helped :)
@nishiths92283 жыл бұрын
Hi there , I really like these videos as it one of the best videos which explains about lot of important concepts required to be better dev and which is not found in the sea of KZbin videos … I would also like to know if there are any books that you would recommend for becoming a advanced java programmer starting from the basics .. you may recommend like for beginner this is best and after that this book is best … Thanks in advance ! Appreciate your hard work in creating such a quality contents with loads of essential stuffs in them for being a good and better dev … love your videos ! 💕
@ADevStory3 жыл бұрын
Oh thanks for the compliments 😀 regarding books on design patterns check out the description. Regarding java beginner java books I would recommend (though I haven't read) Head First Java , and Effective Java (this for all levels and it's quite nice).
@bonnoManus3 жыл бұрын
Topic was nice....but your explanation was not very clear. I appreciate you tried to explain this hard topic in a concise manner.
@ADevStory3 жыл бұрын
Thanks for your feedback! What can I do to make it clearer in the future?
@bariswheel3 жыл бұрын
Good stuff, thanks for posting.
@ADevStory3 жыл бұрын
Thank you for watching! If you feel it can be useful to someone else please share and also if you want me to cover other topics, let me know :)
@frankhernandez40572 жыл бұрын
Applying the Interface principle 4:43 wouldn’t this break the Leskov principle because you can replace vehicle with combustion since it has another method not used?
@ADevStory2 жыл бұрын
Nope, because you are specializing the classes. That's perfectly ok. What is not ok (according to Liskov) is if Vehicle has methods that can't be implemented by either Electric or Combustion (for example, shift() method). Hope is clearer :)
@TheAlexanderpietsch6 ай бұрын
I wonder on min 5:11 where there is an composition drawn between Vehicle and Tire, shouldn't the owning (filled diamond) be on the Vehicle side?
@yehuda49043 жыл бұрын
Wow, thank you so much for sharing the information... Very clear :)
@ADevStory3 жыл бұрын
Glad you enjoyed it!
@quinnyboym62823 жыл бұрын
On 5:13 these open arrows mean "is-a" right? But then it says on the bottom a Bike is a Tire and a Car is a Tire, what am I seeing wrong here? Thanks for the helpful video tho, just don't understand this last thing. Exam tomorrow... ahaha
@ADevStory3 жыл бұрын
Yeah the arrows mean "is-a" and sadly by being lazy the diagram is wrong: I meant a "BikeTire" and a "CarTire" are both tires
@tulikagupta50094 жыл бұрын
Great content and easy to follow. Can you also make videos on gang of 4 creation design patterns?
@ADevStory4 жыл бұрын
I did already :) kzbin.info/www/bejne/l5q2coJodr2Ub8k
@tulikagupta50094 жыл бұрын
@@ADevStory I saw those also. Very easy to understand. Never knew so many benefits of builder pattern.
@ADevStory4 жыл бұрын
Glad you enjoyed them!
@kevingreetham417511 ай бұрын
What I’ve never been able to understand tho is how do we know what engine and tyre refers to what car though if they are not stored within the same class? Do I have a common id between classes or should I store the engine and tyre classes as properties of the specific instantiated car object and provide methods from the car object which target thr internal class ?
@ADevStory11 ай бұрын
It depends, if your class relies directly on a specific behavior of an implementation then you need to include that one. For example: A Toyota Camry requires engine X. But sometimes you might even generalize it and say: a Toyota Camry has an engine. The constructor for ToyotaCamryCass only needs to recieve an object of type "engine" and doesn't care which specific engine it is.
@ADevStory11 ай бұрын
Hope it makes sense
@Name-lt2tz3 жыл бұрын
what I hate when coding and there are injected interfaces, it is hard to find which class will be injected when interface is implemented by few classes. I have to debug then - not readable code, I cannot tell just by looking at the code. I see good programmers not using interfaces everywhere so this makes me doubt readlly that this is useful thing to do.
@ADevStory3 жыл бұрын
It depends. Using interfaces allows for better code decoupling, easier testability and better maintenance. Having said that, in many cases you end up with code that depends on interfaces where there will "always" be only one implementation, or that it isn't expected to change "almost ever" (i.e. you don't expect a dependency injection framework to dynamically inject other dependencies, don't expect polimorphism). This, tied with the capacity of more recent testing frameworks like Mockito that allows to mock concrete classes, doesn't require to have explicit interfaces. Code complexity by having interfaces shouldn't be greater either, and most modern IDEs (if not all) allow to easily navigate through the interfaces and specific implementations.
@Name-lt2tz3 жыл бұрын
@@ADevStory at least PHP storm - if I click on dependency which is injected using intereface, it moves me to interface. And then can navigate to classes implementing the intereface. Ide suggests those classes but it does not know which one is being injected. So I only can find by debugging.
@ADevStory3 жыл бұрын
Oh I see. I think in that case it's more about how easy is to understand the framework dependency injection configuration than about using interfaces.
@edymbhify3 жыл бұрын
Fantastic explanation, just missing code examples, on git.
@ADevStory3 жыл бұрын
I can create some and paste them later. I'm intentionally trying not to show code in my videos, and focus more on the concepts.
@ReporterTorizo3 жыл бұрын
The examples threw me off COMPLETELY because I didn't know that electric cars don't have transmissions.
@ADevStory3 жыл бұрын
Sorry for that. On the bright side you now know about cars and object orientation 😅
@georgedulica2925 Жыл бұрын
Dependency inversion seems to be similary with interface segregation
@ADevStory Жыл бұрын
They all relate but are different :)
@rafadydkiemmacha75433 жыл бұрын
It's always so easy with those examples like Cars and Animals, but then in real life projects those principles are extremely hard to use. And almost nobody does, at least in huge projects.
@ADevStory3 жыл бұрын
In my experience they are used extensively in any maintainable project. The thing is that it depends a lot on the domain so the examples would be way more specific in that sense. But factories, singletons, decorators, adapters, proxies, and observers are probably some of the most used ones.
@poojaguru25163 жыл бұрын
Good one!
@ADevStory3 жыл бұрын
Thanks! :)
@alialwerfally64973 жыл бұрын
thank you so much
@ADevStory3 жыл бұрын
You Are very welcome!
@zeekcom123 жыл бұрын
Thank you!!!!!
@ADevStory3 жыл бұрын
You're welcome! (With Maui's voice) 😁
@mitrabest97562 жыл бұрын
Good keep going 👍
@kisan-majdoorkalyansamiti7390 Жыл бұрын
Lot of researcher to show they given new concept it is biggest stupidity. Main thing is missing what are problems and to solve what are possible solution then we can say this methodology solve this way . Lot of novice interviewer always ask methodology name rather than saying about challenges and asking solution .
@Name-lt2tz3 жыл бұрын
open closed principle - I have seen such in codebase when there is abstaract class and you have to implement methods. But I do not see its benefit. I have needed for example add parameter to the method of child class. So I have to add parameter to parent class so the method definition would be same. At least in php, otherwise you get error. But this parameter is not needed for other child classes, so solution is to have unused parameters in function. Now I think another solution could be to pass some objects implementing some interface and they could have one interface but completely different amount of parameters.
@ADevStory3 жыл бұрын
Yeah you are right :) and that's great that you have experienced this. There are different things to take here: - Code is not supposed to be static. It will change overtime. If you notice part of the code that is always changing while other parts are always static, then that dynamic part is candidate for extraction (like you said, with interfaces). So the Open/Closed principle is not so much about "writing once and not touching ever" as it is more about keeping the things that don't change or are common in one place while allowing for extending that behavior elsewhere. - IMO SOLID principles shouldn't be seen in isolation from one another. In this case Open/Close Principle relates a lot with others like Single Responsibility principle. If a class has it's responsibility well defined and is implemented according to that, any extension to the responsibility elsewhere should be done outside that class. And of course, if the responsibility of your class changes (requires new params, calculations changes, etc) then the responsibility of your class must change accordingly. Hope it's clearer :)
@carlosalarcon27373 жыл бұрын
Thanks
@ADevStory3 жыл бұрын
You are welcome!
@Name-lt2tz3 жыл бұрын
why single responsiblity is not called like high cohesion principle instead? that would be real name, because single is a lie then, at least from what I see people doing.
@ADevStory3 жыл бұрын
Well is not only about cohesion but actual responsibility. If I understand your point correctly in this case a "single responsibility" is a subset of "high cohesion". You could have high cohesion with multiple responsibilities and that's not the purpose of the principle.
@Name-lt2tz3 жыл бұрын
@@ADevStory but I never practically see single responsibility. For exmaple most controllers have methods like this: create, update, delete, list. How this is single? 1 create, 2 update, 3 delete, 4 list. For responsibilities.
@ADevStory3 жыл бұрын
That part gets philosophical sometimes. You could split each of those operations in different classes too. The important thing is to have the responsibility clearly scoped. For example, if it's UserController: responsible for handling user registration.
@pointyneedle78374 жыл бұрын
Nice , please add subtitles
@ADevStory4 жыл бұрын
Will add!
@raphaelmacsa19923 жыл бұрын
3:01 Java code inside Visual Studio... LMAO 🤣
@ADevStory3 жыл бұрын
Haha you noticed!
@OmoruyiOmofonmwan2 жыл бұрын
Why is that funny?
@YoungDev983 жыл бұрын
gj bro, thanks
@lilenoulitza4 жыл бұрын
I lost everything after the Single responsibility :p lol i must be so stupid
@ADevStory4 жыл бұрын
What did you miss? Is it clearer now?
@yehuda49043 жыл бұрын
Yes, these are hard concepts that takes years to understand... Unfortunatly, it can be understood with experience or some one explainning it face to face...
I hate studying for this boring as programming crap
@aleksanderm19472 жыл бұрын
Bro, buy a good mic.
@ADevStory2 жыл бұрын
I did! Checkout my newer videos :)
@av7332 жыл бұрын
can't understand your accent
@ADevStory2 жыл бұрын
Sorry about that. Did you try the English subtitles?
@ochoax26282 жыл бұрын
So sorry but your explanation is not clear. I can read powerPoint presentations as well. The examples given in this video are not useful. Keep improving.