You'll get a lot of differing views on this but my take is that the code should be self-documenting i.e. it is written well enough that its purpose can be easily seen by reading it.
This is by no means always possible so if you have a chunk of complicated … Read More
First, there can never be too many comments on interfaces, that is, function declarations, class declarations, modules, or whatever else your language has as interfaces between the users and the library code. The only limiting factor in documenting interfaces should be the time you have and the efforts you are … Read More
I agree with the above.
Time spent on variable, method/function, and class names is time well spent because it leads to code that needs no further explanation.
Personally I'm a fan of the quick one-liner at the top of each block of code stating what it dis going to achieve … Read More
More complex == more comments. If you come back to the code in 6 months and wonder what the fark you were doing, then it wasn't commented well enough! Read More