14
Cyanide
3y

To over-comment or not is the real confusion.

Comments
  • 8
    Silence is golden.
  • 8
                                                          
                      
                      
                      
                      
                                                          
                      
                      
                      
                      
                                                          
                      
                      
                      
                      
                                                          
                      
                      
                      
                      
           🤫
  • 3
    @Floydimus @C0D4 I meant in code, not in general 😅
  • 4
    @Cyanide sorry, I was confused with the comment.
  • 1
    @C0D4 For general cases, I agree, it’s better to be 🤫 than to blabber.
  • 2
    I'd like to stay silent but i saw you used an emoji in the tag, and i have to ask this:

    WHYYY
  • 2
    No comments
  • 7
    @melezorus34 password must contain: 1 number, 1 symbol, 3 animal emoji.
  • 3
    If you feel the need to over-comment, your code is almost always too confusing and needs refactoring.
  • 4
    Do not comment, let the code speak for you
  • 2
    @darkwind I recently learnt that some people take the 'let your code speak' too literally. It's crazy but they literally obfuscate the code with comments that just narrate what the code is doing...above every line of the code. In the codebase that I am working with, there's usually 3-4 lines of comments per line of code.
    The code is not that great, and yes, uses Hungarian notation (no not Systems Hungarian).
  • 1
    @Cyanide, in code I don't like to see a lot of comments. But if I'm documenting a trap/hack/warning against changing a counterintuitive piece of code, I see over commenting as a better choice.
  • 3
    @JustThat nah, fuck it, all my homies has dementia, forgetting and re-learning the code is the way.
  • 2
    Comments not longer than one line, max is two.

    If the number of comment lines (eg grep) is more than 10 % of the file, you're over commenting.

    Comments might be helpful, but they're technical debt. Only comments that get maintained as the code is changed are good comments. Rest is misleading trash
  • 2
    @IntrusionCM well, you had me in the first half.

    But maintaing comments does not deter fanatics. I am working with a guy who loves comments. He focuses excessively on comments and won't pass a review unless comments are fixed. That would be fine if comments were less than 10% of file like you suggested. But the same guy enforces comment addition in code such that code is basically written twice. It is trash and a frustrating nightmare.
  • 1
    Not. Definitely not.
Add Comment