Reducing technical debt by valuing comments as much as code
I worked with some Rails folks a while back who were utterly convinced that comments were to be avoided because it meant your code was not clear.I agree that comments explaining 'what' is happening are mostly useless. Write clearer code. But 'why' comments are good. Most things can be coded up different ways. Tell me why you chose this way. Tell me about constraints that might not be immediately obvious. Let me know if indeed, it could be cleaner, but you were in a hurry (this is a thing that happens in the real world), or if it's that way for a specific reason.