News for hackers. Stuff that matters.
Re:Goodbye, Clean Code by barrkel on Saturday January 11, 2020 @06:19PM (#22023125)
It really depends. For test setup, I'm inclined to leave alone; duplication is often easier to reason about when a test breaks. For code with control flow changes in the middle, abstraction is honestly dubious. For mere value differences, maybe, but if the values are complex and not merely scalar, maybe not. More duplication is needed to justify when the abstraction needs more edge cases to cover them all, especially control flow more than different values.

There are no comments on this comment yet.