Chapter 11
- The three main categories of code smells are as follows:
- Structural code smells: These are issues related to the structure of the code, such as excessive complexity, long methods, and large classes
- Functional code smells: These relate to problems in how the code functions, including duplicated code, inappropriate comments, and magic numbers
- Architectural code smells: These involve higher-level architectural issues, such as improper layering, tight coupling, and violation of SOLID principles
- Different types of application-level code smells include the following:
- Feature envy
- Shotgun surgery
- Parallel inheritance hierarchies
- Blob
- Swiss Army knife
- Different types of class-level code smells include the following:
- Large class
- God class
- Data class
- Refused bequest
- Divergent change
- Different types of method-level code smells include the following:
- Long method
- Nested method calls
- Too many parameters
- Primitive obsession
- Temporary field
- Various refactoring techniques can be used...