News for hackers. Stuff that matters.
Re:Goodbye, Clean Code by jfengel on Monday January 13, 2020 @12:33PM (#22036553)
It's not so much that you're preparing for 7 separate cases, as a thing that works in one place and almost, but not quite, fits in 6 others. You rarely exactly duplicate code, but often duplicate and modify.

By the time you hit 7, you do clearly Need It. But now you've got 7 cases to work from in writing the generalization. When the number is 2, it's often reasonable to say, "I don't know how these will evolve and I'll probably guess wrong".

There are no comments on this comment yet.