Slashdot Mirror


Auto Code Commenting Software, Free Chairs

sien writes "When you think about it, code is usually fairly mundane and simple. Finally someone has come up with a parser and lexer that actually auto-comments code, allowing for vastly more rapid coding. This amazing new tool is called The Commentator and claims to analyse source code as it's being written and insert the necessary code comments. It's absolutely amazing. Also the problem of seating for eXtreme Programming has finally been solved."

10 of 169 comments (clear)

  1. I know it's an APJ... by jacen_sunstrider · · Score: 2, Insightful

    But I can't help but think how this could ruin some programmers. There are some programmers who live by documenting their work before they actually write it, as a guide to what they do. In fact, in my assembly language class, they say this is the best way to do it (not true IMHO, but oh well). besides, don't you just get a thrill out of documenting a finished routine, going to compile it, and realize you copy/pasted over a large chunk of code? or, more likely, forgetting an end tag and commenting out half of your storage?

  2. Re:This is becoming tedious. by Hamstij · · Score: 2, Insightful
    Hear Hear.

    The fun of April fool's articles used to be picking the genuinely fake article amongst a whole heap of bizarre but true stories.

    But this is just becoming boring.

  3. OMG LOTF by sfcat · · Score: 3, Insightful

    This is the first funny article of the day. I like the self-importance option. In truth, a tool like this is impossible to actually write, but it would be cool since I never comment my code. But I don't comment for job security and I hate my coworkers. Just kiddin'

    --
    "Those that start by burning books, will end by burning men."
  4. Re:This is becoming tedious. by Rei · · Score: 4, Insightful

    Perhaps it will be opposite this year? Picking the true article out of the heaps of really bad fakes?

    --
    You don't exist. Go away.
  5. Auto April Fools Submitting by MadMorf · · Score: 2, Insightful

    Ok, obviously /. has implemented an Auto April Fools Submittal mechanism.

    None of the /. staff are actually at work today, the AAFS is handling all of these submissions automagically.

    Come on 12am...

  6. Nice example of poor commenting style by Kelerain · · Score: 3, Insightful

    Very good humor! But on a more serious note, this is actually part of the problem with some comments. They duplicate the code. Comments like

    i++; // increment i by one

    really slow down the comprehesion level of most competent programers, because they have to filter out a lot of redundacy. Comment on purpose, on the more general function of things, etc. An automated program, could only really comment on the code that was there, and likely in an obvious way.

    Not to detract from the marvelous humor of the 'article' but it was a good demonstration of the problem.

  7. I wish all the software I saw was as well commente by Software · · Score: 3, Insightful
    I've seen plenty of OSS and proprietary software code that had comments that *looked* auto-generated. Stuff like:
    /** Sets the Home to a new value */
    public void setHome(String newHome)
    { ...
    }

    I've never understood why people do things like this. Why not do something useful: specify what's a valid or invalid value of newHome, say when it should or should not be called. Or just leave it blank if you can't find something useful to say.

  8. Re:good code by RichardX · · Score: 1, Insightful

    Good code doesn't require variable names - the memory addresses should tell you everything you need to know about the program.
    And remember kids, GOTO is the one true flow manipulator. Accept no substitutes.

    --
    Curiosity was framed. Ignorance killed the cat.
  9. This comes up in every discussion on comments... by EvanED · · Score: 4, Insightful

    ...and it's just not true.

    Good variable names (class names, function names, etc.) go a long way: they tell you a lot about WHAT the program is doing. (I would argue that they can't always say everything too, but that's another matter.)

    However, they don't tell you WHY you are doing what you are doing.

    Also, remember there are other reasons for comments besides people reading your code. JavaDoc/Doxygen comments allow documentation to be produced right from the source. Comments such as /* FALLTHROUGH */ can tell sourch code analyzers such as Lint some useful information too. (Not to mention the programmer that looks at your code and has to think for a sec "did he mean to leave out the break there?")

  10. Re:*THE* Authority for all april fools pranks by DJStealth · · Score: 2, Insightful

    PLEASE MOD THIS (and other similar posts) DOWN, this has been in every single article today, and he has got mod points in each one.

    See user's other posts at
    http://slashdot.org/~Urgo