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."
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?
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.
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."
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.
Ok, obviously /. has implemented an Auto April Fools Submittal mechanism.
/. staff are actually at work today, the AAFS is handling all of these submissions automagically.
None of the
Come on 12am...
Goofy, Geeky Gifts and More!
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
// increment i by one
i++;
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.
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.
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.
...and it's just not true.
/* 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?")
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
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