Beyond "Clean Code": Why Your Comments Matter
2 days ago
- Comments are necessary to express intent and 'why' information that logic alone cannot convey.
- Uncle Bob's claim that 'comments are always failures' is too extreme and can be harmful.
- Logic only shows what the code does, not what the programmer intended or the reasoning behind decisions.
- Comments should be used to communicate naturally without contorting the logic.
- Objections about comments lying or going stale are less problematic than having no comments at all.
- Comments improve both good and bad code; they are not a crutch for poor code.
- The author challenges critics to eliminate comments without losing information or contorting logic.