Learn SOLID Principles with CLEAN CODE Examples

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

ความคิดเห็น • 345

  • @amigoscode
    @amigoscode  2 ปีที่แล้ว +17

    ► Get NordVPN exclusive deal here: nordvpn.com/amigoscode
    Try it risk-free thanks to their money-back guarantee!
    ► Grab your copy Clean Code copy here: amigoscode.hypg.es/amzn/clean-code
    ► Git Repo with examples: amigoscode.hypg.es/github/amigoscode/solid

    • @adhambaquroun898
      @adhambaquroun898 2 ปีที่แล้ว +8

      unfortunatly the link to the book is not working (Error 404)

    • @faridunberdiev8598
      @faridunberdiev8598 2 ปีที่แล้ว +2

      Assalamu aleykum, brother! Ramadan Mubarak 😁

    • @soto5987
      @soto5987 2 ปีที่แล้ว

      I use these shortcuts quite often, maybe it is useful for you too :)
      For mac
      Delete line at caret ⌘⌨
      Extend selection ⌥↑

    • @its_me_mahmud
      @its_me_mahmud 2 ปีที่แล้ว +2

      Github repo link is not working

    • @abdulazizzarifboyev6082
      @abdulazizzarifboyev6082 2 ปีที่แล้ว

      Design Patterns would be great

  • @blackberry-ke3fi
    @blackberry-ke3fi 2 ปีที่แล้ว +97

    Please make a video for Design patterns, as it will be beneficial for all developers. Thanks for your effort in bringing useful content to the community. Highly appreciated!

    • @fuckwdf
      @fuckwdf 2 ปีที่แล้ว +1

      Yes, we all need simple explanation about Abstract Factory and Factory Method

    • @user-rl5pb5un2f
      @user-rl5pb5un2f 2 ปีที่แล้ว

      @@fuckwdf Helpline📲📥⬆️
      Questions can come in⬆️

    • @user-rl5pb5un2f
      @user-rl5pb5un2f 2 ปีที่แล้ว

      Helpline📲📥⬆️
      Questions can come in⬆️..

    • @fiorini_mochachino
      @fiorini_mochachino ปีที่แล้ว

      @@fuckwdf Have you seen this: th-cam.com/video/ZFwNNsPW3-Q/w-d-xo.html ? Found it really clear.

  • @coderider3022
    @coderider3022 2 ปีที่แล้ว +95

    SOLID is a must know skill in OO development but I think we should be willing to modernise it and make it fit in 2022 when industry is moving towards functional coding. I’m a 20 year c# vet and do full solid on most projects but it’s hard to justify the abstractions for smaller projects. You end up with too many single method classes which can be functions instead.

    • @ivanvelinov4630
      @ivanvelinov4630 ปีที่แล้ว +6

      Why does it matter if you have a single function or a single class with a single method? You're gonna have more files true, but still I dont see a problem here.

    • @spas_minkov
      @spas_minkov ปีที่แล้ว +13

      @@ivanvelinov4630 Overhead, both In computer and cognitive sence. Besides it is unnatural to put everything into its own box. Generally it is easier to spot a thing put into a bigger box, with many other things, rather than if everything, no matter how small was put into its own box, even if there is a label on each box. It's mentally draining, and the biggest nonsense of OOP to me, besides it is never used on big real life projects. The same with the modern notion of microservices. We are not far away from the time, when a new "breakthrough" in the programming would be ”discovered” in the form of a revolutionary notion for “macroservice“ (highly sarcastic here) as it is functional programming now. Something old, then forgotten in favor of the new hype, and then rediscovered as something “revolutionary" (sarcasm)

    • @2gbeh
      @2gbeh 3 หลายเดือนก่อน

      And who says grouping "related" functions/methods into a single class (eg. Utility classes) breaks SOLID?

  • @francksgenlecroyant
    @francksgenlecroyant 2 ปีที่แล้ว +1

    I really missed Amigoscode, I can't believe he still can take his time to share these incredible resources and knowledge during this fasting period, thanks Nelson 🙏🙏🙏

  • @ansgarnell9316
    @ansgarnell9316 ปีที่แล้ว +23

    Great video!
    About the Liskov Substitution principle, although your explanation was right, the description should be exactly the opposite: every base or parent class should be substitutable by its derived or child classes. So, taking your example, if we have:
    Shape shape = new Shape();
    shape.area();
    in our code, we should be able to substitute the first line for:
    Shape shape = new NoShape();
    but this would throw an exception, so we don't fullfil this principle.
    On the other side, if we have:
    Animal animal = new Animal();
    animal.eat();
    We could substitute it for:
    Animal animal = new Dog();
    and it would still work as dogs have to eat.
    Hope that makes it more clear.

    • @nathanyt
      @nathanyt ปีที่แล้ว

      Also, please correct me if I'm wrong, he didn't have to create a new class to demonstrate LSP. The fact that he has a function that accepts "Shape" and it works even when it's supplied with objects of different shapes (Square, Circle, etc), that in itself obeys LSP because all of those are derived from "Shape".

  • @Oblivianos
    @Oblivianos 2 ปีที่แล้ว +5

    I've been working as a software engineer for 2.5 years and do my best to obey the SOLID, this is by far the best explanation video of all the principles. Usually the interface segregation and liskov were not explained or ignored in case of languages like Ruby ( my first job / 2 years). Kudos man

  • @codiphobia884
    @codiphobia884 2 ปีที่แล้ว +14

    Masha Allah. As a non-english person, I can clearly get the information. what an amazing explanation 😍

  • @Victor-gj7pi
    @Victor-gj7pi 2 ปีที่แล้ว +9

    You are a blessing to java developers. We got your back

  • @cleanconceptbyshakib
    @cleanconceptbyshakib 20 วันที่ผ่านมา

    Best Solid principle tutorial on internet.Crystal clear explanation!!

  • @MaxAigner
    @MaxAigner ปีที่แล้ว +1

    Hi Amigoscode, thank you for the great video, however one thing to notice: I might be wrong, so feel free to correct me: The single responsibility is not about having a single purpose, but rather about having a single customerbase "single actor/purpose" whom the class/functionset is being programmed for. The functions should not be shared amongst different stakeholders like the finance team and the HR team in a company that both need a way to calculate the salary of a person - they should have different codebases for that because they are different actors. The principle of having a function do only one thing is not part of the Solid Principles of Uncle Bob, even if it is a very wise thing to do. (Read more in "clean architecture" by uncle bob.)

  • @derekdevs
    @derekdevs ปีที่แล้ว +3

    This is probably the fourth or fifth SOLID video I’ve seen since being introduced to the topic and, while they have all been informative, yours sunk in. Thank you so much for this. New Sub!

  • @joshuagarza3747
    @joshuagarza3747 2 ปีที่แล้ว +16

    Would love to see a video on Design Patterns!

  • @cheikhouly128
    @cheikhouly128 2 ปีที่แล้ว +7

    This is one of most important topic (and design patterns) that every developer should learn to write better code. I've met experienced developer who didn't know about these subjects and it's so unfortunate. Thanks a lot 💪🏾

  • @cupq
    @cupq 2 ปีที่แล้ว

    I really hope this challen blows up, because this man makes very helpful videos.

  • @grim.reaper
    @grim.reaper 2 ปีที่แล้ว +1

    Huge respect to people who know Java. It has been kinda hard for me to get into the language but this was extremely helpful!! But once again huge respect to people who can write clean java code while keeping all these in mind, just blows my mind.

  • @KolomiecSergeyK
    @KolomiecSergeyK 2 ปีที่แล้ว +2

    Thanks for the video! One small point, I think it will be great vs run app each time, create few tests and run this test to show in own example that you like tests and how it is easy to work with tests.

  • @saidzbiri6247
    @saidzbiri6247 ปีที่แล้ว +3

    Thank you for such a clear and concise tutorial. You made a topic that seemed complicated easy to understand. I appreciate it!

  • @胤源陳
    @胤源陳 2 ปีที่แล้ว

    I, m reading articles about SOLID principle recently. This video really helps me upderstand how to implement this princople.
    Your videos are awesome. Thanks from Taiwan!!

  • @badwolf5592
    @badwolf5592 2 ปีที่แล้ว

    Design patterns with examples will be priceless.

  • @mahatana_r
    @mahatana_r ปีที่แล้ว +1

    I feel bad with my adblock when the content is excellent like this. I disabled it and rewatched it gain.

  • @biancaivanciuc8453
    @biancaivanciuc8453 7 หลายเดือนก่อน

    Hi Nelson, I'm new here, with no background of Computer Science, and your videos helped me a lot to understand the base of Java, right now I'm following an acreditate course, I would love if you can do videos about Generics, and explain Threads and Stream and Lambda, more understable for a begginer! We really love you! You are a good menthor and teacher! Bless!

  • @TheBusinessHandyMan
    @TheBusinessHandyMan 10 หลายเดือนก่อน

    I love how this focuses on the Principles

  • @kaliljanan
    @kaliljanan 2 ปีที่แล้ว +4

    It took me some time to understand Single responsibility. Each class can and should have more than one method, how do you do for them to have only one responsibility. The answer lies in "reason to change" as far as I know. Soo you should ask yourself what would make your code to change, like csv to json or saving in a file or a database or a queue.

  • @yrds96
    @yrds96 ปีที่แล้ว

    Many thanks to you. I'm preparing for a interview and I just forgot all the definition of SOLID principles(event using some of them), and your video helped me a lot to refreshing my memory.

  • @databaseadmin
    @databaseadmin 2 ปีที่แล้ว

    When Nelson writes code, all seems simple. Thanks to share your know with us.

  • @bobweiram6321
    @bobweiram6321 2 ปีที่แล้ว +1

    Great lecture. On a minor point, a cube has a volume rather area.

  • @story4uall
    @story4uall 2 ปีที่แล้ว +25

    It would be nice if you can provide some videos on Design Patterns

  • @6maxi9
    @6maxi9 2 ปีที่แล้ว

    I'm from Argentina and i'm surprise about the quality of your videos, with two videos i learned too much. You're incredible, keep it upppp

  • @JoshuaLam23
    @JoshuaLam23 11 หลายเดือนก่อน

    Thank you for letting me have a touch on the beauty of the programming.

  • @Namcode177
    @Namcode177 ปีที่แล้ว

    Hi, I just want to tell you that I love your teaching and I learn from your videos.

  • @jasperwhite8837
    @jasperwhite8837 2 ปีที่แล้ว +3

    The SOLID principles are something I struggled with to abide by early one in my career and struggled walk explaining in interviews. This has definitely helped remember some examples and helped my understanding, cheeers! :D

  • @Mohamed_Majed
    @Mohamed_Majed ปีที่แล้ว +1

    Thanks bro, that was amazing, good explanation

  • @ИванИванов-ч6я1ы
    @ИванИванов-ч6я1ы 2 ปีที่แล้ว +13

    Hello, sir!
    I want to thank you very much, for the tutorials and the work you are doing, and the effort you put in these youtube videos.
    Thanks to your tutorials, here in this youtube channel, I managed to land a job as a Java developer.
    Never give up guys! Hard work pays off!

  • @ollysalanson9452
    @ollysalanson9452 2 ปีที่แล้ว +3

    I'm so glad I found your channel, you're a great teacher. Thanks so much!!

  • @shahariarkabir210
    @shahariarkabir210 2 ปีที่แล้ว

    Thank you so much. After a long time not I can clear my understanding of the SOLID principles after watching this video.

  • @lorenaodino1024
    @lorenaodino1024 2 ปีที่แล้ว

    Excellent tutorial! This explanations about SOLID principles would have been so precious to have at the begging of my career, I really hope it can help others in their beginning! For me it was excellent for refreshing knowledge!

  • @samuelrubino8844
    @samuelrubino8844 2 ปีที่แล้ว

    Best explanation!! If someone needs a refresh on SOLID, this is the Video!

  • @ali_soleimani_r
    @ali_soleimani_r 2 ปีที่แล้ว

    No one could explain these principles better than you, even Uncle Bob! 😄

  • @gabrielgil2346
    @gabrielgil2346 2 ปีที่แล้ว +3

    I have literally just skiped that class in my university, thank you very much for being just in time lol!

  • @calebopeyemi2498
    @calebopeyemi2498 2 ปีที่แล้ว

    wow! this is a great lesson. As a beginner in Java Spring Boot, it gives me an edge to improve and write correct code. thanks Nelson

  • @CppZiedAlaya
    @CppZiedAlaya 2 ปีที่แล้ว

    This was one of the most clear and simple to understand. Thanks

  • @edwintellez6439
    @edwintellez6439 2 ปีที่แล้ว

    That was the best explanation that I've ever seen about SOLID !!! Thanks

  • @revanslacey
    @revanslacey 2 ปีที่แล้ว

    Best description I've seen so far. Thank you.

  • @BenZekriNBENZ
    @BenZekriNBENZ 10 หลายเดือนก่อน

    The last is just waaw and it's used in the most framework especially in Spring framework, thank you so much, this will help me a lot to become a better developer 😎

  • @sergiuszen1355
    @sergiuszen1355 2 ปีที่แล้ว

    It's simple and clear, as it should be. Thank you

  • @erbugakbal
    @erbugakbal 2 ปีที่แล้ว +8

    Amazing explanation as always. Can't be explained faster than this. Much appreciated!

  • @richard2218188
    @richard2218188 2 ปีที่แล้ว

    I really appreciate this video, simple explanation to a difficult topic.

  • @ahmedbishree9429
    @ahmedbishree9429 2 ปีที่แล้ว +6

    Thanks dear brother may ALLAH accept your duaa, fasting, and prayers :)
    SOLID PRINCIPLES
    ►IP Single Responsibility
    Each class should have only one sole purpose, and not be filled with excessive functionality
    ►Open Closed
    Classes should be open for extension and closed for modification.
    In other words, you should not have to rewrite an existing class for implementing new features.
    ►Liskov Substitution
    This means that every subclass or derived class should be substitutable for their base or parent class
    ►Interface Segregation
    Interfaces should not force classes to implement what they can't do.
    Large interfaces should be divided into small ones.
    ►Dependency Inversion
    Components should depend on abstractions,
    not on concretions.

  • @andrevkfreitas6498
    @andrevkfreitas6498 11 หลายเดือนก่อน

    Great teaching methodology. Best that i have seen about SOLID explanations!

  • @TechStory5
    @TechStory5 2 ปีที่แล้ว

    More test tutorials please i've only found two videos which were amazingly beneficial

  • @MyRealityIsProof
    @MyRealityIsProof 2 ปีที่แล้ว

    Even though I code in C#, I can still follow a lot of what you are teaching.

  • @marcischneider9093
    @marcischneider9093 ปีที่แล้ว

    I love your humour and just your upbeat vibe
    😊 Ty for the vid, very useful

  • @laislodi
    @laislodi 9 หลายเดือนก่อน +1

    Fantastic explanation! BEST VIDEO about SOLID

  • @sambalykote9889
    @sambalykote9889 2 ปีที่แล้ว +3

    I have been looking for a tutorial on hexagonal architecture, if you can do a video with a complete demo on that it would be great.

  • @sasithawathmal
    @sasithawathmal ปีที่แล้ว

    Thanks, this cleared me the basics very well.

  • @adisaisubrahmanyamvaskuri4048
    @adisaisubrahmanyamvaskuri4048 11 หลายเดือนก่อน

    Thanks for your knowledge, good teaching.
    I really appreciate it

  • @benalifarid4845
    @benalifarid4845 2 หลายเดือนก่อน

    Thank you nelson for all these videos

  • @hsfreitas36
    @hsfreitas36 ปีที่แล้ว

    Best explanation of SOLID principles man! Very good job, thank you very much!

  • @MiauMichigan
    @MiauMichigan 2 ปีที่แล้ว

    Thank you for recommending the book. It has helped me a lot!

  • @marcosferreira17br
    @marcosferreira17br 2 ปีที่แล้ว

    Great video, i really appreciate how do you explain things, hugs from Brazil.

  • @TechStory5
    @TechStory5 2 ปีที่แล้ว

    Kind suggestions for future videos:
    Live stream with interview questions that we try to answer
    A video about concepts that every junior developer must know with examples like this video

  • @omerisk8934
    @omerisk8934 ปีที่แล้ว

    AleykumSelam Mashallah brother the cleanest explanation that can be found ever! Finally everything is in place on SOLID principles. I appreciate and strongly recommend it.

  • @shahabbadihi3453
    @shahabbadihi3453 4 หลายเดือนก่อน +1

    Much clear, but I have a question that why didn't you make the ThreeDimensionalShape interface inherited from the Shape interface? Is the interface inheritance an unusual practice, or there was another reason?

    • @abrorallaberganov6293
      @abrorallaberganov6293 3 หลายเดือนก่อน

      I thought just like you. However, in my view, he just wanted to make it as much as simple.

  • @samuelnjenga7912
    @samuelnjenga7912 2 ปีที่แล้ว +1

    So wonderful, thanks a lot Jamal

  • @bilaledelbi951
    @bilaledelbi951 2 ปีที่แล้ว

    this is actually very amazing thank you for your clear and concise tutorial

  • @Chroncher
    @Chroncher ปีที่แล้ว

    Iam wondering if there is a specific reason why you are using the Object class instead of Generics?
    For example in:
    public int sum(List shapes) {...} -> why not do this instead:
    public class Areacalculator {
    public int sum(List shapes){...}
    then you wouldnt have to bother about typesafty afterwards. but iam relatively new to OOP so please enlighten me if iam mistaken.

  • @rachidbenkitou
    @rachidbenkitou 6 หลายเดือนก่อน

    It was a very benefit episode, thanks for the effort

  • @MrOcelot92
    @MrOcelot92 ปีที่แล้ว

    Just worth a mention, the open closed principle here could be addressed with visitor design pattern.

  • @TheOnlyEzzo
    @TheOnlyEzzo 11 หลายเดือนก่อน

    Great video! Very clear SOLID Principles explanation

  • @ДмитрийРодионов-ф6р
    @ДмитрийРодионов-ф6р 2 ปีที่แล้ว

    Thank you! You are always smiling, so nice)))))

  • @alptekintalan3125
    @alptekintalan3125 2 ปีที่แล้ว

    Design Patterns in the Spring boot Framework is a must :)

  • @akshitasaxena7805
    @akshitasaxena7805 8 หลายเดือนก่อน

    Hey Please make complete detailed video on all types of design patterns. Thanks :)

  • @javohiruralov1812
    @javohiruralov1812 2 ปีที่แล้ว

    Thank you so much Nelson. Best explanation 👍👍👍👍👍👍

  • @TheBordereagle
    @TheBordereagle 8 หลายเดือนก่อน

    i was searching for this type of tutorial . u readd my mind bro.

  • @radhikajhunjhunwala2694
    @radhikajhunjhunwala2694 2 ปีที่แล้ว +1

    Amazing explanation with clear examples. Thanks so much!

  • @paulallen4622
    @paulallen4622 ปีที่แล้ว

    Great video!! I had never really understood the SOLID principles before but this and with the examples explains them really well

  • @punithgowda8890
    @punithgowda8890 2 ปีที่แล้ว +3

    Hi amigo can please make videos on java Design structures.

  • @КалоянБожилски-ь8с
    @КалоянБожилски-ь8с ปีที่แล้ว

    Very useful and easily understandable video. Good job!

  • @syed.salman
    @syed.salman 2 ปีที่แล้ว

    Finally an easy explanation... Although still a bit confused on the last one.
    And btw can you make a video on design patterns?
    Thanks

  • @fauzanlubis23
    @fauzanlubis23 2 ปีที่แล้ว

    Really clear explanation! Barakallahufiik

  • @PratimCherry
    @PratimCherry 2 ปีที่แล้ว

    Can you start a series on Data Structures and Algorithms as well as competitive coding?

  • @abdulmateensyed9056
    @abdulmateensyed9056 2 ปีที่แล้ว

    Next video on design patterns much appreciated

  • @sibusisondlovu03
    @sibusisondlovu03 ปีที่แล้ว

    wow.. thanks a lot. this is what i need. will share this with my team

  • @wisdombeta
    @wisdombeta 2 ปีที่แล้ว

    Nice, borther! I am revising deeper lots of fundamental knowledges from your tutorials! May Allah bless your good deeds!

  • @technogeeks4160
    @technogeeks4160 2 ปีที่แล้ว

    Please make a complete playlist of GOF design patterns with code example?

  • @Naimadmdp
    @Naimadmdp 2 ปีที่แล้ว +1

    Exactly the video that I was looking for! Excelent as always!!!

  • @rafaah28
    @rafaah28 2 ปีที่แล้ว

    Good video, I abstracted more about this S.O.L.I.D Principles content. Thanks, bro!

  • @mehdiLesty
    @mehdiLesty 2 ปีที่แล้ว

    Hello, thank you for this well explained reminder. Just a little remark regarding the video format: can you reduce a little bit the size of your camera so we can see the whole code in your screen. Not that i don't want to see you lol but just for confort. Again thank you very much for all your work my friend. Salam.

  • @pedro.carara
    @pedro.carara 2 ปีที่แล้ว

    the amigoscode videos are always the best!!!

  • @Anatole-aa
    @Anatole-aa 2 ปีที่แล้ว

    Hi! Where is new lecture about design patterns? It will be amazing to learn it with you!

  • @damianlord7954
    @damianlord7954 2 ปีที่แล้ว +1

    Fantastic content as always. Even as a software engineer with 20+ years experience, I always find something interesting on your channel and plenty of content to refresh things tucked away in my ageing brain 😂 keep up the excellent work! 👍
    (one minor criticism for this vid is that I thought face cam was a little large and blocking some of the code changes you were making)

  • @jamaludinalafghan6125
    @jamaludinalafghan6125 4 หลายเดือนก่อน

    Jazakallah khair Amigos, great knowledge :)

  • @saministor9054
    @saministor9054 ปีที่แล้ว

    Really helpful. My first video on this channel and I am surprised :)

  • @caffeinejavacode1475
    @caffeinejavacode1475 2 ปีที่แล้ว

    Liskov - The inheriting class should complement, not replace, the behavior of the base class. In our case we should definitely write area calculate logic

  • @BudderBotftw
    @BudderBotftw ปีที่แล้ว

    Great Video! Really helped me understand the concepts

  • @goldbow9805
    @goldbow9805 10 หลายเดือนก่อน

    That was a SOLID video. Thanks a lot.

  • @amineboubekri1577
    @amineboubekri1577 2 ปีที่แล้ว

    Design Patterns pleaaase, will be so helpfull, thansk a lot for sharing

  • @heudon
    @heudon ปีที่แล้ว

    Hey man, you forgot to split the part from ISP and DIP, in the end of the video. Nice video, by the way.

  • @dandantin
    @dandantin 2 ปีที่แล้ว

    Good job, Thank you for explain solid patterns. Congratulations.

  • @francksgenlecroyant
    @francksgenlecroyant 2 ปีที่แล้ว +116

    I really missed Amigoscode, I can't believe he still can take his time to share these incredible resources and knowledge during this fasting period, thanks Nelson 🙏🙏🙏

    • @uncomputable929
      @uncomputable929 2 ปีที่แล้ว +4

      not like you are unable to do anything while fasting

    • @mateuszorlicki5907
      @mateuszorlicki5907 2 ปีที่แล้ว +1

      @@uncomputable929 how long does the post last ?

    • @coffeedude
      @coffeedude 2 ปีที่แล้ว +2

      @@uncomputable929 I actually found out that fasting makes me do more stuff, not less