In what stage of development should comments be written?

Posted by CurtisHx on Programmers See other posts from Programmers or by CurtisHx
Published on 2012-11-19T18:54:00Z Indexed on 2012/11/19 23:22 UTC
Read the original article Hit count: 206

Filed under:
|

I'm a student working an internship at a larger company, writing small business apps in C#. I've noticed that I don't comment my code as I write it. Rather, I comment my code when I'm in the debugging stage of development. As I'm tracking down bugs, I'll run across a block that makes me think "hmm...that might confuse someone in the future. I'd better comment that", and I'll add the appropriate comments. All of my comments are done this way.

Is this an appropriate way of commenting? Should comments be written as the code is written? Or does it really matter when the comments are written, as long as they adequately explain why this block is used?

© Programmers or respective owner

Related posts about documentation

Related posts about comments