SOLID Principles: Do You Really Understand Them?

SOLID Principles: Do You Really Understand Them?

Alex Hyett

11 месяцев назад

123,213 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@alanchen4257
@alanchen4257 - 25.12.2023 17:35

Clear & Concise !!

Ответить
@khalidelgazzar
@khalidelgazzar - 23.12.2023 18:15

Great video .. thank you 😊

Ответить
@sobit0ks
@sobit0ks - 23.12.2023 02:44

Easiest LSP explanation ever. Thank you.

Ответить
@eio4528
@eio4528 - 16.12.2023 21:54

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.

Ответить
@testingfsqc
@testingfsqc - 16.12.2023 01:26

This is a SOLID video on S.O.L.I.D!

Ответить
@simonslater7257
@simonslater7257 - 08.12.2023 07:45

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!

Ответить
@togofar
@togofar - 02.12.2023 20:16

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.

Ответить
@AlexKashie
@AlexKashie - 20.11.2023 21:40

Brilliantly elaborated... Thank you Alex!

Ответить
@PopLucian90
@PopLucian90 - 14.11.2023 13:44

Going a bit too fast. But good info otherwise.

Ответить
@naufalikhlasksatria9228
@naufalikhlasksatria9228 - 09.11.2023 18:03

Indonesian spokeswoman said : Soliiiid?

Ответить
@jamestacular
@jamestacular - 02.11.2023 18:38

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.

Ответить
@mymacaintwag
@mymacaintwag - 22.10.2023 12:33

Here are the principles and here is a class. I have no classes!

Ответить
@bubumimo
@bubumimo - 04.10.2023 11:17

Your conclusion is absolute important.

Ответить
@marna_li
@marna_li - 23.09.2023 22:30

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.🙂

Ответить
@marna_li
@marna_li - 23.09.2023 22:28

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.

Ответить
@smileoez
@smileoez - 17.09.2023 13:49

Thank you very much it helped a lot to comprehend sense of all of principles

Ответить
@_mubir
@_mubir - 16.09.2023 06:42

nice && concise.carry on.

Ответить
@jneves8827
@jneves8827 - 09.09.2023 14:32

Thanks so much, I don't understand english very well. However, I really figured out your explanation and gained more one follower.

Ответить
@anlcangulkaya6244
@anlcangulkaya6244 - 07.09.2023 18:46

How to be worst programmer principles

Ответить
@korniszon68
@korniszon68 - 07.09.2023 16:17

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. :>

Ответить
@vishalkarthik.v7209
@vishalkarthik.v7209 - 06.09.2023 19:17

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

Ответить
@andrewmarshall195
@andrewmarshall195 - 04.09.2023 14:45

This is totally brillant....short and concise and really understandable! Top class this!

Ответить
@xyyx1001
@xyyx1001 - 31.08.2023 17:53

Easiest SOLID explanation, especially SRP. Too many others parrot abstract concepts without a concrete example.

Ответить
@hristopisarev1827
@hristopisarev1827 - 31.08.2023 15:41

The best explanation I ever heard. Man, you are great! Keep up the great work 👏.

Ответить
@victorialacerda6919
@victorialacerda6919 - 28.08.2023 04:02

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.

Ответить
@217-sritejrajulu6
@217-sritejrajulu6 - 22.08.2023 16:04

this guy is so awesome he explaiend stack and heap in suck a way ill remember forever

Ответить
@takatakboy
@takatakboy - 22.08.2023 14:54

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!

Ответить
@residentcitron
@residentcitron - 20.08.2023 12:22

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.

Ответить
@lysithea9293
@lysithea9293 - 01.08.2023 13:19

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?

Ответить
@sharadregoti7742
@sharadregoti7742 - 26.07.2023 20:58

Bro, You got teaching skills. Nice!!!

Ответить
@yazanmansour1231
@yazanmansour1231 - 21.07.2023 20:43

you are amazing
best video for SOLID

Ответить
@NoahNobody
@NoahNobody - 19.07.2023 22:57

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.

Ответить
@osivwiokiti9897
@osivwiokiti9897 - 11.07.2023 23:53

Best explanation of solid I've seen. thanks.

Ответить
@alps5241
@alps5241 - 09.07.2023 06:26

One of the best explanations of the SOLID principles!

Ответить
@sebon11
@sebon11 - 22.06.2023 11:46

Btw man - do you mind explaining CI & CD in one of your future videos? Would love that!

Ответить
@punkerIII
@punkerIII - 18.06.2023 17:43

Thank you for your content!

Ответить
@sebon11
@sebon11 - 17.06.2023 20:11

Thanks for the video dude, rly great explanation!

Ответить
@technicaltheb034
@technicaltheb034 - 17.06.2023 07:07

It'd be great if you write code while explaining.

Ответить
@hamaed19
@hamaed19 - 17.06.2023 01:50

Very useful content, Keep it up 👍

Ответить