Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 1
    @Niall If possible, an assertion would be even better than a comment. Commented Aug 17, 2015 at 18:47
  • 9
    Comments are not the solution to unmaintainable and unreadable code Commented Aug 17, 2015 at 19:06
  • 2
    @Kevin or you could write code that's perfectly readable without comments. Commented Aug 18, 2015 at 12:13
  • 1
    @Jan Comments are more than just explaining what code does....... Commented Aug 18, 2015 at 13:01
  • 2
    @Kevin I would say comments should never exist to explain what code does, but rather to explain why it is doing it. And in such situations often a refactor will get the intent across without needing the comment (which sounds like Jan's point). Commented Aug 18, 2015 at 14:14