I agree, there obviously needs to be a balance. Many times I've had to figure out what the coder was trying to accomplish with a particular piece of code and the code had little to no comments making it a lot of trial and error and frustration.
I've also worked with code where there was more documentation on a particular application than there were lines of code for the application. And that was just ridiculous.
So somewhere between none and too much. But I prefer more than less. That way your code can always be updated by someone else. If someone can't figure out a section due to missing comments, then your code will not last very long.
2
31 May 2015 11:07
u/chronos
in v/programming
I don't have a favorite style, but I favor and encourage copious amounts of comments. As someone who has poured through thousands of lines of code, sometimes that little short comment makes all the difference!
4
31 May 2015 10:51
u/chronos
in v/programming
I agree, there obviously needs to be a balance. Many times I've had to figure out what the coder was trying to accomplish with a particular piece of code and the code had little to no comments making it a lot of trial and error and frustration.
I've also worked with code where there was more documentation on a particular application than there were lines of code for the application. And that was just ridiculous.
So somewhere between none and too much. But I prefer more than less. That way your code can always be updated by someone else. If someone can't figure out a section due to missing comments, then your code will not last very long.