Examining typical software anti-patterns
The literature on this topic is full of different kinds of anti-patterns, some of which have very funny names, even though their impact is anything but funny. Sometimes anti-patterns can be the result of a lack of discipline in providing tested, well-structured, and maintainable code to colleagues. An often-used term today in this field is clean code. The following sections will explore some common anti-patterns that can be found in code bases, more specifically in method implementations.
Spaghetti code
Multiple factors may contribute to an application code base appearing very unstructured: that’s the first sign of a code smell. In such cases, one of the most famous anti-patterns, spaghetti code, tends to appear. Spaghetti code may remain overlooked due to the fact that interfaces still remain coherent, but their implementation will contain long methods with interconnected dependencies (Example 7.3):
class VehicleSpaghetti {...