Mon, 25th Feb 2019, 08:07

This has definitely been my experience. I think DRY is a useful tool but taken to an extreme makes things worse. Definitely use DRY to clean up repeated values into constants. But complex abstractions tend to be wrong the first time.

Wrong abstractions hurt code readability and maintainability a lot more than some duplicated code.

This is especially true for test code. Having lots of helpers in there whose behavior is controlled by a zoo if parameters is a clear warning sign. It'll be hard to change later.

— Benedikt Meurer (@bmeurer) February 25, 2019