Skip to content
Sponsor: NimblePros Software architecture, modernization, and training for high-performing development teams. Work with us.
Code Smells

Code Smells

Code smells, or bad smells in code, refer to symptoms in code that may indicate deeper problems. They’re a diagnostic tool used when considering refactoring software to improve its design. Not all code smells should be “fixed” - sometimes code is perfectly acceptable in its current form. Context is important, so what may be inappropriate in one application or part of an application may be appropriate elsewhere.

Each of these smells is demonstrated, and corrective actions described, in the Refactoring for C# Developers course on Pluralsight.

Common Code Smells

Bloaters

Obfuscators

Object Orientation Abusers

Change Preventers

Dispensables

Couplers

Test Smells

  • Not Enough Tests
  • DRY versus DAMP
  • Fragility
  • The Liar
  • Excessive Setup
  • The Giant
  • The Mockery
  • The Inspector
  • Generous Leftovers
  • The Local Hero
  • The Nitpicker
  • The Secret Catcher
  • The Loudmouth
  • The Greedy Catcher
  • The Sequencer
  • The Hidden Dependency
  • The Enumerator
  • The Stranger
  • The OS Evangelist
  • Success Against All Odds
  • The Free Ride
  • The One
  • The Peeping Tom
  • The Slow Poke
  • The Contradiction
  • Roll the Dice
  • Hidden Tests
  • Second Class Citizens
  • Wait and See
  • Inappropriate Test Group
  • The Optimist
  • The Sleeper
  • The Void

References

Refactoring for C# Developers on Pluralsight