Reputation
459
Top tag
Next privilege 500 Rep.
Access review queues
Badges
3 8
Newest
 Good Answer
Impact
~68k people reached

  • 0 posts edited
  • 0 helpful flags
  • 15 votes cast
Jan
12
awarded  Good Answer
Sep
20
comment In the spirit of consistency, is it acceptable to comment everything equally?
I didn't search, I just looked for questions tagged g-code, but I was on my phone so results might have been trimmed. Honestly I think you have had a rather childish response to having your opinion challenged, but whatever.
Sep
20
comment In the spirit of consistency, is it acceptable to comment everything equally?
And this didn't even answer the question, it just says all code should be commented, regardless of existing style
Sep
20
comment In the spirit of consistency, is it acceptable to comment everything equally?
A quick search for g-code on stack overflow on my phone results in 26 questions. If you believe that advising people to user comments because this language requires them due to it's limitations (which it may well do) then I think you are being deliberately disingenuous. No where in your answer did you qualify it by saying something like 'in some languages the structures necessary to avoid comments are not available and so continuing to follow the existing commenting patterns would be vital', you just flat out stated that you think all code should be heavily commented.
Sep
20
comment In the spirit of consistency, is it acceptable to comment everything equally?
All I am suggesting is that in line comments are a crutch that can be removed by better structure in your code. And in my experience people can learn to do this if directed and forced to think about things. Also with in line comments you force the developers to update the comments when they are changing the code, which increases the amount of work. and if they forget then all if a sudden the code and the comments are out of sync and it becomes difficult to reason effectively about what the intent should be. Are the comments what was intended and the code is wrong? Or vice versa?
Sep
20
awarded  Commentator
Sep
20
comment In the spirit of consistency, is it acceptable to comment everything equally?
through it? Those comments are shown in a different tool to the code comments because they have a different use. I believe that by suggesting they are the same and therefore I obviously would want to use those if I am against in line comments you are being deliberately argumentative as this is a patently ridiculous argument.
Sep
20
comment In the spirit of consistency, is it acceptable to comment everything equally?
@obmerk you seem to be convinced that all text Associated with code is 'comments' and serves the same purpose and so can be lumped together. I fundamentally disagree with this. Documentation comments (javadoc,XMLdoc etc), source code commit comments, and in line comments in the source are all for very different purposes. The first explains the external usage and behavior to consumers. The second held to identify what changes a particular commit makes to the overall code base. Without this how would you go about finding when some feature was added to the code? Check it every version and read
Sep
19
comment In the spirit of consistency, is it acceptable to comment everything equally?
sorry I missed the part of the question stating that the code was used in that environment. Are you suggesting that all code should be commented as a tiny percentage of it might be debugged on a green screen?
Sep
19
comment In the spirit of consistency, is it acceptable to comment everything equally?
Comments quickly rot in my experience and bear little relevance to the code they are around. Clean code can't.
Sep
19
comment In the spirit of consistency, is it acceptable to comment everything equally?
I'm stating that code documentation and comments are very different, and to group them together is wrong. Even if you wrote great clean chide with no comments you may still need extensive documentation. And I stand by my statement that if you are encouraging your devs to comment (not document) the code then you are only adding to the problem. You should instead do code reviews and pair refactoring sessions to clean the code and remove to need for the comments. Otherwise how will any of your guys and girls get any better?
Sep
19
comment In the spirit of consistency, is it acceptable to comment everything equally?
Practising self documenting code is the key. Explaining the intent of the code out loud to myself and using those words in the method names and variable names really helps me
Sep
19
comment In the spirit of consistency, is it acceptable to comment everything equally?
With respect, things like phpdoc, javadoc etc are not about commenting, they are about documenting your public api, not about commenting on the code inside your methods. There is a big difference. Documentation is important for consumers to be able to easily use you libraries (ie msdn). Comments in the code can be made virtually redundant by changing the structure of the code so it is more self documentation. See the 'clean code' movement. IMHO if you are a boss you should be telling your programmers to change how they code so the code is cleaner, not telling them to comment everything.
Apr
24
awarded  Yearling
Oct
25
awarded  Critic
Sep
15
awarded  Nice Answer
Jul
16
revised Why does java.util.ArrayList allow to add null?
added 2 characters in body
May
25
awarded  Student
May
24
asked Is using partial classes for supporting multiple versions of data entities for continuous delivery scenarios a bad idea?
Feb
25
comment Help With Dependency Injection
I'd also remove the _str and _dt from your field names. They add nothing and just get in the way and make the code less readable.