Summary
In this chapter, you were introduced to a variety of code smells and how to remove them through refactoring. We stated that there are application-level code smells, which permeate throughout all the layers of the application, class-level code smells, which run throughout the class, and method-level code smells, which affect the individual methods.
First of all, we covered application-level code smells, which consisted of Boolean blindness, combinatorial explosion, contrived complexity, data clump, deodorant comments, duplicate code, lost intent, mutation of variables, oddball solutions, shotgun surgery, solution sprawl, and uncontrolled side effects.
We then went on to look at class-level code smells, including cyclomatic complexity, divergent change, downcasting, excessive literal use, feature envy, inappropriate intimacy, indecent exposure, and the large object, also known as the God object. We also covered the lazy class, also known as the freeloader and the lazy object...