Are More Comments Better in High-Turnover Environments?

Posted by joshin4colours on Programmers See other posts from Programmers or by joshin4colours
Published on 2012-06-01T01:03:40Z Indexed on 2012/06/01 4:48 UTC
Read the original article Hit count: 401

Filed under:
|
|

I was talking with a colleague today. We work on code for two different projects. In my case, I'm the only person working on my code; in her case, multiple people work on the same codebase, including co-op students who come and go fairly regularly (between every 8-12 months). She said that she is liberal with her comments, putting them all over the place. Her reasoning is that it helps her remember where things are and what things do since much of the code wasn't written by her and could be changed by someone other than her. Meanwhile, I try to minimize the comments in my code, putting them in only in places with a unobvious workaround or bug. However, I have a better understanding of my code overall, and have more direct control over it.

My opinion in that comments should be minimal and the code should tell most of the story, but her reasoning makes sense too. Are there any flaws in her reasoning? It may clutter the code but it ultimately could be quite helpful if there are many people working on it in the short- to medium-run.

© Programmers or respective owner

Related posts about coding-style

Related posts about team