Results 1 to 9 of 9

Thread: Courtesy, adding comments to code

  1. #1
    I could stop if I wanted to artisteroi's Avatar
    Join Date
    2007-02
    Location
    Tampa, FL
    Posts
    271
    Login to Give a bone
    0

    Smile Courtesy, adding comments to code

    Hi.
    can we make a common courtesey rule? will you code junkies please comment your code when you post it so we newbs can decifer what the blocks do so we can more easily modifie it for our specific needs? It would be very helpful to know what we can and cannot cut form the code you post as well as knowing what the specific block is looking for/at or doing.
    From all Newbs Everywhere, Thankyou

  2. #2
    100 Club cganiere's Avatar
    Join Date
    2015-09
    Location
    Costa Mesa, California
    Posts
    117
    Login to Give a bone
    0

    Default Re: Courtesy, adding comments to code

    Here Here
    I Agree

  3. #3
    Member
    Join Date
    2007-05
    Posts
    38
    Login to Give a bone
    0

    Default Re: Courtesy, adding comments to code

    That would be very nice/helpful/interesting/informative indeed.
    On the other hand.. we shouldn't forget that the code is provided tot us (newbies) for free, by people who are visiting this forum in their own (or boss's) time and are taking time to provide us with (working) code. Their code, their rules
    So... if people do not want to bother documenting their code, it's their own choice. The F1-button will then hopefully be a good friend

  4. #4
    I could stop if I wanted to artisteroi's Avatar
    Join Date
    2007-02
    Location
    Tampa, FL
    Posts
    271
    Login to Give a bone
    0

    Wink Re: Courtesy, adding comments to code

    just asking for a courtesy not a law. I post code also and always define what the code does. I kow a few malicious persons who would gleefully post a viral code leaving a newb to fry his system because he didn't know what the code does. Just a courtesy you know like a turn signal in a car but then most people don't use those anymore either because they think "My car. My rules."

  5. #5
    Português - Programação Moderator Filipe Francisco's Avatar
    Join Date
    2001-12
    Location
    * PORTUGAL * Sintra *
    Posts
    859
    Login to Give a bone
    0

    Default Re: Courtesy, adding comments to code

    Great Idea


    Cheers,

  6. #6
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,397
    Login to Give a bone
    0

    Default Re: Courtesy, adding comments to code

    Good documentation is always a good idea, but you have to maintain a balance of how much to document. I try to comment just because I may not remember my intent 6 mos from now. Sometimes you need to rush. This request is sort of like asking people to quit running red lights. Its a good idea, but...

    Its also a two-edged sword. Relying on other's work can deprive you of the benefit gained by doing your own research. For me, when I'm studying new code, I first look at it as an outline. I try to grasp the overall logic. Then I focus on details like what a function does, what is its output/signature.
    C:> ED WORKING....

  7. #7
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: Courtesy, adding comments to code

    I can't see myself doing this. I post code to help people out. It is all in the help files, and I don't have the time to write a message, write the code, and then comment the code. You can learn a lot more by researching what the code does by looking in the help than if someone tells you want it does. I think the courtesy is writing working code for someone who knows no code. Why should people get code for free? People who know how to write code didn't get there by asking people to do it for them, so why should they do it for others for free? There are a lot of people who post here who could charge for their services, but don't, and I think that is courtesy enough.

  8. #8
    All AUGI, all the time zoomharis's Avatar
    Join Date
    2005-02
    Location
    Abu Dhabi (Native-India)
    Posts
    506
    Login to Give a bone
    0

    Default Re: Courtesy, adding comments to code

    Quote Originally Posted by wbreedveld
    That would be very nice/helpful/interesting/informative indeed.
    Agreed.
    Quote Originally Posted by wbreedveld
    On the other hand.. we shouldn't forget that the code is provided tot us (newbies) for free, by people who are visiting this forum in their own (or boss's) time and are taking time to provide us with (working) code.
    Well said.
    Quote Originally Posted by wbreedveld
    Their code, their rules
    A small correction here. "Their code, forum rules"
    Quote Originally Posted by wbreedveld
    So... if people do not want to bother documenting their code, it's their own choice.
    Thanks for the support.
    Quote Originally Posted by wbreedveld
    The F1-button will then hopefully be a good friend
    This is the best point so far.

    IMHO, our primary goal is to learn and share knowlege and experience than helping somebody to accomplish a task (that's also a factor, but not primary). I agree that a well documented code will defenitely be a positive step. But, as compared to software development, forums are really interactive. That means, if you are unable to follow any part of the code, you can raise your doubts anytime and most of the cases (as far I have seen) you will get a pretty good explanation from the OP or somebody else (Which is, in my openion far superior to a few lines of comment.). Moreover ,normally you see some comments about the task above or below the code tags. I haven't seen anybody posting only code unless otherwise it's clearly self explanatory.

    That's something quite personal.

  9. #9
    I could stop if I wanted to artisteroi's Avatar
    Join Date
    2007-02
    Location
    Tampa, FL
    Posts
    271
    Login to Give a bone
    0

    Smile Re: Courtesy, adding comments to code

    Quote Originally Posted by T.Willey
    I can't see myself doing this. I post code to help people out. It is all in the help files,
    Yes it is, but the help files are written for programmers and if you are coming from a background of a designer who works more with images than words then the help files are not much help. But if you don't want to comment your code it is your choice. We newbs can just ask questions about what each line does and whether it is safe to remove/modify that line for our specific needs. And most of you are very good about answering those questions. Which takes more time comment the code to start with or reading through our qestions and then aswering them? So this is just my view if someone is willing to teach it would be nice if they were also willing to explain. Few people are willing to follow without question. Thats how thins get messed up. And just to prove my sincerity I have posted to the lisp section my favorite animation code, fully commented, which I wrote over a year ago. I hope every body likes it and will follow my example when post code.
    Last edited by Ed Jobe; 2007-05-25 at 02:16 PM. Reason: fixed quote

Similar Threads

  1. Adding modify data to dxf code
    By mvsawyer in forum AutoLISP
    Replies: 13
    Last Post: 2015-07-17, 06:46 PM
  2. Replies: 0
    Last Post: 2012-04-27, 03:20 AM
  3. Adding comments to Vault Manager?
    By awarren in forum Vault - General
    Replies: 1
    Last Post: 2008-03-07, 06:38 PM
  4. Adding comments to CUI components
    By tony.nichols in forum AutoCAD CUI Menus
    Replies: 3
    Last Post: 2006-01-23, 03:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •