DEV Community


Discussion on: 5 clean code techniques you can start doing today

codemouse92 profile image
Jason C. McDonald

The only reason it gets stale is if you let it. I hear the "out of sync" argument a lot, but that problem is just as common with descriptive names! Yet I don't see any articles decrying descriptive naming as a result: you update the name.

Keep your comments in sync as a mandatory part of refactoring. Get into the habit of distrusting any code with a mismatching intent comment; it usually means both code and comment are wrong.

Thread Thread
acostalima profile image
André Costa Lima

If your comments usually get out of sync, then it could be a symptom your code review process needs to be improved.