Комментарии:
Clear & Concise !!
ОтветитьGreat video .. thank you 😊
ОтветитьEasiest LSP explanation ever. Thank you.
ОтветитьI don't want to argue against SOLID principles because I can't say I completely and fully follow every rule. However, extending classes to avoid changing them sounds like a long term recipe for disaster. A codebase I once worked had a main class for a product with a ridiculous amount of additional classes that extended it for all kinds of functionality that was introduced over time. It quickly became a huge mess. I argue that there are absolutely moments where a class can and should be changed.
It seems to me many of these principles are designed to help prevent a developer from stepping on their own toes. I argue people should pay closer attention to what they're doing and if they don't understand the code they're changing, they're doomed to make mistakes. They need to understand the code! It's like a mechanic modifying a car without knowing how the engine truly works, IMO. You're doomed if that is the case.
This is a SOLID video on S.O.L.I.D!
ОтветитьPlease cover CUPID, this was a really good talk and I'd love to see this through the CUPID lens :). I've just seen the "CUPID for joyful programming" talk and really liked it, thank you for that recommendation!
ОтветитьI wouldn't say that the SOLID principles are too vague to be useful but I do agree that they are very abstract. I've come across many developers who know what the principles say but they don't really use them because they don't know when they should be using them or how to translate them into code. Maybe we need a set of more concrete principles to fill that gap.
ОтветитьBrilliantly elaborated... Thank you Alex!
ОтветитьGoing a bit too fast. But good info otherwise.
ОтветитьIndonesian spokeswoman said : Soliiiid?
ОтветитьThe open closed principal is the only one that I don't think is realistic. Basically the way I understand it is once your write code it becomes untouchable. You can only add to it but coding around the original implementation by using extension methods or new implementations of the original interface.
ОтветитьHere are the principles and here is a class. I have no classes!
ОтветитьYour conclusion is absolute important.
ОтветитьI wouldn't say that "interface" in interface segregation is about C# or Java interfaces. Simply that you should segregate the interface for your class. It could be an interface, but not necessarily. So I try to keep it a language neutral term. Keep up the good work! I find it great.🙂
ОтветитьExtension methods are the closest thing that C# has to traits. Hopefully, we will have more universal extension in an upcoming version, as Mad Torgersen and Dustin Campbell demonstrated at Build 2023. But still, if you are looking for changing behavior at runtime, then the decorator pattern is the one. Btw. Forwarding stuff to another class is an example of indirection. One should be careful of that. Not to do it just because.
ОтветитьThank you very much it helped a lot to comprehend sense of all of principles
Ответитьnice && concise.carry on.
ОтветитьThanks so much, I don't understand english very well. However, I really figured out your explanation and gained more one follower.
ОтветитьHow to be worst programmer principles
ОтветитьWe actually have a dude in our project that brought this SOLID up to a single line. Explosion of interfaces, ununderstandable and not needed abstraction layers and general confusion - that's what we got as a result.
BUT, we also get very very nice skeleton to build on top of. Especially - when it comes to Repository that we actually used. We have 2 entirely diffrent databases (firestore and mongo) and one in-house implemented (by a humble author of this post) in-memory DB mocking the firestore behaviour. So we really can simply mock any behaviour we want, and the most common dependency to the DB is simply non-existent. We simply change the implementation to "mock-db" and define whatever we need for the test. Exchange to MongoDB was also very simple in comparation to what it could have been without having extracted right interfaces...
But...
One have to admit - it has taken a LOT of work to bring the code to this level. Probably any of those issues might have been solved in less time simply by brute-forcing code edition. :>
For decorative pattern , instead of using it can't we just copy code and modify , in what scenario does it help 🙂, I couldn't get clarity in this part
ОтветитьThis is totally brillant....short and concise and really understandable! Top class this!
ОтветитьEasiest SOLID explanation, especially SRP. Too many others parrot abstract concepts without a concrete example.
ОтветитьThe best explanation I ever heard. Man, you are great! Keep up the great work 👏.
ОтветитьJust came here to say hello from brazil! I've started moving careers to data science and your videos are so well written and the content so well explained that I've been binge watching them! thank you for posting.
Ответитьthis guy is so awesome he explaiend stack and heap in suck a way ill remember forever
ОтветитьThat BTTF display at the back was so distracting cause it makes me want to buy one and I couldnt stop staring at how cool it is!
ОтветитьIn the context of the Interface Segregation Principle (ISP), when we refer to a "client," we're talking about a class, module, or component that uses or depends on an interface, not a class that implements the interface.
ISP states that clients should not be forced to depend on methods they do not use (call / invoke). If a class has three methods but the client only calls one of them, the client still has a compile-time dependency (due to the import statement) on the other two methods. The methods could be: retrieve(), save() and delete(). If the client code only calls save(), then it is cleaner for the client code to depend on a 'Saver' interface, rather than the concrete class which implements all three methods.
Also, it is easier to use simple interface both on the caller's (client) side and on the implementation side.
As a beginner programmer, I found your video much clearer than the others I've watched on the SOLID principles.
One thing I'm still unsure about, should child classes implement all arguments defined in the constructor of the parent class? (I guess that would belong to the Interface Segregation part)
E.g. (don't mind the made up syntax)
ParentClass:
constructor(a, b, c = true, d = false):
self.a = a
self.b = b
self.c = c
self.d = d
ChildClassA extends ParentClass:
# doesn't define a new constructor and uses
# all the arguments of the parent's constructor
ChildClassB extends ParentClass:
constructor(a, b, e):
super.constructor(a, b)
self.e = e
Does the fact that arguments 'c' and 'd' are unused in ChildClassB break the SOLID principles?
Bro, You got teaching skills. Nice!!!
Ответитьyou are amazing
best video for SOLID
Great work. I took hours to read about these 5, barely learned them, then promptly for got them a little while after. It all came back super quick and I think I learned them much better after watching this video.
ОтветитьBest explanation of solid I've seen. thanks.
ОтветитьOne of the best explanations of the SOLID principles!
ОтветитьBtw man - do you mind explaining CI & CD in one of your future videos? Would love that!
ОтветитьThank you for your content!
ОтветитьThanks for the video dude, rly great explanation!
ОтветитьIt'd be great if you write code while explaining.
ОтветитьVery useful content, Keep it up 👍
Ответить