How can I deal with a team member who dislikes making comments in code?
programmers.stackexchange.com
programmers.stackexchange.com
"Show me your code and conceal your data structures, and I
shall continue to be mystified. Show me your data
structures, and I won't usually need your code; it'll be
obvious." --esr (paraphrasing fred brooks in TMMM)I've also found that situation (though admittedly to a lesser extent) in languages that are dynamically typed. My first experience with Python rapidly turned sour when I discovered that I was going to have to use guess and check to figure out what types of parameters some functions in a standard file-handling library expected.
The less discipline the compiler demands of the programmer, the more discipline the programmer should demand of himself.
"The less discipline the compiler demands of the programmer,
the more discipline the programmer should demand of
himself."
That's a great way of putting it. Completely agree.I think that if the code is not easy to understand without heavy commenting then the problem may even be the quality and not the lack of comments.
Most code I write does not have much comments, they are mostly API documentation or the reason why I did something in a specific way, other than that I feel like they are useless, they don't add value, the variable and method names are and should be enough to know that they do or represent.
You should focus on the code not being self-documenting enough, not the lack of comments.
Here are some excuses people use to justify comments: http://www.codeodor.com/index.cfm/2008/6/18/Common-Excuses-U...
Not commenting code, not naming variables and functions in a way meant to reveal as much as possible, is the behavior of someone who isn't accustomed to working with other people. So it should be made a requirement for employment, end, full stop.
"... is the behavior of someone who isn't accustomed to
working with other people."
exactly.