Patterns as a developer tool

Kamil Zakiev
2 min readSep 26, 2019

Pattern is a general reusable solution of a common problem. Sounds like a good thing to apply immediately? Wait a minute, friend! Be aware that patterns are double-edged weapons.

The first edge

On the one hand, patterns give us significant benefits.

Firstly, they improve our communication with other developers since we are able to express ourselves and understand others in broad strokes.

Since a source code can be treated as a communication means as well, we can grasp the code and the concept behind it in a more lightweight way. As a result we can learn new frameworks faster and use them efficiently.

Secondly, using patterns helps us to avoid obvious drawbacks that may occur in our homegrown solution.

The second edge

On the other hand, patterns may work against us.

The code we write may become cumbersome, hard to understand and therefore less maintainable if we apply a pattern without a conceptual reason.

As a result the main point of our approach expressed in the code becomes blurred and that’s the exact issue we tried to avoid with patterns. We’re right back where we started.

Conclusion

Patterns are definitely a great tool and every developer should know them. But that’s not enough: there should be a strong understanding of a concept behind a pattern so that a developer feels when it should be applied. Otherwise it would only harm.

--

--