Finding a Problem for Your Solution

Studying solutions to problems is a lot of fun. It’s intellectually stimulating and a great way to satisfy the natural curiosity that a lot of us have. I enjoy diving into the next best design patterns book, just like everyone else.

It’s not without it’s drawbacks, though. Have you ever found yourself wondering which pattern you should use for a given codebase that you’re working in? Have you ever stopped to consider just how ridiculous that question actually is? Don’t get me wrong, I do this all the time – you have a solution in search of a problem.

Find the Why

There is a natural attraction for developers towards the complex, we love hard problems. It seems like the question is always “how do I use this pattern?” instead of “should I use this pattern?”. Why is that? Why do we sometimes feel that, although or solution works great, it might not be the “right way” to do it? What does that actually mean, the “right way”? Why do the design pattern books seem to omit strategies for measuring the need and efficacy of a given pattern?

By understanding the problem that a pattern solves and how to measure the application of it, we can begin to understand whether or not we should use it.