# Code Smells: Symptom, Cause, Cure

Every pattern in the course began as a smell in its problem story. This chapter gathers them into families, so a learner who meets a smell they've never seen can still work out what's wrong and what would fix it.

Updated: November 17, 2026

## [The Smell Families](https://www.ask-codey.com/courses/design-patterns/topics/dp-the-smell-families)

1. [Smells of Choosing: The switch That Keeps Growing](https://www.ask-codey.com/lessons/dp-smells-of-choosing) (Journeyman): When the same switch on a kind of thing is copied into many places, a new kind means a hunt through the code and one copy is always missed; the smells of choosing all come from one decision with no home, and their cures give it one.
2. [Smells of Making: new Everywhere](https://www.ask-codey.com/lessons/dp-smells-of-making) (Journeyman): When the code that uses an object also builds it (new scattered through business code, a constructor with nine arguments, a class that opens its own database connection), every change to how things are made touches the code that uses them, and nothing can be tested on its own; the cures give making its own home.
3. [Smells of Tangling: Reaching Through Objects](https://www.ask-codey.com/lessons/dp-smells-of-tangling) (Journeyman): When code reaches through one object to another to get an answer (booking.member().plan().price()), one small rule change touches every place that reaches, and one is always missed; the smells of tangling all come from code that knows too much about other objects, and their cures move the knowledge to where it belongs.
4. [Smells of Size: The Long Method and the Class That Does Everything](https://www.ask-codey.com/lessons/dp-smells-of-size) (Journeyman): When one method or class keeps every job that was ever added to it, nothing inside can be reused or tested on its own, and a new feature means copying part of it; the smells of size come from jobs that were never given names, and the plainest cure, pulling out a method, gives them one.
5. [Smells of Combining: A Class for Every Combination](https://www.ask-codey.com/lessons/dp-smells-of-combining) (Journeyman): When every mix of features gets its own class (YogaClassWithReminderAndWaitlist), or every missing piece gets its own null check, each new feature doubles the classes or adds a check to every screen; the smells of combining come from building mixes by copying instead of from small parts, and their cures put the parts together.

## [The Smell Map](https://www.ask-codey.com/courses/design-patterns/topics/dp-the-smell-map)

1. [The Smell Map: From Symptom to Cure](https://www.ask-codey.com/lessons/dp-smells-to-patterns) (Journeyman): Every smell this course has met fits one of five families, and each family has one cause and a short list of cures; three questions (what changes together, what has no home, who knows too much) diagnose a smell you've never seen, and the smallest cure, often pulling out a method, comes first.

## [Exercise: The Smell Clinic](https://www.ask-codey.com/courses/design-patterns/topics/exercise-dp-smell-clinic)

1. [Exercise: The Smell Clinic](https://www.ask-codey.com/lessons/exercise-dp-smell-clinic) (Journeyman): Diagnose Summit Gym's booking code like a doctor: five smells, one from each family, each written up as symptom, cause and cure. Then cure the three that today's changes are waiting on, with the tests green throughout.

Source: https://www.ask-codey.com/courses/design-patterns/chapters/dp-code-smells-symptom-cause-cure
