3 Useful anti-patterns
This chapter covers
- Known bad practices that can be put to good use
- Anti-patterns that are, in fact, useful
- Identifying when to use a best practice versus its evil twin
Programming literature is full of best practices and design patterns. Some of them are even seemingly indisputable and cause people to give you the side-eye if you argue about them. They eventually turn into dogmas and are rarely questioned. Once in a while, someone writes a blog post about it, and if their article gets the approval of The Hacker News[1] community, it can be accepted as valid criticism and can open a door for new ideas. Otherwise, you can’t even argue about them. If I had to leave a single message to the world of programming, it would be to question everything that’s taught to you—their usefulness, their reason, their gain, and their cost.
Dogmas, immutable laws create blind spots for us, and their size grows as we stick to them longer. Those blind spots can cloak some useful techniques where some can even be better for certain use cases.