Remix.run Logo
airstrike 2 days ago

I just think DRY is overblown. I just let code grow. When parts of it become obvious to abstract, I refactor them into something self contained. I learned this from an ice wizard.

When I was younger, writing Python rather than Rust, I used to go out of my way to make everything DRY, DRY, DRY everywhere from the outset. Class-based views in Django come to mind.

Today, I just write code, and after it's working I go back and clean things up where applicable. Not because I'm "following a principle", but because it's what makes sense in that specific instance.

sandos a day ago | parent | next [-]

I feel very strongly after 20+ years of development that DRY is a good guideline, but I have also seen many, many times that trying to follow it to the letter is actually detrimental and results in too complex solutions.

SketchySeaBeast a day ago | parent | prev [-]

I can agree with that - honestly a constant focus on DRY seems overly zealous to me. I only start DRYing if I see a need.