Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'Abusing DRY principle' section #12

Merged
merged 1 commit into from
May 25, 2023

Conversation

erni27
Copy link
Contributor

@erni27 erni27 commented May 25, 2023

This PR adds 'Abusing DRY principle' section.

@erni27
Copy link
Contributor Author

erni27 commented May 25, 2023

@zakirullin: I really appreciate what you did. You covered a lot of things developers find really hard to understand in so concise and easy to read way. I wish I had something similar at the beginning of my journey.

When I was reading this handbook I immediately thought of DRY. So fundamental principle but overused increases cognitive load a lot.

I hope you will forgive me for not submitting the issue first but I think we can have more valuable discussion if the text is already written. Please let me know if the proposed section inlines with your idea about this handbook.

@zakirullin
Copy link
Owner

zakirullin commented May 25, 2023

Oh, really, that idea fits the handbook so much!

Some time ago I was sending this article to people obsessed with DRYiness.

Now we can use your well-writen section, which explains things so neatly.

Bravo, such a nice contribution! 👏

@zakirullin zakirullin merged commit 7244b41 into zakirullin:main May 25, 2023
@erni27
Copy link
Contributor Author

erni27 commented May 25, 2023

Great to be a part of this. Thanks!

Yep, it is really hard to discuss with someone who is crazy about DRY. On the other hand, I can't judge them. It was literally the first principle I learnt as a programmer. Over the years I figured it doesn't have to be necessary a good thing. Unfortunately many times the hard way.

Everything is like that. Abuse can change the best thing into the worst one and balance comes from the experience and maturity. Hopefully someone would learn from our mistakes. 👨‍🦯

@zakirullin
Copy link
Owner

zakirullin commented May 31, 2023

@erni27 Just letting you know that your section was discussed out loud here: https://www.ivoox.com/en/it-s-not-that-complicated-audios-mp3_rf_109193453_1.html

People love it! 👍

@erni27
Copy link
Contributor Author

erni27 commented May 31, 2023

@zakirullin: Thanks for letting me know! It seems like the handbook is on fire. 🔥 That's really good, the world should know about it. 💪

@zakirullin
Copy link
Owner

@erni27 https://news.mailings.appliedgo.net/x4i4i8w7o3/?utm_source=appliedgo-twitter

They mentioned DRY as well :)

It's seems like this paper gets attention by the Go community :)

@erni27
Copy link
Contributor Author

erni27 commented Jun 3, 2023

@zakirullin: I consider myself a 'Gopher' so good to know other Gophers are excited about this handbook too. 💪 Also, not sure if you've seen it but Rob Pike once gave a talk about 'Go Proverbs'. The quote in the DRY section is actually from that talk. He covered a lot of things there. Although it has 'Go' in title, it is really insightful for any programmer.
'Go Proverbs' by Rob Pike: https://youtu.be/PAAkCSZUG1c.

I was thinking also about adding two more sections.

  1. 'Good abstractions are discovered, not invented' - this one is actually implicitly mentioned in 'Abusing DRY' and 'Hexagonal/Onion architecture' sections but anyway I think it deserves a few words.
  2. 'High performance madness' - we are trying to be smart so we end up writing a lot of (unneeded) optimisations. High performance doesn't come from air, it comes from the complexity increasing cognitive lead. In 99% cases, this is not needed. We should aim for the correctness and simplicity first. And optimise only if it really brings a value (and the need is proved by thorough benchmarks).

Let me know what you think about the ideas. We can discuss them deeper.

@zakirullin
Copy link
Owner

zakirullin commented Jun 9, 2023

@erni27 Wow! Then we share a thing in common :) Go is my favourite language, it finally took C's place in my heart. Yes, I saw this talk, and I like it!

High performance madness

I liked this idea, I believe we should highlight this in the handbook, let's try! Issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants