Uncle Bob’s SOLID Principles Made Easy 🍀 - In Python!

Поділитися
Вставка
  • Опубліковано 24 лис 2024

КОМЕНТАРІ • 517

  • @MaBuSt
    @MaBuSt 3 роки тому +336

    If you are a junior dev or self-taught programmer who watches this video and thinks "but... the original code was much tighter and easier to understand" I hope that you please understand that this is a totally natural thought to have. All of these design principles (as well as software architecture decisions) really shine when you are doing more than writing a quick 1-off script. Many times you will come back later to some code (either yours or someone elses) and need to make changes, or dramatically expand it's capability, and in those moments you will start to wish very much that the original code was written in this way (high cohesion, low coupling, dependency inversion, etc.) because then adding your new feature is not only relatively simple (e.g. a new processor subclass) but YOU CAN ADD IT WITHOUT BEING SCARED THAT YOU ARE BREAKING TONS OF STUFF. I cannot stress how important that last part is. I cannot tell you how many times I have looked at someones high-ly procedural code and tried to add a quick feature to it and though "oh god i hope this doesn't break something!" When you break code up this way, you make it so that adding a new feature capability is significantly de-risked.

    • @luck3949
      @luck3949 2 роки тому +8

      Yes. They also help to prevent merge conflicts - a thing I didn't know existed before I started working in a team.

    • @Fanmade1b
      @Fanmade1b 2 роки тому +10

      @@luck3949 Yes, working in a team is definitively something where these principles shine. I would also add testing to that list.
      If your code can't be tested, it very probably doesn't follow SOLID. I am a a fan of writing code the KISS way (Keep it simple, stupid!), but now that I have more experience in larger and more complicated projects with more people involved and ever changing requirements, I always say that SOLID trumps KISS. Of course you should still keep it as simple as possible, but not if that means violating SOLID. It probably means that you have to think more in the beginning and have to create more classes (and especially interfaces), but I can almost guarantee you that this makes testing, refactoring and extending the code a lot easier and especially safer.
      I've had too many projects which started as something small and easy which grew over time and are an unstable and unmaintainable mess. A lot of those I've built myself.
      Well, at least for me this has been a lesson learned :)

    • @Roule_n_Scratche
      @Roule_n_Scratche 2 роки тому

      ah ok thanks

    • @QckSGaming
      @QckSGaming 2 роки тому +3

      Exactly, and to add to that, it also becomes naturally much more testable, which also feeds into the risk aversion

    • @drygordspellweaver8761
      @drygordspellweaver8761 Рік тому +3

      Their gut instinct is correct. OOP is a stain in programmings history and will be eclipsed by procedural and data oriented design.

  • @sergiopietri5370
    @sergiopietri5370 3 роки тому +231

    Seems like one of those senior devs who you could ask for help and he would gladly explain, I appreciate that vibe

  • @skycakecrunch
    @skycakecrunch 3 роки тому +379

    Defining the SOLID principles in layman's terms (based on this video alone):
    1. Single Responsibility
    Make things (classes, functions, etc.) responsible for fulfilling one type of role.
    e.g. Refactor code responsibilities into separate classes.
    2. Open/Closed
    Be able to add new functionality to existing code easily without modifying existing code.
    e.g. Use abstract classes. These can define what subclasses will require and strengthen Principle 1. by separating code duties.
    3. Liskov Substitution
    When a class inherits from another class, the program shouldn't break and you shouldn't need to hack anything to use the subclass.
    e.g. Define constructor arguments to keep inheritance flexible.
    4. Interface Segregation
    Make interfaces (parent abstract classes) more specific, rather than generic.
    e.g. Create more interfaces (classes) if needed and/or provide objects to constructors.
    5. Dependency Inversion
    Make classes depend on abstract classes rather than non-abstract classes.
    e.g. Make classes inherit from abstract classes.

  • @selimrbd
    @selimrbd 3 роки тому +246

    You built a simple and practical example that progressively incorporates in a natural manner the SOLID principles "in the right order". That's not easy ! Really inspiring pedagogical work

    • @ArjanCodes
      @ArjanCodes  3 роки тому +35

      Thanks so much! Yeah, it definitely took me a while to figure this out, thanks for noticing :).

  • @rkad93
    @rkad93 3 роки тому +208

    Absolutely great work! It's such a rare occasion to find a good channel, dealing with intermediary stuff and up. Also, really like 'real life' examples in videos so far - makes it so much easier to memorize.

    • @ArjanCodes
      @ArjanCodes  3 роки тому +13

      Thank you so much, that’s really kind! I agree having real-life examples helps a lot to put it into a useful context.

    • @kayakMike1000
      @kayakMike1000 3 роки тому

      Indeed Arjan earned my sub.

  • @GabrielaGonzalez-od4tj
    @GabrielaGonzalez-od4tj 2 роки тому +13

    This Software Design series fills a gap that almost nobody else seems to be addressing. The real world examples + refactoring process make these videos truly amazing!

  • @ArjanCodes
    @ArjanCodes  3 роки тому +19

    uncle un·cle a) the brother of one's father or mother b) the husband of one's aunt or uncle c) annoying, pipe-smoking computer scientist.
    PS. don't forget to check out the gag reel at the end! ;)

  • @cjgamble21
    @cjgamble21 3 роки тому +17

    Dude you are the absolute best!!!! I am a computer science student in university, and they would never dream of teaching good design like this. This is the first time I've been able to actually understand the usefulness of Inheritance/Polymorphism in OOP.

    • @ArjanCodes
      @ArjanCodes  3 роки тому +3

      Glad to hear the videos are helpful to you!

  • @matrixtoogood5601
    @matrixtoogood5601 2 роки тому +19

    I keep coming back to this video from time to time, it is so well-explained. The order of examples is so good that I was not only able to understand SOLID but make some small refactors in my day-to-day as well to make it adhere to the principles. Amazing work!

    • @ArjanCodes
      @ArjanCodes  2 роки тому +3

      Thanks, glad to hear you like it. It was indeed quite a challenge to have the example make sense for each of the five principles and also be explainable in that order 😁.

  • @adjbutler
    @adjbutler 3 роки тому +31

    Someone in Python who is discussing SOLID! All I can say is "Solid man!"

    • @ArjanCodes
      @ArjanCodes  3 роки тому

      Thanks! :)

    • @adjbutler
      @adjbutler 3 роки тому

      @@ArjanCodes No worries. Really dude, you seem to be the only one doing intermediate level stuff in python. All other intermediate stuff is in C, C++ C#/Java etc... but there are so many people learning to code with python (Go and Rust are looking exciting as well, oh and JavaScript) and need to learn how to write clean code. You are making the world a better place with this channel. So thank you.
      Please also setup a Bitcoin Lightning wallet (Wallet of Satoshi mobile app is good) and show the code in a video so we can donate to you for no fees (everyone charges too much fees when we try to tip guys like yourself.)

    • @monochromeart7311
      @monochromeart7311 3 роки тому +1

      @@adjbutler watch the Clean Code series by Uncle Bob, "Coding a better world together".

  • @proud22beme
    @proud22beme 3 роки тому +23

    the way you walk through examples is brilliant!
    the way code is structured has always fascinated me to no limit, and seeing a live rework done this well is a gem to watch!
    i have started to use composition over inheritance for vast majority of cases for a while now due to it being more flexible.
    and you can apply inheritance to composition as well, so its the best of both worlds in a lot of cases

    • @ArjanCodes
      @ArjanCodes  3 роки тому +1

      Thank you very much! I’m happy you’re enjoying the content. I fully agree regarding inheritance vs composition. I went through that same process a while ago.

  • @liquidpebbles
    @liquidpebbles 2 роки тому +2

    Good quality set, good camera, good clear concise speaker, good audio, good editing, good music, good examples, good explanations, good pacing. Good video. Probably one of the best SOLID vids out there

  • @Matfen815
    @Matfen815 3 роки тому +1

    Nice to finally see a solid video without using the employee pay calculatkr example

  • @zokisvasta
    @zokisvasta 3 роки тому +4

    This is the first video I've seen clearly explaining LSP, how and why it's used, and its violations. Great job.

  • @Mixesha001
    @Mixesha001 2 роки тому +3

    You have an incredible talent to explain things clearly and in a very pedagogical way. Your channel is a gem.

  • @mithunmanoharmithun
    @mithunmanoharmithun 3 роки тому +4

    I have watched many SOLID priciples videos on You Tube and this is by far the best one. Thanks for all the efforts you put in these videos to share your deep knowledge with the world !

    • @ArjanCodes
      @ArjanCodes  3 роки тому +1

      Thank you so much, glad you liked it!

  • @KannanKalidasan
    @KannanKalidasan 3 роки тому +3

    Finally, Solid Content about the SOLID principles in Python 👏👏👏

  • @vladimirkraus1438
    @vladimirkraus1438 2 роки тому

    I like your examples. They so precisely chosen to illustrare the problem at hand. They are neither too complex nor too simplistic. Kudos!

    • @ArjanCodes
      @ArjanCodes  2 роки тому

      Thank you Vladimir, I do pay a lot of attention to creating the right examples - At the moment I think it's about 2/3 of the work that goes into producing a video.

  • @minhajabidin
    @minhajabidin 3 роки тому +3

    This channel is super helpful and quite frankly deserves much more appreciation and attention.

    • @ArjanCodes
      @ArjanCodes  3 роки тому +2

      I'm happy the channel is helpful to you - please spread the word! ;)

  • @shi76b
    @shi76b 2 роки тому +2

    Well written, good presentation, high production value.
    This is easily the best programming advice channel on UA-cam.
    Everybody should subscribe to this.

  • @kurosakishusuke1748
    @kurosakishusuke1748 3 роки тому

    This is exactly what I have looking for in understanding OOP concepts in full picture in many years.

    • @ArjanCodes
      @ArjanCodes  3 роки тому

      Thanks, glad you found it helpful!

  • @picassoofai4061
    @picassoofai4061 Рік тому +1

    Best channel on UA-cam for software design and architecture, Man you just saved us from those weird and complicated tutorials.

  • @rogvids
    @rogvids 3 роки тому

    Suddenly discovered this channel and now addicted to this. Please continue the good work.

  • @tommypauker2600
    @tommypauker2600 3 роки тому

    Your Code example is chosen perfectly and your explanations are on the point. No waffleing, just the pure information in an easy to understand language. Great stuff.

  • @pedu71
    @pedu71 2 роки тому

    perfect explanation for this problem. To the point, with practical examples. Others are using 1000 words to beat around the bush. Love your explanation style

  • @ebukajosephakeru1052
    @ebukajosephakeru1052 2 роки тому

    Being a self taught dev, this channel has been very helpful in my growth

    • @ArjanCodes
      @ArjanCodes  2 роки тому

      Thanks so much Ebuka, glad it was helpful!

  • @thobiaslarsen693
    @thobiaslarsen693 Рік тому

    Just a small side note if anyone reads this, what he shows as the variation of interface segregation is actually not composition, it is segregation. If each of the payment processors CREATED the smsAuth inside of the class, it had been composition, there is some kind of important detail here! :) Anyways, awesome video! :D

  • @TimTurnquist
    @TimTurnquist 2 роки тому

    New(ish) to python. Have been struggling to wrap my head around (and use) SOLID principles for years. This video made BOTH much clearer. Thanks Unkl Arjan!

    • @ArjanCodes
      @ArjanCodes  2 роки тому

      Thanks so much Tim, glad it was helpful!

  • @szabolcsjobbagy30
    @szabolcsjobbagy30 Рік тому

    The most understandable video on SOLID I have ever seen,
    thanks a lot!
    And every time I am amazed how much simpler and more readable Python code is than JavaScript :},
    there is no nested curly braces hell...

  • @Moody0101
    @Moody0101 2 роки тому +1

    this is exactly the channel I was looking for for a year, thanks for this great solid content!!

  • @12nites
    @12nites 2 роки тому

    I really didn't want to subscribe to yet another tech channel but this content is truly high quality. Congratulations and thank you.

    • @ArjanCodes
      @ArjanCodes  2 роки тому

      Thanks! And glad you're here!

  • @kayakMike1000
    @kayakMike1000 2 роки тому

    Love it! Posse of One! Uncle Bob was one of OG agile manifesto signatories.

  • @junaidrehmat6186
    @junaidrehmat6186 2 роки тому

    This is the best demonstration of SOLID principles.

  • @neoluis2003
    @neoluis2003 Рік тому

    Hi Arjan. I just wanted to thank you. There is material in SOLID to talk about for hours, but you have done a great job of distilling the fundamentals in a less than 20 min video with a very clear and didactic python example. Kudos and Thank you very much! 😊

  • @alejandroraulleivailabaca5749
    @alejandroraulleivailabaca5749 2 роки тому

    I've seen this video and followed it's examples several times. Thank you so much for this!

  • @amventures1
    @amventures1 4 місяці тому

    Big Like!! I'm Senior JS developer, recently moving to AI career after PhD in the field. My problem was that I don't know enough Python (especially clean code). I found your channel very helpful as a starting point so I don't have to waste my time learn Python programming from scratch as it's the first time I program. 😅

  • @goldensea9999
    @goldensea9999 8 місяців тому

    I will begin a new job next week and really need to refresh my programming skill. Have to agree with all the comments here. Exactly what I have been looking for.
    A+ for your great work!

    • @ArjanCodes
      @ArjanCodes  8 місяців тому

      Glad the video was helpful in your learning journey! :)

  • @davethorneycroft6166
    @davethorneycroft6166 2 роки тому +1

    You have a gift of making this stuff understandable using real examples . I enjoyed your course as well. Great stuff

    • @ArjanCodes
      @ArjanCodes  2 роки тому

      Thanks you so much Dave. Glad that you like the video.

  • @zeroheisenburg3480
    @zeroheisenburg3480 Рік тому

    Great Job. Not easy to find a example small and compact yet enough to show how the idea works out. I was ready to procrastinate but the pace was so good it kept me on the seat!

  • @Tsteezey
    @Tsteezey 3 роки тому +6

    Loving all the best-practice examples and patterns! They're really helping me get off the ground with my latest personal project of building a chess enginer B) Thanks for all the good content!

    • @ArjanCodes
      @ArjanCodes  3 роки тому +1

      Great to hear, Tyler! Good luck with your personal project, sounds like a nice topic to dive into!

  • @haneulkim4902
    @haneulkim4902 3 роки тому +2

    This is amazing stuff. I've been having hard time finding python tutorials that covers more than just the basics. Thanks a lot Arjan!

    • @ArjanCodes
      @ArjanCodes  3 роки тому +1

      You're most welcome - glad you like it!

  • @simonanderson80
    @simonanderson80 Рік тому

    Best explanation & example of SOLID principle I ever found on UA-cam.
    Thank you so much for making this video

  • @boertush
    @boertush 2 роки тому

    Thanks, I read simple architecture, it skimps over the solid principles and only demonstrates the principles on a design level and I really needed some implementation examples!

  • @tomkirbygreen
    @tomkirbygreen 2 роки тому

    Thank you kind sir. Clear, Calm and Humane. Just what I’m looking for right now.

  • @pghilardi
    @pghilardi 2 роки тому

    For me this was one of the best videos that I found to explain SOLID principles! Kudos to you!

  • @peterkomos8349
    @peterkomos8349 Рік тому

    I start learning design principles and design patterns and I have discovered your YT channel, I think, nothing better could me happen. Nice code, nice explanations and very good inspiration to studying. Thanks for alls.

    • @ArjanCodes
      @ArjanCodes  Рік тому

      That is wonderful to hear, Peter! I'm glad the content has been helpful :)

  • @rutwikhiwalkar9583
    @rutwikhiwalkar9583 3 роки тому +2

    The only video I understood on SOLID. Keep up the solid work!

  • @joaotextor4094
    @joaotextor4094 Рік тому

    Best SOLID explanation video! I came from JS/TS, but I could totally relate how I can implement those principles into my code.

  • @sval4020
    @sval4020 3 роки тому

    Probably one of the best channels on Software Engineering/Development out there! Great job Arjan!

  • @chachki24
    @chachki24 Рік тому

    OMG, I truly think this is the best SOLID video!!!!

  • @maxitorres7
    @maxitorres7 3 роки тому

    It is amazing, this videos are been so helpful for my first job in a US company (From South America). Thanks a LOT!!

    • @ArjanCodes
      @ArjanCodes  3 роки тому +1

      Very happy to hear that the videos have been helpful to you!

  • @awaitingforsunrise
    @awaitingforsunrise Рік тому

    You've done one of the best SOLID explains I ever saw. Your code and explanation is really understandable. Wish I could have such teammate as your. Thank you!

  • @guitarcrax127
    @guitarcrax127 2 роки тому

    Absolutely love your explanation. I bought a Design Patterns book and your pedagogy was an amazing overview of what I can dive deeper into.

  • @TheSweetKizs
    @TheSweetKizs 2 роки тому

    one of the best programming/ software design explanation channel. Keep this up. You vids really clear explain and easy to understand example. Really appreciate the afford.

  • @MohamedAli-dk6cb
    @MohamedAli-dk6cb 2 роки тому

    I am really glad to find this channel by the beginning of the 2022. Thank you very much for the wonderful content. You deserve 100+ Millions subscribers.

    • @ArjanCodes
      @ArjanCodes  2 роки тому +1

      You're so kind - I'm happy you like the videos!

  • @Moody0101
    @Moody0101 2 роки тому

    I thought I was decent in oop, but after watching this video, I am not really that good at applying good design to my code, that helped alot bro, thank you alot, and btw, I love the way you code and the sound of the keyboard and all that stuff.
    further more, I would like to point out something hat I w I like about your python videos, it seems like you bring alot of use cases and real world applications for the language which something I always have wanted to do in youtube since no one does it, but now since I found that channel, I can enjoy seeing such great practical content that really does what I always wanted people to do (but probably I will make some videos if I get a new laptop soon).
    anyways thanks, I will subscribe with my 4 youtube accounts lol.

  • @tomvonheill
    @tomvonheill 3 роки тому

    Great video, I like to come back here every once and a while to refresh

    • @ArjanCodes
      @ArjanCodes  3 роки тому

      Thanks Tom, glad you like it!

  • @golammuhaimeen2825
    @golammuhaimeen2825 3 роки тому +1

    Arjan, thank you so much for your content. I've been learning so much form you over the past month!

    • @ArjanCodes
      @ArjanCodes  3 роки тому

      Thank you - glad you like the content!

  • @judegomolina
    @judegomolina 2 роки тому

    I got a real understanding of the SOLID principles the first time I watched this video (well... I had to rewatch it a couple of times 😂), and I've been applying them in my code ever since with really noticeable improvements; moreover, today I gave a talk at my job on this topic based mostly on the things I learned from this video and it all went super good. Thanks for the fantastic content and keep up the great work Arjan!

  • @richardvdoost
    @richardvdoost 3 роки тому +2

    Lekker bezig Arjan!
    I admire your discipline and consistency of doing a video every Friday. That's the way to grow. It's great to see you covering higher level topics like design principles / architecture / clean code in the context of Python, which is not common here on yt.
    I just happen to be reading Bob's 'clean architecture' book right now after finishing 'clean architectures in python' and `architecture patterns in python` (all great) because I've started designing a complex piece of software for my startup and want to keep it clean & maintainable.
    Uncle B writes there's a bit of misunderstanding about the SR principle. People tend to think a module/class should "do only one thing". That is a good principle too, but SR originally means a module/class should only be responsible to one "user" or "stakeholder". I guess that's the group of humans (or robots) that ends up using the business logic described by the code, not sure if I understand it 100% myself. But it's ok if a class does a bunch of different things, as long as it's being done serving a common goal. This way the class only has one "reason to change" and that's useful.
    Curious to see what else you have in the pipeline. If you need suggestions, going deeper into Clean Architectures, TDD, Event Driven, if you resonate with those, would be amazing 👌

    • @ArjanCodes
      @ArjanCodes  3 роки тому +2

      Dankjewel Richard!
      You make a good point that having a single responsibility doesn’t mean doing only a single thing. In the example, the order class also has multiple methods doing different things. In my experience, how responsibilities are divided over classes is for a large part decided by the structure of the data. For example, moving the total price method outside of the order would introduce a lot of coupling, because it needs to know a lot of details about the order data, which is not the case for payment processing.
      Thank you very much for those suggestions, keep them coming! I’ll add those to my list of video ideas (which is getting quite large).

  • @michaelcorvin1129
    @michaelcorvin1129 3 роки тому

    Thanks, Arjan, for a brilliant, clear exposition of SOLID with simple, tangible examples. Like with your excellent 'smelly code' videos it's a good lesson in how one should brutally and with malice aforethought refactor, refactor and refactor until your code is concise, readable and makes you giggle out loud because its soooo pretty and smells beautiful! Your team will will use & love your code and you may well be surprised how reusable and extensible it is in the future. It may take a bit more time up front than just going with the first hack that runs and spits out a (probably) correct answer (i.e., as is most 'engineering' analyst Python, Matlab, Perl, R, etc etc etc), but your future self will thank you for it. cheers!

  • @florentinanggrainipurnama6952

    One of the best videos out there on design patterns in Python! Instantly subscribed!

  • @rilauats
    @rilauats Рік тому

    Besides my comment on Single Responsibility -->> you actually do great intro presentation of SOLID - your simplifications make good sense. THX!
    I have taught pro developers code quality (including SOLID and its package principle siblings) for decades. I appreciate when you manage to introduce potentially complex topics to developers that are new to the topic. I know how difficult this can be based on own successes and failures. You earned yourself a new subscriber!

    • @ArjanCodes
      @ArjanCodes  Рік тому

      Thank you so much! I remember when I prepared this video, getting the example to make sense was a real challenge.

    • @rilauats
      @rilauats Рік тому

      @ArjanCodes , I will watch your back catalog, albeit takes a while being busy myself.
      Looking forward and ready to share tips/tricks/experience

  • @ConnorJohnson318
    @ConnorJohnson318 3 роки тому +15

    This was a great video, thank you. The composition step, after Interface Segregation and Dependency Inversion, looks a lot like Dependency Inversion. I had expected you to use a mixin on the subclass, but instead you added authorizer argument to the initializer. When I think of composition, I usually think of mixins. Can you touch on the pros/cons of mixins, versus adding functionality through the initializer, in the context of composition?

    • @ArjanCodes
      @ArjanCodes  3 роки тому +12

      Hi Connor, thanks! I don’t use mixins very often, for a few reasons. First, they don’t adhere to what a parent-child class relation means in traditional OO programming (the ‘is a’ relationship). Second, I don’t like how mixins potentially create strange coupling issues, for example mixin A might define a method X, mixin B uses that method X, and finally, a class C then inherits from both A and B to combine the two. But at the same time, both mixins A and B can’t be used independently in a meaningful way. I much prefer composition/association (a ‘has a’ relationship), which models the dependencies explicitly and doesn’t break OO philosophy.

    • @ConnorJohnson318
      @ConnorJohnson318 3 роки тому +2

      ​@@ArjanCodes Thank you, that sounds like a pretty good reason to avoid mixins, then. Come to think of it, I recall running into unexpected behavior when I used multiple mixins in one class. In Python, the order in which you include mixins affects how the child class works. Thank you for taking the time to address my question.

  • @DandyBallbag
    @DandyBallbag 3 роки тому

    Just came across this channel and it is very informative.
    I was following along with this video and with each iteration I was thinking "well, that makes sense" until we got to the 4th.
    I then found myself wondering how we changed the code so many times and became lost. 🤣
    Clearly I need to watch this video a few more times to be able to get my little head around it.
    The video is time stamped and each section I feel is concise. So it should be easy enough.
    Thank you for sharing your wisdom!

  • @KonstantinPrydnikov1
    @KonstantinPrydnikov1 2 роки тому

    the best way of solid describing for last 10 prog-year i saw )

  • @0DoLLFin0
    @0DoLLFin0 2 роки тому

    Very clear explanation makes it sound as smth easy to understand.
    Thank you, mate.
    Good job.

  • @pthube
    @pthube 3 роки тому

    Thanks Arjan for explaining the advanced concept in programming with code.. this channel really help to take leap from intermediate level to expert level..

  • @Maduxi88
    @Maduxi88 Місяць тому

    thnx alot now i fully understood the Dependency inversion principle, it finally clicked

  • @heljhumenad
    @heljhumenad 3 роки тому +1

    This is so good that my brain synapses rewire for SOLID topic in Software Design

  • @franzweitkamp
    @franzweitkamp 3 роки тому +5

    Small suggestion: total price can be: sum(price * quantity for price, quantity in zip(self.prices, self.quantities))
    Keep up the good work!

    • @ArjanCodes
      @ArjanCodes  3 роки тому +2

      Thanks! Indeed, that’s a nice, short way to do it.

  • @mehmetcakoglu866
    @mehmetcakoglu866 2 роки тому

    Perfect explanation. Thanks for your great effort to teach this complicated subject to who wants to know about OOP principles.

    • @ArjanCodes
      @ArjanCodes  2 роки тому

      Thank you Mehmet, glad to hear you liked it!

  • @kalik54
    @kalik54 3 роки тому

    Man, you made the best video about SOLID, thanks!

  • @mateuszp2038
    @mateuszp2038 2 роки тому

    this is the best explanation I have seen so far, I still don't understand it, but i feel I kinda get it better

  • @alanbal888
    @alanbal888 10 місяців тому

    If I'm not mistaken the pattern you choose to use instead of creating a new interface for the SMS Processor (favoring composition over inheritance) is the Strategy Pattern, this pattern defines a family of algorthms across different concrete classes and can be interchanged at runtime by the class that requires them.

  • @voinywolnyprod3046
    @voinywolnyprod3046 2 роки тому

    Very detailed explanation! Thank you so much for making me understand Liskov Substitution principle. This was that tough part fo me.

  • @eZwoodb1ne
    @eZwoodb1ne 2 роки тому

    You're my favourite python youtuber! Always great examples and beautiful code

  • @Musicall60
    @Musicall60 3 роки тому

    Thanks for making videos this clear. These concepts are quite difficult as a beginner and you make them seem easy.

  • @Fanmade1b
    @Fanmade1b 2 роки тому

    You manage to put this topic, which is far from easy to explain, into less than 20 minutes and sill keep it in a good pace while implementing good and easy to follow examples.
    You have my respect for that.
    The only other course I found so far that is on an equal level is a paid one that is almost an hour in length. "SOLID Principles in PHP" by Jeffrey Way on Laracast.
    I've put a link to your video in our intranet and I will trey to make it mandatory for all our devs that they have to watch it at least once :)

  • @Perfect_soul__66666
    @Perfect_soul__66666 3 роки тому +1

    Very good explanation. I found best SOLID explanation till date. God Bless You. Please make some videos on setuptools and other design patterns.

  • @nadirabdulhaqq5601
    @nadirabdulhaqq5601 2 роки тому

    Wow! I learned so much in just under 20 minutes! Great example too.

  • @orie239
    @orie239 3 роки тому

    Great video, I was looking for a channel that talks beyond the basics of programming for a while, there's a lot to learn here!

    • @ArjanCodes
      @ArjanCodes  3 роки тому

      Thanks, glad you liked it!

  • @Evkayne
    @Evkayne 3 роки тому

    amazing, i literally read books but could not understand the full process. thank you very much

  • @tongluo9860
    @tongluo9860 Рік тому

    thank you Bob for this great series. You explain the concepts very clear and concise. looking forward to more episodes.

  • @johanneszwilling
    @johanneszwilling 2 роки тому

    🙃 Really great and brief illustration. Will be watching this way more than once!

  • @foobar4344
    @foobar4344 3 роки тому +1

    Great video! I love all your content, it has been so very helpful! It is so insightful to hear you talk about design concepts *while* you are implementing them with a simple example. In my experience, this is a rather rare feature of programming related educational videos -- most of the time they're focused on outcomes and not principles (and if they are focused on principles, they're seldom integrated into a single example that is refined -- with explanations -- over the course of a video). You have such a great style and approach to these videos!
    This is video is a gem that I will return to several times in the future just to check myself on future projects. I initially discovered your channel while looking for some info about the observer design pattern and I just kept watching more because it was really well done. I would love to see some discussions/examples of frameworks like MVC vs other architectures, perhaps as a series where you roll out a small full-stack app. Love your content! THANK YOU for the work that you do!

    • @ArjanCodes
      @ArjanCodes  3 роки тому +1

      Thank you @foobar for your suggestions, and I’m very happy that my videos are helping you!

  • @OrtoInScatola
    @OrtoInScatola 2 роки тому

    well done! I liked how you were able to incorporate each principle progressively in your code.

    • @ArjanCodes
      @ArjanCodes  2 роки тому

      Thank you Francesco and thanks for noticing! I remember it was quite tricky ;).

  • @teyiowuawi7758
    @teyiowuawi7758 9 місяців тому

    really enjoyed this video and how you broke it down! Definitely up there in terms of simplification and seeing a example similar to the real world!

    • @ArjanCodes
      @ArjanCodes  9 місяців тому

      Glad you enjoyed the video!

  • @MisterDeGreg
    @MisterDeGreg 2 роки тому

    Thanks for the high quality video and easy-to-understand explanations!

  • @eskevv446
    @eskevv446 2 роки тому

    Great work!! Your videos are the best I've seen and what's helped me the most to understand core OO principles for better code design and easy solutions. You're the best at teaching this stuff!

    • @ArjanCodes
      @ArjanCodes  2 роки тому

      Thank you - glad to hear you like the videos!

  • @Diskretisierung
    @Diskretisierung 2 роки тому

    Nice one!
    You can look it severeal times and still gain something else from it.
    Thanks

  • @dennycrane2938
    @dennycrane2938 Рік тому

    Single Responsibility Principle is often misunderstood and I think it happened again here in the common way which is to conflate it with separation of concern. SRP is a people-focused problem whereas SoC is a modular cohesion problem. The examples given in Uncle Bob's book explains it pretty well. In short, it addresses an issue where you have multiple different stakeholders giving you requirements for the same package/service/etc -- in DDD you would see this as an invalid overlap of subdomains. For example, when payroll and Human Resources have cause a conflict in the same "employee" table as they have a different definition of "salary" and how its calculated (or if it's calculated at all; it might static). SME/VP 1 says you have to do it one way whereas SME/VP 2 says you have to do it another way which could take the entire department down because of that conflict. Or where Sales and Marketing have two different definitions of "Customer" with different journeys. The entity has more than one reason to change in that you are getting conflicting requirements from what is essentially two opposing forces. So the problem is similar in that the class is conflicted, but with SRP, the conflict is caused by people, and with SoC the problem is caused by low cohesion (actually doing too many unrelated or loosely related things).

  • @ajayshaan8573
    @ajayshaan8573 3 роки тому +3

    This video is worth its weight in gold and this series is amazing! Thanks a lot Arjan! Please do a separate series on the GoF design patterns with Python examples. :D

    • @ArjanCodes
      @ArjanCodes  3 роки тому +2

      Glad you liked it Ajay! And thank you for your suggestion. There's definitely more design patterns related content upcoming.

  • @mamtabhagia1194
    @mamtabhagia1194 13 днів тому

    Thanks for this video, you have a great knack for teaching!

  • @quarduroy1
    @quarduroy1 2 роки тому +1

    Incredible. Thank you for your efforts in making these videos!

  • @michael.manasian
    @michael.manasian 2 роки тому +1

    17:15
    It looks like the code in this example violates the Liskov Substitution Principle.
    We have a base class named Authorizer which is basically an interface. In our client-code we depend on it, waiting that its subclass won't force us to change anything because of a different implementation (verify_code, not_a_robot). You should've specified an abstract method in the base "Authorizer" class and implement it in subclasses. Correct me if I'm mistaken.

  • @iChrisBirch
    @iChrisBirch 3 роки тому

    EXCELLENT work! Love your videos, so helpful with the examples and explanation. The pace of the video and explanations and sound and video quality are spot on as well!

  • @sep69
    @sep69 3 роки тому +1

    Thank you very much for this great video. So well explained in 20 mins only. This will surely help me !

    • @ArjanCodes
      @ArjanCodes  3 роки тому

      Thank you Mark, happy you liked it!

  • @KulasangarGowrisangar
    @KulasangarGowrisangar 2 роки тому

    superb and simple explanation to the SOLID principles

  • @vskovzgird
    @vskovzgird 3 роки тому +1

    Finally somebody clears this principles for me. Great examples, thank you! Gag reels))

    • @ArjanCodes
      @ArjanCodes  3 роки тому

      Glad it was helpful, Vladislav!