A Fundamental Flaw in Using Software Patterns
Software Patterns are well-established guidelines to solve recurrent problems that come up in software development. They act like a blueprint for needs of the development team. There are about 23 popular ones, including visitor, read-write lock, etc. For example, read-write lock pattern allows developers to define implementations for concurrent access needs. If a software requires you to develop concurrent access modules without any bug, then you could follow the read-write lock pattern to develop a solution that fits your needs.
However, the most common flaw that software developers make in using these software patterns is that they do not start with a problem. Rather, they specify which pattern they want to follow and then decide what the needs are. This is wrong. We have to remember that these patterns are solutions to problems, rather than development cycle. It is almost like saying, “Okay, I have a chicken muffin recipe, let’s cook this dish even though this dish is not what we want and we do not have the ingredients” (this is ridiculous), rathen than saying “Okay, we want chicken muffin. Let’s go and find a recipe for it”.