Duration 18:24

Make Your Code Clean With the SOLID Principles

85 169 watched
0
3.6 K
Published 2021/07/18

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
  • @
    @iamkrishnمنذ 3 سنوات 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.
    .
    ...وسعت
    161
  • @
    @devgabriel6898منذ 2 سنوات Experience is so freaking important!.
    6 months ago, i saw this video i didnt understand anything of it.
    Now i understand everything! Because id="hidden2" class="buttons"> without knowing, i used all of this on my job, day to day on Android.
    Excelent!
    Now going for theory behind design patterns
    ....وسعت 6
  • @
    @Slake004منذ 3 سنوات Play the video in 2x speed then you'll be learning SOLID in 10 minutes 114
  • @
    @aimenham4685منذ 3 سنوات finally , now i understand why interfaces are so important ,I struggled so much to find reason to use them , Thank you philipp <3 27
  • @
    @Alchemist10241منذ 3 سنوات For Interface segregation principle; I think we shouldn't create a function (that sometimes needed and sometimes not) - printLogs() function in this id="hidden3" class="buttons"> video - inside the same interface, We should create another interface and declare this function in it and if we need this functionality we can implement this interface and plus other interfaces like FileLogger interface in this video ....وسعت 46
  • @
    @kobeissi721منذ 3 سنوات For the optional interface function, you could also do = Unit instead of the empty function braces. 7
  • @
    @simplegalaxys79abcd23منذ 2 سنوات awesome man. I didn' like you previously when seen on interviews but Now addicted to how you teach and how humble you really are.
  • @
    @alwaysbrillant10منذ 2 سنوات Been binge watching all your recent videos. Amazing Android content
  • @
    @niranz7745منذ 3 سنوات This is literally one of the best channels out there. I can’t believe that I only found it now. I love the videos. Keep them coming!
    P.s- would love to see a video about Alarm manager in Kotlin! Looking for such a video for a while. ....وسعت
  • @
    @vonn9737منذ 2 سنوات In example for open/closed, you treated the FileLogger class as being completely closed. Your CustomFileLogger was effectively another implementation of id="hidden5" class="buttons"> a FileLogger interface. It is ok to add new functionality to the FileLogger class, for example adding another function called timestampedError(), as 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, the CustomErrorLogger class does not violate Liskov substitution. All instances of FileLogger can be replaced with CustomErrorLogger and will work exactly the same. This is because all calls to logError() will still go to the base FileLogger via inheritance.
    ....وسعت 9
  • @
    @sakhti007منذ 3 سنوات Thankyou Philipp, your way of explaining the issues through examples is just amazing. Thankyou for this great video.
  • @
    @cesarlabastida1392قبل 6 أشهر You have such a nice way of explaining things brother. Keep making these videos please. Thank you.
  • @
    @Andrei1889قبل 5 أشهر I would've killed for this video when I first started learning Android and programming; Thank you.
  • @
    @ani-eg8dyمنذ 3 سنوات This is simple AF , nobody showed this important principle with this level of simple and easy examples ! Take a bow @Philipp
  • @
    @masti437منذ 2 سنوات 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
  • @
    @pratikpattanaikمنذ 2 سنوات 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 id="hidden8" class="buttons"> implementation in the base class. This can be shown with a base function that changes the state of the class which is overriden by a function that doesn't call the super method. The example provided doesn't break this principle. I liked the other explanations. ....وسعت 10
  • @
    @Chintanparmarمنذ 3 سنوات The video we didn't ask for, but really needed.. 1
  • @
    @devetipsمنذ 2 سنوات really the most informative explanation of SOLID principles. appreciated and thanks a lot man:) 1
  • @
    @TripDudeمنذ 2 سنوات Thanks for the explanations with easy examples 1
  • @
    @mare10rooneyمنذ 3 سنوات Great video Philipp, would be awesome if you would cover more of these advanced topics. Keep up the good work!
  • @
    @snehilsinha4689منذ 2 سنوات Simplest and best example with clean examples just like your clean codes @Philipp ! Awesome :)
  • @
    @khanzadakashif8248منذ 3 سنوات Just the thing I needed.
    Surely will start using all these principles in my future projects. Thanks bro. <3
  • @
    @theophilus494منذ 3 سنوات Philip God bless you soooooooo much. i can't thank you enough 1
  • @
    @mahdizareei4575منذ 3 سنوات Thank you so much dear philipp for record this courses ,
    I just wanted say i love you ❤️
  • @
    @alvaroisea2259منذ 3 سنوات Thanks for this video man!, Big fan of your channel
  • @
    @razidwa852منذ 2 سنوات The best explanation I have ever seen. Great job
  • @
    @sergeisalnikov6427منذ 2 سنوات 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))
  • @
    @aginamabednegoقبل 10 أشهر Kudos Philip. This explanation was easy to grasp
  • @
    @daniyar2718منذ 3 سنوات I like how you explain complex things so easynice 1
  • @
    @lekshmiskrishnan5652منذ 2 سنوات Thanks a lot for that awesome explanation! 1
  • @
    @mustaqode_6617منذ 3 سنوات 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_Sawantمنذ 3 سنوات Keep making such videos. It truly helps a lot. Thank you
  • @
    @Another0neTimeمنذ 3 سنوات This guy does it again!!! Nice explanations. 2
  • @
    @jhngolanمنذ 3 سنوات So realy clearest explanation ever and simple practical
    Thank you Philipp
    1
  • @
    @haliltoprak585منذ 2 سنوات Thank you so much for clear explanation of SOLID
  • @
    @minasalah8210منذ 2 سنوات thanks' a lot Philipp, appreciated your efforts
  • @
    @bjugdbjkمنذ 3 سنوات This is by far the best SOLID video explaining these complex SOLID software principles !! Thank you for this amazing content !! 2
  • @
    @Coldalecsمنذ 2 سنوات I finally understand them now, I faced the same problem when searching them online.very hard to understand. This was waaay easier to understand. Thank you!
  • @
    @TheCreator1197منذ 2 سنوات 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 id="hidden11" class="buttons"> output location without extending the original class? Not sure if that's what you mean by closed to modification ....وسعت 2
  • @
    @burakkarabekir459منذ 3 سنوات Great content. You made it clear for me. Thank you so much.
    .
    .
    .
    Thank you so much.
  • @
    @basitaliwrites4828منذ 2 سنوات Thank you for the explanation I learned something new today <3
  • @
    @vitalijuskolinko9011منذ 3 سنوات 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! ❤
  • @
    @mandroidx1474منذ 3 سنوات This is really helpful,some tutorial only targets output without considering clean code,thanks Philipp
  • @
    @RubabAzimمنذ 2 سنوات Nice explanation on very complex and ambiguous topic. Plus i think we can do diff approach for interface segregation instead of giving default implementation.
  • @
    @wilsonahanmisi1187منذ 2 سنوات This guy is really good. Keep it up bro
  • @
    @abood7meed509منذ 2 سنوات Thank you it was very simple and easy to understand
  • @
    @tinykingcontractor1396منذ 2 سنوات The thing that I liked about the video was not wasting my time to learn this SOLID buillshit. Thanks for summarizing.
  • @
    @r_yan3531منذ 3 سنوات 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
  • @
    @montuedgeقبل 4 أشهر You explain like Indians ❤ simple and easy to understand with examples.
  • @
    @gyorgygabمنذ 2 سنوات 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?
  • @
    @rogercolqueمنذ 3 سنوات 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
  • @
    @techmarinarمنذ 3 سنوات thank you very much , this is really awesome
  • @
    @mohammedgouse5226منذ 3 سنوات 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
  • @
    @awais2980منذ 3 سنوات Can you please make video on Important design patterns for Android developers?
    Thanks in advance.
    1
  • @
    @kareemjeiroudi1964منذ 3 سنوات Well done video. Just pay attention to interface segregation. Interface segregation does not mean that clients do not need to implement the entire interface. id="hidden17" class="buttons"> It means that you should segregate different functions under several interfaces, and then it's up to the client to decide which interfaces to implement. I don't think the example here was demonstrative of interface segregation. ....وسعت 16
  • @
    @puszkinowskiمنذ 3 سنوات great material, very helpful, thanks !
  • @
    @akashkumardas9670منذ 2 سنوات need to watch some more time. Thanks a lot
  • @
    @shantanubopardikar7719منذ 2 سنوات Bro, you are my new superhero, much better than any other fictional superhero
  • @
    @pstlvictorasمنذ 2 سنوات do you have an example of project with clean arhitecture?
  • @
    @nishantaanjaneyjalan8583منذ 3 سنوات I got goosebumps when he said, "This changes the entire implementation in one line of code. " 9
  • @
    @polotika1962منذ 3 سنوات Can you please make medium scale app with clean architecture so we can practice on it.
  • @
    @atulkumar-bb7viالعام الماضي 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.
  • @
    @bitwisedevs469قبل 3 أشهر Didn't realize I already did all of it long time ago.
  • @
    @umairkhalid123منذ 3 سنوات You got some perfect communication skills 4
  • @
    @thomaswaldorf2829منذ 3 سنوات Its good to see the stuff I usually do put into a list.. notice I said USUALLY hehe
  • @
    @prasanthmanimaran5158منذ 3 سنوات Someone actually disliked this gem of a video.??! Outrageous.
  • @
    @phamhung2263منذ 3 سنوات thanks, it looks very easy to understand. Do you have any video about customizing views in android?
  • @
    @atulkumar-bb7viالعام الماضي Repo is dependent on FirebaseAuth object which is wrong, Should be asbtracted and repo should also be abstracted with separating out implementation, and separate class for logging code.
  • @
    @gmgm60منذ 3 سنوات We need more of this
    Can you Mix this with an app tutorial
    With mvvm , injection
  • @
    @bonifaceyombwe9793منذ 3 سنوات I always enjoy your videos. Would u do one video on adding time and date in an android studio app
  • @
    @noahortegaمنذ 2 سنوات I think the explanation for open for extension but closed for modification was a bit confusing.
    I hope I'm understanding correctly that by id="hidden20" class="buttons"> modifying you mean adjusting functionality in pre-existing functions that already work fine.
    ....وسعت
  • @
    @vathsan3906منذ 3 سنوات 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
  • @
    @BapeRuLLZمنذ 2 سنوات 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, id="hidden22" class="buttons"> but in principle this class still has more than one reason to change: 1. if we want to change how the user sign-in network call is implemented 2. if we want to change how the error handling works. I mean the logging part is in another class, so if we want to change only the error logging than everything is good, but if we want to change what gets called in the catch block in the first place than the class would have two reasons to change. ....وسعت
  • @
    @theLaughRiot00منذ 3 سنوات Hey Philipp , What about MVI pattern?Can we have any tutorial on it. Thanks 8
  • @
    @Chintanparmarمنذ 3 سنوات If possible also make a video on Design Patterns 1
  • @
    @yangyun6221العام الماضي 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 id="hidden23" class="buttons"> extension, rather than modification of existing code.
    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
    ....وسعت
  • @
    @mattgraves3709منذ 3 سنوات 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 id="hidden24" class="buttons"> (We interview internally for projects) I was asked, 'what are the SOLID principles of good software engineering?'
    I played it cool,
    .. '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 Phillipp?" ;)
    Joking aside, the synchronicity is insane man, thanks so much for everything!
    ....وسعت 2
  • @
    @CryptoCodeZoneمنذ 2 سنوات Yes, Clear as Mud = Will have to re-watch :)
  • @
    @opshankaprabath7913منذ 2 سنوات This is a good tutorial to me thank you.