Refactoring
23 items tagged with "refactoring"
Anti-Patterns16
God Object
A single class or module that knows or does too much, concentrating most of the system's responsibilities in one place and becoming a maintenance bottleneck.
Big Ball of Mud
A system with no discernible architecture, where code is haphazardly structured, tangled, and duct-taped together, making every change risky and slow.
Swiss Army Knife
An interface or component with so many options and overloads that it tries to cover every use case, becoming hard to learn, misuse-prone, and impossible to evolve.
Boat Anchor
Keeping a piece of obsolete software, hardware, or a dependency that no longer serves a purpose but is retained and maintained out of inertia or sunk-cost thinking.
Circular Dependency
Two or more modules that depend on each other directly or transitively, forming a cycle that prevents independent building, testing, and reasoning.
Premature Abstraction
Extracting abstractions before enough concrete cases exist to know what they should be, locking in the wrong shape and adding indirection that obstructs change.
Spaghetti Code
Code with tangled, unstructured control flow and no clear modularity, where execution jumps unpredictably and dependencies are impossible to follow.
Long Method
A single function that does too much and runs for hundreds of lines, mixing many concerns and resisting comprehension, testing, and reuse.
Long Parameter List
A function signature with too many parameters, making calls error-prone, hard to read, and a sign of poorly grouped or missing abstractions.
Data Clumps
The same group of fields or parameters traveling together everywhere, signaling a missing abstraction that should be a single object.
Feature Envy
A method that is more interested in another class's data than its own, repeatedly reaching into that class instead of letting it own the behavior.
Switch Statement Smell
Repeated switch or if-else chains branching on a type code, duplicated across the codebase, that should be replaced by polymorphism.
Poltergeist
A short-lived, do-nothing class that only passes data or calls to other objects, adding indirection and noise without real responsibility.
Copy-Paste Programming
Duplicating blocks of code instead of factoring out shared logic, so every fix and change must be repeated across each copy, and some are missed.
Technical Debt Denial
Refusing to acknowledge or pay down accumulated technical debt, treating short-term delivery speed as if it carried no compounding cost.
Testing Implementation Details
Tests coupled to private internals rather than observable behavior, so harmless refactors break them and real bugs slip through.
Glossaries3
Refactoring
Restructuring existing code without changing its external behavior to improve quality and maintainability
Technical Debt
The implied cost of additional rework caused by choosing an easy solution now instead of a better approach
Test-Driven Development
Test-driven development (TDD) is a software practice in which developers write a failing automated test before writing the code to make it pass, then refactor, repeating in short cycles.