News for hackers. Stuff that matters.
Re:Stop Commenting Your Code by cgore on Friday December 01, 2017 @02:48PM (#15826736)
More seriously: yes, you should name functions/variables/etc. reasonably. And often if you write a comment, you will find you are actually explaining away a wart. But often you need to document business logic, code that needs to be written in a less than clear way for performance reasons, explanations of why you chose approach A instead of what would seem like another perfectly reasonable approach B, URL links for standard doc PDFs, and a million other little things.

There are comments that aren't necessary if you write your code better, but there's others that are needed even if you write your code perfectly.

Re:Stop Commenting Your Code by antonpug on Friday December 01, 2017 @02:58PM (#15826818)
Documenting business logic works much better via Spec files - if you have BDD test files Given/When/Then format, that'll go a long way in describing functionality, in my opinion.