My FeedDiscussionsHeadless
Sign in
Log inSign up
Discussions
Join the conversation: discuss and debate with your favorite writers
Tim Sage

5 comments

Elisha Okon
Elisha Okon
May 15, 2023

Amazing

1
·
·1 reply
Jesuferanmi Allentina
Jesuferanmi Allentina
May 15, 2023

Not a fan of techy articles, but you broke this down so well and make it easy to read, and understand.

Amazing article 💙✨

1
·
·1 reply
Discuss

·

95 likes

·

3.0K reads

5 comments

SHRIVATSA D DESAI
SHRIVATSA D DESAI
Nov 15, 2023

That's nice article. YO anime fan here🔥😁😃

10
·
Lucas Akira Ayabe
Lucas Akira Ayabe
Nov 16, 2023

Great article is rare see people showing SOLID with functions (in not a functional way), but there are few things wrong.

The OCP is wrong, in that example you aren't extending the base object, you're modifiyng it soo breaking the OCP.

A better approach is pass objects tied by the same contract instead of an object with a type property, as in this way you'll be using polymorphism to handle the dynamic dispatch instead of implementing coupling a function to an object.

In the LSP example you're breaking the principle too. Your example makes the function depend on a union type, but the LSP is a complement to the DIP as the goal is make the sub-types behave like the base types, and a sub-types are intersection types not union types.

By making the sub-types behave like the original you can pass they interchangeably without the need of a caution because if one thing exist and behave in the base, It is the same in the sub-type. A union type goes in the oposite direction by making a function depend on a value that can be different.

Other approach you could do is in the function type instead of the param type, by applying the ideas of contravariance and covariance.

And the DIP example is good, but instead of implementing a interface-like mechanism, you could just made the function depend of other function, this effectly could have made the function depend on other abstract thing that is other function signature.

The notify function still breaks the principle as it is coupled with the function that gets the contact, that is a concrete module, receiving that as a param should fix this.

10
·
·2 replies

14 comments

Syket Bhattachergee
Syket Bhattachergee
Nov 9, 2023

👍 Impressive insights on dynamic routes in Next.js!

1
·
·1 reply
Bernardo Gomes de Abreu
Bernardo Gomes de Abreu
Nov 12, 2023

Good article!! Thanks for sharing !!

1
·
·1 reply
Discuss

·

129 likes

·

3.4K reads

89 comments

Abdul Nadeem
Abdul Nadeem
Nov 27, 2023

Good article thanks i got information that i was required

1
·
Yachhin arafat
Yachhin arafat
Nov 27, 2023

Good article thanks

1
·

6 comments

Alberto Gonzalez
Alberto Gonzalez
Apr 12, 2023

A very interesting read. I read half of it last week and I returned today to finish it. Now the bookmark will also help me as a guideline for my future presentations. Good work!

1
·
Alberto Gonzalez
Alberto Gonzalez
Apr 12, 2023

Besides the book that you recommend in the article, do you have specific resources to learn how to plot data effectively using python?

I started the Seaborn course on Kaggle, and I think it's good so far, but one or two more resources would be great. Thanks!

1
·
·3 replies