Do you comment?

This is a discussion on Do you comment? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; When you are coding programms... do you use comments?...

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    13

    Do you comment?

    When you are coding programms... do you use comments?

  2. #2
    Registered User
    Join Date
    Nov 2004
    Location
    India
    Posts
    515
    Yes, of course, i comment my programs..That makes them readable not only for others but also for me when i see them after a gap of some months or so.
    Code:
    >+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.

  3. #3
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    If you don't comment, you're either lazy or an idiot. Probably both.

  4. #4
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    I comment only extreme stuff, that isn't recognizable at first look.
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

  5. #5
    Registered User
    Join Date
    Dec 2005
    Posts
    13
    Well, mostly I comment but I understand my last scipt totaly now, so right now I am to lazy to comment.

  6. #6
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    >>> but I understand my last scipt totaly now,

    Will you when you suddenly and urgently need to modify it in 6 months time?

    Of course I comment, only fools do not.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  7. #7
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728
    I don't comment, I enjoy the hours of painfully looking at my code trying to figure out my logic from months ago.

  8. #8
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    Quote Originally Posted by PJYelton
    I don't comment, I enjoy the hours of painfully looking at my code trying to figure out my logic from months ago.
    i do too.
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

  9. #9
    C(++)(#)
    Join Date
    Jul 2004
    Posts
    309
    Yes.
    To code is divine

  10. #10
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357
    Even when something makes sense, if it's old or not your code then your going to have to spend some time figuring out what is happening, how long that takes depends on how well you name stuff and how complex your problem is/was.

    I always comment my code, even the obvious stuff, it really doesn't slow down or hinder my abilities.

  11. #11
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    when naming stuff properly and creating classes, there is no much need for commenting...
    but it's fun anyway
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

  12. #12
    Rabble Rouser Slacker's Avatar
    Join Date
    Dec 2005
    Posts
    116
    Comments are for weenies.

  13. #13
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    what a stupid thread...
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

  14. #14
    Dae
    Dae is offline
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Of course.

    I've always done concept commenting. I'm trying to get into documentation commenting. Thats where you explain the purpose, results, and such of a function, class, and such. Its very useful so you can use javadoc to make a document out of it, and because in real programs people (and yourself in 6 months) need to know the concepts behind your program functions. If it takes you a week to come up with a framework of classes for a game, you aren't going to just leave it and not comment the concept you resulted with are you? After all it did take you a week to come up with.. Theres plenty of reasons of why commenting is good, but none on why they are bad, so just write them out when you're thinking about what to do next in your program.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  15. #15
    Registered User
    Join Date
    Dec 2005
    Posts
    13
    Quote Originally Posted by adrianxw
    >>> but I understand my last scipt totaly now,

    Will you when you suddenly and urgently need to modify it in 6 months time?

    Of course I comment, only fools do not.
    Well, my script isn't that difficult yet!
    I am to noob to make a difficult script right now.
    BTW: I used php, I learned putting comments in my script because else I was looking hours to figure out what has gone wrong.
    I enjoyed it, yes! But it just took me to long... Sometimes I had only about an hour and still it wasn't finished, the next morning I forgot where I was...
    So I had to start over again

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can someone clarify this comment.
    By Overworked_PhD in forum C Programming
    Replies: 2
    Last Post: 05-15-2007, 11:17 PM
  2. Comment using // or /* &&& */
    By Roaring_Tiger in forum C Programming
    Replies: 3
    Last Post: 03-16-2005, 02:45 PM
  3. Tab->Space converter and comment colorizer
    By Kleid-0 in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 01-30-2005, 05:46 PM
  4. Can someone help me understand this example program
    By Guti14 in forum C Programming
    Replies: 6
    Last Post: 09-06-2004, 01:19 PM
  5. what is a pragma comment?
    By Shadow12345 in forum C++ Programming
    Replies: 9
    Last Post: 11-25-2002, 05:50 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21