DEV Community

Discussion on: Code comments are (mostly) a violation of DRY

phlash909 profile image
Phil Ashby

I appreciate the encouragement to think of ways to express meaning more clearly in the code, something I should practice more!

I wonder if a lot of redundant comments are a hang over from the 'pseudo code' approach to writing software, where you start by describing the required logic in a comment, then work through that in real code, which may be more obscure/complex, but leaving the comments to explain yourself...

danrot90 profile image
Daniel Rotter Author

Yeah, that's something I have liked sooner as well. Write comments first, implement afterwards. It might be a good idea to think about the big picture first, but leaving the comments if the code can easily talk for itself is really a problem.