Back to Catalog
Code Smells
Dispensables
Comments
Excessive comments that should be replaced with better code.
Intent & Description
'
🎯 Intent
Identify when comments are used to explain complex code that could be simplified.
📋 Context
You have code that requires extensive comments to understand. The comments indicate that the code itself is unclear.
💡 Solution
Refactor the code to be self-documenting. Use Extract Method to simplify complex logic, and rename variables and methods for clarity.'
Real-world Use Case
Use when code requires extensive comments to be understood.
Source
📌 TL;DR
Good code doesn’t need many comments. Refactor complex code instead of explaining it with comments.