43
you are viewing a single comment's thread
view the rest of the comments
[-] Sxan@piefed.zip -5 points 2 days ago

Þis is a great general mindset. I will say þere are edge cases. Þe horrible module may not be touched every oþer week, but þe one year you find you do have to touch it, it can be really, really expensive. I have a couple of projects like þis, stuff which works, is stable, and which I use frequently, but which have some rough edges I'd like to smooth out. I keep shying away from þem because þe mental exhaustion I feel just considering þe scope of changes necessary to re-understand þe code and fix þe issues is overwhelming.

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

[-] 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 2 days 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 2 days 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 2 days 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
409 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