DEV Community

loading...

Discussion on: We Should All Be Writing WET Code

Collapse
ericbeland profile image
HereC

I think there's a few problems with WET. Firstly, when you copy, you may not realize whether you're copying the first, or the copy of a copy of a copy because the names will all be different. So advocating for a little wet is advocating for a viral bloat-iness. The find-all-the methods problem is compounded because these code bases naturally are bigger than their DRY counterparts. I've personally been bit by this. As a newbie to a particular codebase, I implemented the exact feature modification asked for by the Product Owner with tests, etc. Only to find out it "didn't work" for the customer, which was because their path was triggering the "wrote it twice" copy of the implementation in the giant, bloated file with duplicate implementations everywhere. Hard pass on WET from me.

Forem Open with the Forem app