Relative Content

Tag Archive for comments

What would be a good way to request comments?

In the project/team I’m working the frequency of comments is a little low.
One reason might be that it is not clear to the long-time devs what lines in the code really needs a comment (each part of the project has quite fixed devs).

Annotate source code with diagrams as comments

I write a lot of (primarily c++ and javascript) code that touches upon computational geometry and graphics and those kinds of topics, so I have found that visual diagrams have been an indispensable part of the process of solving problems.

In what stage of development should comments be written?

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.

Commenting regular expressions

Are there any common practises for commenting the regular expressions: inline comments referring different part of RegEx or general comment for all expression?

How to refer to specific areas of code in documentation?

I’m about to leave a project, and before I go my boss has asked for me to document code (I’ve not documented very well). It’s not a big deal, the project is not terribly complex. But I’m finding places in my documentation where I would like to say, “Notice on line XYZ that such-and-such happens.”