> Markdown version of [/videos/1047-identifying-code-smells?t=1565](https://www.wearedevelopers.com/videos/1047-identifying-code-smells?t=1565). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Identifying code smells Are hidden 'bloaters' and 'change preventers' sabotaging your architecture? Learn to spot these foundational code smells to mitigate technical debt and write highly testable, scalable software. - **Speakers:** [Benjamin Bischoff](https://www.wearedevelopers.com/@benjamin-bischoff) - **Event:** World Congress 2024 - **Published:** August 20, 2024 - **Duration:** 26:59 - **URL:** https://www.wearedevelopers.com/videos/1047-identifying-code-smells ## Summary Identifying "code smells"—a concept popularized by Martin Fowler and Kent Beck—is a foundational skill for maintaining healthy software architecture and mitigating technical debt. Rather than serving as guaranteed errors, code smells act as surface-level indicators of potentially deeper systemic problems that vary depending on specific frameworks and design patterns. Recognizing these patterns establishes a shared vocabulary among engineering teams, making code reviews more effective and significantly improving prompts when communicating with LLMs for software development. Ultimately, clearing out these anti-patterns creates a self-reinforcing cycle where highly testable code naturally becomes easier to maintain. A practical approach to spotting issues involves categorizing them into distinct groups. "Bloaters" represent elements that have grown too large to handle effectively, such as long methods doing more than their signature implies, primitive obsession where raw data types are favored over custom objects, or data clumps that group unrelated variables together. Meanwhile, Object-Oriented Abusers reveal missed design opportunities. Anti-patterns like heavily branching switch statements instead of utilizing polymorphism, or encountering a "refused bequest" where child classes inherit unneeded interface behavior, highlight structural weaknesses in class design. Other categories illustrate how architectural friction slows down future feature development. "Change preventers" like shotgun surgery dictate that a developer must make simultaneous updates across multiple classes just to apply a single logical change. "Dispensables"—including dead code, duplicate logic, or speculative generality strictly meant for premature future-proofing—add unnecessary noise to the codebase. Finally, "couplers" like inappropriate intimacy in circular class relationships or fragile message chaining demonstrate inadequate structural boundaries. By addressing these categorized symptoms early, software teams can enforce cleaner design patterns and robust, scalable systems. **Keywords:** code smells taxonomy, technical debt reduction, object-oriented design patterns, java clean code, software refactoring principles, primitive obsession, shotgun surgery pattern, code testability cycle, feature envy, inappropriate intimacy, developer LLM prompting, software anti-patterns, long parameter lists, parallel inheritance hierarchies, speculative software generality ## Chapters 1. **Defining code smells and identifying deeper system problems** (01:01) — Setting the scope of code smells as surface-level indicators of bad design helps teams communicate efficiently and maintain testable code. 1. **Identifying bloater smells like long methods and classes** (04:25) — Breaking down oversized components and replacing primitive obsessions with custom types improves code readability and validation. 1. **Spotting common object-oriented programming abusers in applications** (10:34) — Avoiding misused object-oriented mechanisms like excessive switch statements or passing down unneeded behavior ensures proper design structure. 1. **Handling change preventers that hinder ongoing software development** (15:27) — Removing divergent change and shotgun surgery problems makes scaling code architectures significantly easier. 1. **Removing dispensable code layers and unnecessary structural elements** (19:10) — Eliminating lazy classes, dead code, and speculative generality prevents codebases from accumulating useless complexity. 1. **Addressing couplers that create inappropriate intimacy between classes** (23:02) — Fixing feature envy, message chaining, and middleman classes reduces dangerous tight coupling between independent modules. 1. **Tackling code smells during routine peer code reviews** (26:05) — Integrating code smell identification directly into development workflows ensures persistent adherence to clean architecture principles. ## Related Moments - [Identifying code smells as indicators for refactoring](https://www.wearedevelopers.com/videos/660-i-will-have-to-refactor-and-now-refactoring-techniques-in-java) (from "I will have to refactor ! And now ? Refactoring Techniques in Java") - [Identifying common code smells in testing suites](https://www.wearedevelopers.com/videos/515-dirty-tests-and-how-to-clean-them) (from "Dirty Tests And How To Clean Them") - [Refactoring architectural messes like the big ball of mud](https://www.wearedevelopers.com/videos/235-antipatterns-nemesis-of-software-development) (from "Antipatterns - nemesis of software development") - [Applying patterns and principles to maintain code analyzability](https://www.wearedevelopers.com/videos/1684-modern-software-architectures) (from "Modern software architectures") - [Reducing accidental complications in software architecture](https://www.wearedevelopers.com/videos/1037-breaking-the-bug-cycle-tdd-for-the-win) (from "Breaking the Bug Cycle: TDD for the Win") - [Applying key software design rules to test code](https://www.wearedevelopers.com/videos/515-dirty-tests-and-how-to-clean-them) (from "Dirty Tests And How To Clean Them") ## Related Articles - [How to Avoid Over-Engineering](https://www.wearedevelopers.com/magazine/546-how-to-avoid-over-engineering) - [Code reviews might actually be pointless](https://www.wearedevelopers.com/magazine/519-code-reviews-might-actually-be-pointless) - [Ignore the Hype: How to Avoid Being Deceived by Technological Trends](https://www.wearedevelopers.com/magazine/528-ignore-the-hype-how-to-avoid-being-deceived-by-technological-trends) - [Dev Digest 150 - The shift to AI generated code, fingerprinting and OKRs vs. doing your job](https://www.wearedevelopers.com/magazine/533-dev-digest-150-the-shift-to-ai-generated-code-fingerprinting-and-okrs-vs-doing-your-job) ## Related Jobs - [Senior Software Engineer](https://www.wearedevelopers.com/jobs/ext/15942-senior-software-engineer) at **GitHub** - [Tribe Lead - ( Software) Engineering Centre of Excllence](https://www.wearedevelopers.com/jobs/ext/1475530-tribe-lead-software-engineering-centre-of-excllence) at **SD Worx** - [Senior Software Engineer, Client Apps Platform](https://www.wearedevelopers.com/jobs/ext/1773893-senior-software-engineer-client-apps-platform) at **GitHub** - [Principal Software Engineer, Identity](https://www.wearedevelopers.com/jobs/ext/1469181-principal-software-engineer-identity) at **GitHub** - [Senior Software Engineer, Enterprise Products](https://www.wearedevelopers.com/jobs/ext/1841248-senior-software-engineer-enterprise-products) at **GitHub** - [Principal Software Engineer, Database Infrastructure](https://www.wearedevelopers.com/jobs/ext/1465908-principal-software-engineer-database-infrastructure) at **GitHub**