Untangle Code
Intent
Remove unnecessary complications in code, e.g. nested structures, dependencies, dead-code, duplicate-code etc. See Remove Nested Control Structures. Special case of Refactoring.
Related patterns
-
Remove Nested Control Structures stub
Re-structure code so that deeply nested or complicated control structures are replaced by semantically identical versions. Special case of Refactoring, similar to Untangle Code. Often performed by reducing complexity and especially cyclomatic complexity. When reducing code complexity one needs to make sure we’re not exchanging inner/ method/ cyclomatic complexity by outer/ design or runtime complexity.
-
Refactoring stub
Source code transformation that does not change functionality of system. See [Fowler-Refactoring].
Found a mistake or want to add your experience? Edit this pattern on GitHub.