38. Don't write comments.
This is what I gathered from an amazinf video of the same name from CodeAesthetic. Watch it here.
- First principle is describing the variables so well that you don't need comments. Your code should actually read like English, it should be that easy to read.
- Types can make comments redundant. [This is more specific to C++ and is little more complicated in other languages].
- Why hate comments? Because when people update code, they usually fail to update the comments.
- Write high quality code documentation instead! Keep it as close to the code as possible.
- However, don't be so rigid on not using comments. You can use it when things are too complicated.