Shop OBEX P1 Docs P2 Docs Learn Events
Code Commenting — Parallax Forums

Code Commenting

Ray IddingsRay Iddings Posts: 47
edited 2005-08-02 20:52 in General Discussion
I saw this article over on slashdot and thought it was interesting.

http://particletree.com/features/successful-strategies-for-commenting-your-code

It is on commenting in your code, something a certian parallax employee, (I'm not going to say its Jon Williams,but it is). Always preaches about. Best line from the article :

"Commenting your code is like cleaning your bathroom—you never want to do it, but it really does create a more pleasant experience for you and your guests"

Enjoy.

Ray

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·*

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-08-01 20:19
    I rule!· I am the king of anal-retentive programmers!

    All kidding aside, have you notice that languages that enforce formatting -- like Python -- are gaining in popularity.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • FreezeSukkaFreezeSukka Posts: 41
    edited 2005-08-01 23:56
    I personally love to see that a lot of people on here comment in their coding. I do it because, quite frankly, I am not by any means an expert at programming and when I get lost or confused or just plain forget what I did, I can just read my comments. Also, if I download or use someone else's programming it makes it a lot easier for me (the rookie) to figure out what they did and why they did it.
    To every programmer out there..... Keep the comments flowing!!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    P.S. This is what this part of the alphabet would look like if "Q" and "R" were eliminated.
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-08-02 16:14
    Ray,

    good link - thank you. I noticed that I at least were following two of the presented rules since a long time by using TODO: and BUG: comments in almost all of my programs smile.gif .

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Ray IddingsRay Iddings Posts: 47
    edited 2005-08-02 19:05
    Being firly new to programing if it wasn't for the template that the artist formaly known as Jon created I would have spent countless hours trying to figure out what I was trying to do where. As far as phython goes I actual have been able to get a few things to work, namely my ER-1 thanks to good commenting. Now if I could only program more efficantly.....

    Ray

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·*
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-08-02 20:52
    As an artist, I am known as "JonnyMac" (see www.jonmcphalen.com). Of course, being a true artist (actor, writer, sometimes director) I prefer to refer to myself as "the JonnyMac" as in, "The JonnyMac is thirsty -- would you mind bringing me a Diet Coke? The JonnyMac thanks you."

    Onto the more serious subject at hand ... quality-crafted code becomes somewhat self-commenting, and additional comments are only for documentation and user edification. That's the JonnyMac's $0.02, anyway.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.