S/W Design and Architecture

Anti-Patterns

Annihilating evil with Anti-Patterns

From [FREEMAN] p. 612

The Universe just wouldn’t be complete if we had patterns and no anti-patterns, now would it?

If a Design Pattern gives you a general solution to a recurring problem in a particular context, then what does an anti-pattern give you?

An Anti-Pattern tells you how to go from a problem to a BAD solution.

You’re probably asking yourself, “Why on earth would anyone waste their time documenting bad solutions?”

Think about it like this: if there is a recurring bad solution to a common problem, then by documenting it we can prevent other developers from making the same mistake. After all, avoiding bad solutions can be just as valuable as finding good ones!

Let’s look at the elements of an anti-pattern:

Examples