121

Some comments are helpful, some aren't

Comments
  • 5
    // example of unhelpful comment this is
  • 6
    Uncle Bob would say all three comments are needless and simply naming the functions better would do... Just saying
  • 1
    The names might be fine if the functions are inside for examples a class named Frame. Exactly this type of comments occupy so much of our code just because our client said that every function, method, class and module must be commented...
  • 2
    Happens to where I'm working too where we have to comment every public method even getter and setter.
  • 3
    I feel like some people, when starting programming, get the idea that everything should be commented.
  • 2
    Most of my comments are

    //region
    Code
    //endregion
  • 3
    //to main
    int main(){
  • 2
    I don't know, I mostly comment only the parts that, in my opinion, need an explanation on why I am doing it and not what it is doing (like here). A lot of my comments come from nested stuff like CompletableFuture.applyAsynch(some more chains).onFinish(more chains)...
  • 1
    I just love every chance I can get to replace a comment with a well written, and readable piece of code

    Take Python for example:
    >>> puppy_pics = [dog.img for dog in dogs if dog.age < 3]
  • 0
    What are the puppy pics? Well they are a dog's image for each dog in these dogs if the dog's age is less than 3
  • 0
    Some are redundant.
  • 2
    @dfox looks like vedantydv123 is a spammer.
  • -1
    This article is truly helpful for the newbies to this IT field. https://usecbdforcancer.com/cbd-oil...
    Here they have shared some functions and their use. Even though they are not widely used it is good to have an idea about it. Do share more such useful posts.
Add Comment