Duration 18:24

Make Your Code Clean With the SOLID Principles

85 166 watched
0
3.6 K
Published 18 Jul 2021

Writing clean code gets more and more essential the bigger your projects get. The SOLID principles help you do that. ⭐ Get certificates for your future job ⭐ Save countless hours of time ⭐ 100% money back guarantee for 30 days ⭐ Become a professional Android developer now: https://pl-coding.com/premium-courses/ 💻 Let me personally review your code and provide individual feedback, so it won't backfire and cost you a fortune in future: https://elopage.com/s/philipplackner/code-review/payment?locale=en Regular programming advice on my Instagram page: https://instagram.com/_philipplackner_ Checkout my GitHub: https://github.com/philipplackner You like my free content? Here you can buy me a coffee: https://www.buymeacoffee.com/philipplackner

Category

Show more

Comments - 225
  • @
    @iamkrishn3 years ago Introduction
    Find problem with existing code
    S = Single Responsibility Principle
    O = Open Extensions, Closed Modifications
    L = Liskov Substitution
    I = Interface Segregation
    D = Dependency Inversion
    Great explanation with a simple to understand example. Amazing videos as always.
    ..
    ...Expand
    161
  • @
    @devgabriel68982 years ago Experience is so freaking important!
    6 months ago, i saw this video i didnt understand anything of it.
    now i understand everything! Because excelent!
    now going for theory behind design patterns
    .
    ...Expand
    6
  • @
    @Slake0043 years ago Play the video in 2x speed then you' ll be learning solid in 10 minutes. 114
  • @
    @aimenham46853 years ago Finally, now i understand why interfaces are so important, i struggled so much to find reason to use them, thank you philipp < 3. 27
  • @
    @Alchemist102413 years ago For interface segregation principle; i think we shouldn' t create a function (that sometimes needed and sometimes not) printlogs( function in this . ...Expand 46
  • @
    @kobeissi7213 years ago For the optional interface function, you could also do = unit instead of the empty function braces. 7
  • @
    @simplegalaxys79abcd232 years ago Awesome man. I didn' like you previously when seen on interviews but now addicted to how you teach and how humble you really are.
  • @
    @alwaysbrillant102 years ago Been binge watching all your recent videos. Amazing android content.
  • @
    @niranz77453 years ago This is literally one of the best channels out there. I cant believe that i only found it now. I love the videos. Keep them coming!
    p. S- would l . ...Expand
  • @
    @vonn97372 years ago In example for open/closed, you treated the filelogger class as being completely closed. Yourwas effectively another implementation of a filelogger interface. It is ok to add new functionality to the filelogger class, for example adding another function calledas long as you do not change the logerror( function it adheres to the open/closed principle. All existing consumers of filelogger will work exactly as they did before.
    for your example of liskov substitution, theclass does not violate liskov substitution. All instances of filelogger can be replaced withand will work exactly the same. This is because all calls to logerror( will still go to the base filelogger via inheritance
    .
    ...Expand 9
  • @
    @sakhti0073 years ago Thankyou Philipp, your way of explaining the issues through examples is just amazing. Thankyou for this great video.
  • @
    @cesarlabastida13926 months ago You have such a nice way of explaining things brother. Keep making these videos please. Thank you.
  • @
    @Andrei18895 months ago I would' ve killed for this video when i first started learning android and programming; thank you.
  • @
    @ani-eg8dy3 years ago This is simple af, nobody showed this important principle with this level of simple and easy examples! Take a bow @philipp.
  • @
    @masti4372 years ago I watched this video after watching your multi module course. So clearly explained. I clearly understand why you inject abstractions using hilt instead of concrete implementation. Thank you so much philip.
  • @
    @pratikpattanaik2 years ago I think a more appropriate example of liskov substitution principle would be if an overriden function were to do something unexpected and contrary to its . ...Expand 10
  • @
    @Chintanparmar3 years ago The video we didn' t ask for, but really needed. 1
  • @
    @devetips2 years ago Really the most informative explanation of solid principles. Appreciated and thanks a lot man: 1
  • @
    @TripDude2 years ago Thanks for the explanations with easy examples. 1
  • @
    @mare10rooney3 years ago Great video philipp, would be awesome if you would cover more of these advanced topics. Keep up the good work!
  • @
    @snehilsinha46892 years ago Simplest and best example with clean examples just like your clean codes @philipp! Awesome:
  • @
    @khanzadakashif82483 years ago Just the thing i needed.
    surely will start using all these principles in my future projects. Thanks bro. Lt; 3.
  • @
    @theophilus4943 years ago Philip god bless you sooo much. I can' t thank you enough. 1
  • @
    @mahdizareei45753 years ago Thank you so much dear philipp for record this courses,
    i just wanted say i love you.
  • @
    @alvaroisea22593 years ago Thanks for this video man! Big fan of your channel.
  • @
    @razidwa8522 years ago The best explanation i have ever seen. Great job.
  • @
    @sergeisalnikov64272 years ago Hi! I am from russia and i am learning english to find a job in another country. You have good english i understand almost everything and your videos help me to learn the language)
  • @
    @aginamabednego10 months ago Kudos philip. This explanation was easy to grasp.
  • @
    @daniyar27183 years ago I like how you explain complex things so easynice. 1
  • @
    @lekshmiskrishnan56522 years ago Thanks a lot for that awesome explanation! 1
  • @
    @mustaqode_66173 years ago This is a most important video in the internet for devs today. It' s not easy to explain this topic the way he did. Kudos @philipp. 27
  • @
    @Abhishek_Sawant3 years ago Keep making such videos. It truly helps a lot. Thank you.
  • @
    @Another0neTime3 years ago This guy does it again! Nice explanations. 2
  • @
    @jhngolan3 years ago So realy clearest explanation ever and simple practical
    thank you philipp.
    1
  • @
    @haliltoprak5852 years ago Thank you so much for clear explanation of solid.
  • @
    @minasalah82102 years ago Thanks' a lot philipp, appreciated your efforts.
  • @
    @bjugdbjk3 years ago This is by far the best solid video explaining these complex solid software principles! Thank you for this amazing content! 2
  • @
    @Coldalecs2 years ago I finally understand them now, i faced the same problem when searching them online. Very hard to understand. This was way easier to understand. Thank you!
  • @
    @TheCreator11972 years ago For the open-closed principle, would you then be violating it if you provided a default parameter with the file path name, so that one could change the . ...Expand 2
  • @
    @burakkarabekir4593 years ago Great content. You made it clear for me. Thank you so much. . . .
    thank you so much.
  • @
    @basitaliwrites48282 years ago Thank you for the explanation i learned something new today < 3.
  • @
    @vitalijuskolinko90113 years ago Do we need to remove dependency on concretion of filelogger class?
    for " i" principle you can split your interface in several interfaces.
    thanks for video!
  • @
    @mandroidx14743 years ago This is really helpful, some tutorial only targets output without considering clean code, thanks philipp.
  • @
    @RubabAzim2 years ago Nice explanation on very complex and ambiguous topic. Plus i think we can do diff approach for interface segregation instead of giving default.
  • @
    @wilsonahanmisi11872 years ago This guy is really good. Keep it up bro.
  • @
    @abood7meed5092 years ago Thank you it was very simple and easy to understand.
  • @
    @tinykingcontractor13962 years ago The thing that i liked about the video was not wasting my time to learn this solid buillshit. Thanks for summarizing.
  • @
    @r_yan35313 years ago Hey phillipp we need more videos on clean architecture, if possible please make a playlist on it. I will buy that playlist if it is paid but please make that playlist. 1
  • @
    @montuedge3 months ago You explain like indians simple and easy to understand with examples.
  • @
    @gyorgygab2 years ago Very good video. One question regarding the open closed principle: if i would create method for changing the path e. G. Open fun getpath({. } Does this violate the principle?
  • @
    @rogercolque3 years ago Saw videos about this topic and this helps me to understood it better.
    easy to undertand also for stating with solid and why use it
    half of the video after that i lost.
  • @
    @techmarinar3 years ago Thank you very much, this is really awesome.
  • @
    @mohammedgouse52263 years ago Iam developing an app in java. In that navigation drawer menu items are not getting clicked and not opening sir help as soon as possible.
  • @
    @awais29803 years ago Can you please make video on important design patterns for android developers?
    thanks in advance.
    1
  • @
    @kareemjeiroudi19643 years ago Well done video. Just pay attention to interface segregation. Interface segregation does not mean that clients do not need to implement the entire interface. . ...Expand 16
  • @
    @akashkumardas96702 years ago Need to watch some more time. Thanks a lot.
  • @
    @shantanubopardikar77192 years ago Bro, you are my new superhero, much better than any other fictional superhero.
  • @
    @pstlvictoras2 years ago Do you have an example of project with clean arhitecture?
  • @
    @nishantaanjaneyjalan85833 years ago I got goosebumps when he said, " this changes the entire implementation in one line of code. " 9
  • @
    @polotika19623 years ago Can you please make medium scale app with clean architecture so we can practice on it.
  • @
    @atulkumar-bb7vilast year I liked explanation, thanks! But interface segregation principle is not explained properly. It states that, should have kept printlogs method in different interface and then can be implemented in classes wherever required.
  • @
    @bitwisedevs4693 months ago Didn' t realize i already did all of it long time ago.
  • @
    @umairkhalid1233 years ago You got some perfect communication skills. 4
  • @
    @thomaswaldorf28293 years ago Its good to see the stuff i usually do put into a list. Notice i said usually hehe.
  • @
    @prasanthmanimaran51583 years ago Someone actually disliked this gem of a video. Outrageous.
  • @
    @phamhung22633 years ago Thanks, it looks very easy to understand. Do you have any video about customizing views in android?
  • @
    @atulkumar-bb7vilast year Repo is dependent on firebaseauth object which is wrong, should be asbtracted and repo should also be abstracted with separating outand separate class for logging code.
  • @
    @gmgm603 years ago We need more of this
    can you mix this with an app tutorial
    with mvvm, injection.
  • @
    @bonifaceyombwe97933 years ago I always enjoy your videos. Would u do one video on adding time and date in an android studio app.
  • @
    @noahortega2 years ago I think the explanation for open for extension but closed for modification was a bit confusing.
    i hope i' m understanding correctly that by . ...Expand
  • @
    @vathsan39063 years ago With these vdo, i' ve understood what solid is. Will you make a playlist making another project following mvvm, solid, jetpack compose etc. It would be nice. 1
  • @
    @BapeRuLLZ2 years ago On the single responsibility principle example, shouldnt the error handling part be implemented in a different class? I mean it sounds and would look weird, . ...Expand
  • @
    @theLaughRiot003 years ago Hey philipp, what about mvi pattern? Can we have any tutorial on it. Thanks. 8
  • @
    @Chintanparmar3 years ago If possible also make a video on design patterns. 1
  • @
    @yangyun6221last year Chatgpt:
    the open/closed principle (ocp) suggests that you should design your software in a way that allows for new functionality to be added through this is particularly important for mature and stable codebases, as modifying existing code can be risky and can introduce new bugs or unexpected behavior. By using inheritance, composition, or polymorphism to add new functionality, you can reduce the risk of introducing new bugs or breaking existing code.
    //it does not make sense not to modifing a new code while developing new feature
    .
    ...Expand
  • @
    @mattgraves37093 years ago After watching this last night i went back and re-watched bob' s playlist on clean code. Outstanding!
    then today in a long term project interview i played it cool, . #39; fools, little do you know phillipp just schooled me on this shit' . Barely had the words come out of my mouth when the hiring manager said " wait you know;
    joking aside, the synchronicity is insane man, thanks so much for everything!
    .
    ...Expand
    2
  • @
    @CryptoCodeZone2 years ago Yes, clear as mud = will have to re-watch:
  • @
    @opshankaprabath79132 years ago This is a good tutorial to me thank you.