Clean Code Pragmatic refactoring patterns and coding standards. Not dogma — practical improvements. Code Smells to Fix Long functions ( 30 lines) Extract into named functions. The name documents intent better than a comment. Deep nesting ( 3 levels) Use early returns, guard clauses, or extract helper functions. Magic numbers/strings Extract to named constants. Duplicate code If you copy-paste 3+ times, extract. Two occurrences are often fine. Dead code Delete it. Git has history if you need it back. SOLID Principles (Practical Version) - Single Responsibility — A function does one thing. A mo…