Over the last five chapters, we have looked in great detail at reusability, performance, maintainability, safety, and some miscellaneous design patterns. These patterns are extremely useful and can be applied to various situations for different types of applications. While it is important to know what the best practices are, it is also beneficial to understand what pitfalls to avoid. To do this, we are going to cover several anti-patterns in this chapter.
Anti-patterns are bad practices that programmers may do unintentionally. Sometimes, these problems are not severe enough to cause trouble; however, it is possible that an application may become unstable or have degraded performance due to improper design. In this chapter, we will cover the following topics:
- Piracy anti-pattern
- Narrow argument types anti-pattern
- Nonconcrete field types anti-pattern
By the...