Sniffing Out Success: Identifying Smells and Anti-Patterns in Your Code

Duration: 60, 90 or 120 minsLevel:200 – IntermediateKeywords: anti-pattern, c-sharp, code smell, pattern
Odd One Out by CliffMuller, on FlickrThis presentation reviews some of the most common and dangerous code smells and anti-patterns supported by some debate about why they should be avoided. There are many examples and a lot of interactive discussion to help illustrate the virtues of identifying anti-patterns in our code and how to fix them. Learn cool new terms like object orgy, shotgun surgery and contrived complexity! Become a better developer! Impress your friends!


I decided to write this presentation after a particularly frustrating day at work. I had just spent nearly half of a day troubleshooting down a rabbit hole in an excruciatingly over-architected web project. When I reached the bottom, it was a 3-line code change. The initial wave of pride and excitement soured into frustration over so much time spent tracking down the source of a minor bug in someone else’s steaming pile of code — someone I had never met before.

Following that experience, I had a very strong desire to prevent the same from happening to someone else. If this presentation can prevent even one incident like this from occurring, then it will have been worth it.


Other than the introduction and wrap-up, this is a non-linear presentation. The anti-patterns discussed and the time spent on each will vary based on the setting and audience. Because of this, the length of the presentation is very flexible. While typically scheduled for 60-minutes, this presentation can also be used as a 90- or 120-minute topic.

Presented At


  • What is an anti-pattern? Define anti-pattern with an analogy.
  • What is a code smell? Define code-smell with an analogy, and contrast with anti-pattern.
  • This presentation has a pattern. Describe the format of the rest of the presentation.
  • Anti-Patterns Dive in and discuss some specific anti-patterns.
    • Magic Number / Magic String
    • Hard Code
    • Soft Code
    • Error Hiding
    • Cargo Cult Programming
    • Feature Envy
    • Object Cesspool
    • Object Orgy
    • Input Kludge
    • God Object
    • Sequence Coupling
    • Blind Faith
  • Take-Aways and Wrap-up

Browse related presentations: anti-pattern, c-sharp, code smell, pattern

Leave a Reply