How to discriminate commented code and documentation comments
After using version control tools, it is no longer necessary to comment out old code.
However, some team members still comment out old code. Therefore, I want to clean them up.
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).
Are XML Comments Necessary Documentation?
I used to be a fan of requiring XML comments for documentation. I’ve since changed my mind for two main reasons:
Should comments say WHY the program is doing what it is doing? (opinion on a dictum by the inventor of Forth) [duplicate]
Use comments sparingly! (I bet that’s welcome.) Remember that program
you looked through – the one with all the comments? How helpful were
all those comments? How soon did you quit reading them? Programs are
self-documenting, even assembler programs, with a modicum of help from
mnemonics. It does no good to say:
What is the best approach for inline code comments?
We are doing some refactoring to a 20 years old legacy codebase, and I’m having a discussion with my colleague about the comments format in the code (plsql, java).
Code maintenance: To add comments in code or to just leave it to the version control?
We have been asked to add comments with start tags, end tags, description, solution etc for each change that we make to the code as part of fixing a bug / implementing a CR.
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.”