Duplication is cheaper than using the wrong abstraction. Rushing to abstract away a repeated pattern of code is similar to premature optimisation.
If you find yourself passing parameters and adding conditional paths through shared code, the abstraction is incorrect.
Truth. There is a rule of thumb that you should make several of something, before you try to make an abstraction that covers all of them. I have seldom seen it applied in production code. I think maybe programmers (and especially young ones) are so enamored of abstraction (’cause if you disliked abstractions you would pick a different career) that they have a hard time not going one (or several) layers of abstraction too far (or too fast).
LikeLike
If one hits step five, the architect was not thinking of the big picture while scoping the project.
LikeLike
Deryk Robosson you’re assuming there was an architect. Even if there was at one time, in my experience that person has often left the scene and the application code has been in maintenance mode ever since.
LikeLike