News for hackers. Stuff that matters.
Re:DRY is an over-rated programming principle? by EugeneOZ on Thursday July 07, 2022 @05:51AM (#32011854)
I can't disagree more. DRY forces you to create pure reusable code, and split your code into small pieces. When I read such code I need to understand just a few pieces.
Re:DRY is an over-rated programming principle? by theshrike79 on Thursday July 07, 2022 @07:11AM (#32012514)
You need multiple cases of duplication (repeating yourself) before you can infer a reusable piece of code.

If you make everything as generic and reusable as possible from the beginning, you'll end up with messy code that has way too much options to set for every simple operation.

Re:DRY is an over-rated programming principle? by dhzhzjsbevs on Thursday July 07, 2022 @06:12AM (#32012039)
It also leads to overengineered framework code that only exists to support the glue code that is now required to pull distant code together.

Increasing the distance between inputs and outputs increases complexity.

Reusable code isn't all that reausable when nobody understands it or things are so fragmented people can't figure out how to operate the code base.

This isn't a rule. It's a moderation thing.