Logic Fault

Have you considered running your software on a computer?


On Feelings

Many teams who “successfully” apply design patterns to a codebase feel that they were successful because changes are now much easier for them to make. Consider that this may be because of the patterns used, or it may simply be because the introduction of patterns caused the engineers to touch, rework, develop muscle memory of, and otherwise get familiar with the whole codebase. The latter is far more likely.

“Teams” means “you” here. Individually, you feel good about the state of code if you understand how it’s structured when you debug it or make changes. Ask yourself where the emphasis lies: is the main benefit that you understand how it’s structured (as in: it’s structured in a way that objectively makes it easier to work with)? Or is the main benefit that you understand how it’s structured (that is: you are familiar with it and have a good mental map)?

Most applications of design patterns and successful refactoring result in the latter, but are attributed to the former.

Punchline: design patterns are useful because they build shared understanding of a codebase by rewriting it at all, not necessarily because of how it is rewritten.