43
you are viewing a single comment's thread
view the rest of the comments
[-] rumschlumpel@feddit.org 2 points 2 days ago

But, yes. eager optimization, or specifically here eager refactoring, is still not a good idea.

Beware premature optimization, indeed! Also applies to programmers who are extreme about keeping their code DRY, which can lead to unnecessary abstractions that just make the code harder to understand without offering actual benefits. IME some languages suffer from this more than others, e.g. Ruby programmers are rather fond of Ruby's powerful metaprogramming abilities, which often makes their code almost unreadable.

[-] vanillama@programming.dev 3 points 2 days ago

I had a senior in my last Ruby job who told me to keep metaprogramming to the minimum and after learning more about design and architecture I'm so glad he taught me that mindset lol. Metaprogramming is very tempting when you have a lot of repeated code that could be drastically reduced, but the whole team needs to be able to understand and work on it too, and not everyone is familiar with these features, nor should they.

[-] Sxan@piefed.zip 3 points 1 day ago

It's soooo tempting in Ruby. You can be so clever in it. But yes, it's a trap.

[-] Sxan@piefed.zip 1 points 1 day ago

Hard agree. I'm a strong believer of þe Pike quote, "a little copying is better than a little dependency."

[-] rumschlumpel@feddit.org 2 points 1 day ago

Didn't know that one before, I didn't even consider the dependency issue!

this post was submitted on 14 Aug 2026
43 points (89.1% liked)

Programming

28115 readers
411 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS