Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Auto Code Commenting Software, Free Chairs
Programming
Posted by CmdrTaco on Fri Apr 01, '05 04:14 PM
from the its-like-christmas dept.
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."

   
Slashdot Log In
Nickname:

Password:

Public Terminal

[ Create a new account ]

Related Links
· Review Programming Products
· Compare prices on Programming Tools
· The Commentator
· seating for eXtreme Programming
· More Programming stories
 
This discussion has been archived. No new comments can be posted.
Auto Code Commenting Software, Free Chairs | Log in/Create an Account | Top | 169 comments | Search Discussion
Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
LOL (Score:1)
by incubuz1980 (450713) * on Friday April 01, @04:16PM (#12114081)
That is just so cool, asnd funny....
Re:LOL (Score:2)
by xstonedogx (814876) <xstonedogx@gmail.com> on Friday April 01, @04:32PM (#12114260)
Woah, not so fast. We better consult TBS [tbs.com] on this one.
Re:LOL (Score:1)
by FlopEJoe (784551) on Friday April 01, @04:50PM (#12114426)
My mod points are useless today. When will /. let us mod the article???
This is becoming tedious. (Score:1, Redundant)
by reality-bytes (119275) on Friday April 01, @04:16PM (#12114085)
(http://bounce-gaming.net/)


Individually, these stories might be amusing but when they're covering the entire front page it becomes rather wearing.
Re:This is becoming tedious. (Score:2, Insightful)
by Hamstij (831222) on Friday April 01, @04:18PM (#12114111)
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.

Re:This is becoming tedious. (Score:5, Insightful)
by Rei (128717) on Friday April 01, @04:20PM (#12114125)
(http://www.cursor.org/)
Perhaps it will be opposite this year? Picking the true article out of the heaps of really bad fakes?
Re:This is becoming tedious. (Score:1)
by yanko22 (207000) on Friday April 01, @04:26PM (#12114209)
Finally a good excuse for ./ to not have a single informative article the whole day. Woohooh
Re:This is becoming tedious. (Score:1)
by Neop2Lemus (683727) on Friday April 01, @05:54PM (#12115231)
(http://www.ithunk.blogspot.com/ | Last Journal: Thursday March 17, @12:16AM)
the gmail story is all true. Horribly, horribly, true.
Re:This is becoming tedious. (Score:1, Funny)
by Anonymous Coward on Friday April 01, @04:22PM (#12114154)
It could be worse: imagine what it would be if we had dupes about April fools !
Re:This is becoming tedious. (Score:5, Informative)
by Auckerman (223266) on Friday April 01, @04:25PM (#12114196)
Every year slashdot does this, every year people complain. The joke is being fooled into complaining. The joke is people revisit the site like every normal day hoping for it to end and it doesn't. The editors are having a laugh at YOUR expense and you don't even know it.

Relax, go over to Fark, who's random joke page can actually be amusing and read about the Pope being note quite dead yet and come back to Slashdot tomorrow. If you actually miss anything real, you can read it then.
Re:This is becoming tedious. (Score:2)
by INetUser (723076) on Friday April 01, @04:51PM (#12114440)
Well, if you notice that the comments count on the front page would appear to be at an all time low, so I guess /. has made itself irrelevant today.
Re:This is becoming tedious. (Score:1)
by TyfStar (747185) on Friday April 01, @05:36PM (#12114953)
relax, go over to Fark

Now THAT is a good April 1 page!! it instantly made me think of every geek I know. :-D

Re:This is becoming tedious. (Score:3)
by null etc. (524767) on Friday April 01, @04:34PM (#12114279)
I agree, but this one is actually pretty funny if you read it (and are a programmer).
short term memory loss (Score:2)
by commodoresloat (172735) on Friday April 01, @04:45PM (#12114389)
(http://informationtornado.com/)
I feel like the guy from memento. This is the third time I stopped what I was doing to look at slashdot, and it's the third time I forgot it was april fool's until halfway through the story. You think I'd get it by now.

Clearly, I need to recalibrate the delicate balance of caffeine and cannabis in my system...

Re:This is becoming tedious. (Score:2)
by jericho4.0 (565125) on Friday April 01, @04:48PM (#12114412)
I agree. Enough already. Some of us need to feel like we're wasting time more productivly.

Reminds me of an old joke... (Score:1)
by AnonymousJackass (849899) on Friday April 01, @05:05PM (#12114591)
...rather wearing.
Two nuns in a bath.
Nun #1: "Where's the soap?"
Nun #2: "Yes it does, doesn't it."

*running away*
Please shoot me now! (Score:3, Funny)
by nacturation (646836) on Friday April 01, @04:16PM (#12114089)
(Last Journal: Tuesday March 08, @04:06AM)
Won't someone please think of the children!
 
Re:Please shoot me now! (Score:2)
by StalinsNotDead (764374) * on Friday April 01, @05:12PM (#12114654)
(Last Journal: Tuesday April 12, @05:10PM)
Please shoot me now!

Won't someone please think of the children!


Why? What are you planning on doing to the children?
Re:Please shoot me now! (Score:2)
by Atzanteol (99067) on Friday April 01, @06:12PM (#12115458)
(http://www.edespot.com/~amackenz/)
Perhaps he intends to *have* some.
chair.. (Score:3, Funny)
by Kaisum (850834) on Friday April 01, @04:17PM (#12114093)
That chair is not big enough for some men's asses.
1 Half Chair/Cheek ratio? (Score:1)
by seanvaandering (604658) <sean.vaandering@ ... S.com minus poet> on Friday April 01, @04:21PM (#12114145)
Looking at it, it almost looked like it developed from that point alone ;)
Re:chair.. (Score:5, Funny)
by ReverendLoki (663861) on Friday April 01, @04:22PM (#12114153)
Sadly, that is the only chair big enough for some men's asses...
Re:chair.. (Score:2)
by lpangelrob2 (721920) on Friday April 01, @04:45PM (#12114381)
(Last Journal: Friday February 18, @04:11PM)
They must not have designed that chair with XP in mind, because it looks like as soon as I sit on it the chair will lean over and break.

Come on guys! Test, build, *then* refactor...

Extreme XP seat? (Score:2, Funny)
by Anonymous Coward on Friday April 01, @04:17PM (#12114094)
I sure hope this 2-person seat [cenqua.com] can handle a 500-pound couch potato, otherwise my partner will by flying.
I'm confused... (Score:2, Funny)
by AnonymousJackass (849899) on Friday April 01, @04:17PM (#12114096)
That chair -- the "PairOn" -- is it for intimate co-workers, siamese twins or for people with big, fat asses?
Re:I'm confused... (Score:2)
by tmasssey (546878) on Friday April 01, @04:43PM (#12114361)
(http://www.outoftheboxsolutions.com/)
One of the principles of Extreme Programming [extremeprogramming.org] is paired programming: two programmers sitting in front of a single computer. This is a chair to "facilitate" this, including being able to elevate the chair to "standing height" for the daily standing meetings, also a part of XP...

Re:I'm confused... (Score:2)
by zootm (850416) on Friday April 01, @04:56PM (#12114493)
XP = eXtreme Programming, a means of development which preaches hands-on working and strict adherence to a few work processes. One of these is that all code should be written by two people at once.
Off-color Commentary (Score:5, Funny)
by Fox_1 (128616) on Friday April 01, @04:17PM (#12114100)
Beauty, this will replace the legions of QA people that used to do my code commenting
I know it's an APJ... (Score:2, Insightful)
by jacen_sunstrider (797955) on Friday April 01, @04:17PM (#12114103)
(http://www.wardtanger.com/ | Last Journal: Wednesday January 26, @10:59PM)
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?
Re:I know it's an APJ... (Score:2)
by JonTurner (178845) <jon.turner@high s t r e a m . net> on Friday April 01, @04:43PM (#12114358)
Just remember, Ninjas don't forget endtags like other mammals.

And if they DID wipe out half their storage, I would be like, "Dude! You'd better look out -- that Ninja just dropped the PENDING_ORDERS table in Production and I think he's going flip out and chop off somebody's head!"
good code (Score:2, Funny)
by theMerovingian (722983) on Friday April 01, @04:19PM (#12114113)

Good code doesn't require comments - the variable names should tell you everything you need to know about the program.

Re:good code (Score:4, Funny)
by DarkMantle (784415) on Friday April 01, @04:26PM (#12114206)
rriiiiigggghhhhtttt, and the tooth fairy created linux
Re:good code (Score:2)
by metlin (258108) <metlin@cc.gatech ... minus herbivore> on Friday April 01, @04:43PM (#12114372)
(Last Journal: Thursday April 07, @07:11AM)
I don't think that's a nick that Linus Torvalds would appreciate munnnchhhhhhhh.
Re:good code (Score:1)
by ggvaidya (747058) on Monday April 04, @03:44AM (#12131593)
(http://thingspeoplesaid.blogspot.com/ | Last Journal: Tuesday February 15, @04:38AM)
Why not, he's admitted as much [linuxworld.com].
Re:good code (Score:2, Insightful)
by RichardX (457979) on Friday April 01, @04:32PM (#12114265)
(http://www.worldcomm...o?teamId=855RSMBR9N1)
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.
Re:good code (Score:1, Troll)
by lukewarmfusion (726141) on Friday April 01, @04:37PM (#12114303)
(http://www.slashdot.org/~lukewarmfusion/journal/ | Last Journal: Wednesday March 09, @03:11PM)
That's right! Like this:
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
(As an aside, this is a good example of optimizing code for production web delivery vs. clear, well-commented or self-documenting code for development.)
Re:good code (Score:1, Interesting)
by Anonymous Coward on Friday April 01, @06:19PM (#12115560)
It's not even very well optimized.
Ignoring the obivous need for a generally unique function name...

      dm.MM_p=[];
would save some bytes and parsing time

The "i=0" isn't needed, since default type of i will be "undefined" which will silent convert to 0 in an integer context

It "should" be quicker to do "++i" rather than "i++" in the for loop.

The "!=0" test of indexOf result isn't needed
Re:good code (Score:2)
by lukewarmfusion (726141) on Friday April 01, @06:46PM (#12115956)
(http://www.slashdot.org/~lukewarmfusion/journal/ | Last Journal: Wednesday March 09, @03:11PM)
In case it wasn't recognized (and judging by the troll mod, it wasn't) that is a Macromedia function. It's usually inserted by Dreamweaver (and maybe Flash or Contribute, both of which generate HTML pages).

Some of the things you claim I can't really verify - I don't know why they made the decisions they did or if there was any thought behind it at all. For instance, the indexOf part might be intended for support of a specific browser's implementation of Javascript.
This comes up in every discussion on comments... (Score:5, Insightful)
by EvanED (569694) <evaned@gmai l . c om> on Friday April 01, @04:41PM (#12114344)
...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?")
this is why only one comment is necessary (Score:2)
by commodoresloat (172735) on Friday April 01, @04:48PM (#12114409)
(http://informationtornado.com/)
/* You're not supposed to understand this */
Re:This comes up in every discussion on comments.. (Score:1)
by BlockedThreads (870266) on Friday April 01, @05:41PM (#12115044)
I have never seen good documentation produced with JavaDoc or Doxygen. Usually the documentation consists of a page for each class providing nothing that you could not get from a well formatted header file. People just seem to use these tools to tick the documentation box. Someone show me I am wrong and point me to some good automated documentation.
Re:This comes up in every discussion on comments.. (Score:1)
by ishepherd (709545) on Friday April 01, @05:53PM (#12115213)

Uh, well, here [sun.com]?

The doc generators don't actually remove the need to, well, document things. It's just handy to be able to move around through hyperlinks, to be able to see documentation of all a class' members (without having to go look at its superclasses), and so on.

And it's surely good to keep the comments directly above the relevant code rather than in some separate header file, so they are (marginally) more likely to be up-to-date.

Re:This comes up in every discussion on comments.. (Score:1)
by BlockedThreads (870266) on Friday April 01, @06:25PM (#12115632)
Ok that is good documentation. I was a bit too emphatic in my claim. But you know what I mean. I don't want to name names but there are a number of projects in which the Doxygen generated documentation is almost entirely pointless. That's not to blame the documentation programs. They clearly can be used well - as you indicated.
Re:This comes up in every discussion on comments.. (Score:1)
by ishepherd (709545) on Friday April 01, @07:03PM (#12116229)
Yeah, I do know what you mean. Sounds like we agree then.

Like anything else. You start out with best of intentions, then... requirements change, deadlines get slipped, and things like writing those doc-generator comments can take a running jump... Heh.
Re:This comes up in every discussion on comments.. (Score:2)
by Tim C (15259) on Friday April 01, @06:12PM (#12115461)
Don't blame the tool because the people using it are lazy and/or doing it wrong.
Re:good code (Score:5, Funny)
by bwalling (195998) on Friday April 01, @04:42PM (#12114350)
(http://slashdot.org/)
Good code doesn't require comments - the variable names should tell you everything you need to know about the program.

You must be the guy that made the database at the last place I worked! The column names were complete sentences, including spaces and punctuation (it had never occurred to me that you could even do that). It was a real bitch to work with. Find the middle ground.
Re:good code (Score:1, Interesting)
by Anonymous Coward on Friday April 01, @04:45PM (#12114384)

Dude, if you have some screenshots or files left over from that place, you should send some choice bits over to here [thedailywtf.com] for proper... umm... evaluation.
Re:good code (Score:1)
by kevinx (790831) on Friday April 01, @04:42PM (#12114352)
I started to laugh, but then the laughter turned to concerned when I realized that this was modded insightful rather than funny.
Re:good code (Score:1)
by Moskie (620227) on Friday April 01, @04:43PM (#12114370)
This is a joke, right? Insightful my butt.

Good variable names tell you what a variable represents. Is that the only thing you think comments can do? Perhaps for simple programs that's all you would need. But what about insight as to why a certain algorithm was chosen? Or documenting things like the implementation of business rules?

Admit it, you're lazy. I am too. I don't comment my code nearly as much as I should, but I recognize its usefulness and wish I did more commenting.
Re:good code (Score:2)
by Dracolytch (714699) on Friday April 01, @05:05PM (#12114592)
(http://www.dracosoftware.com/)
I'm not sure if this is supposed to be FUNNY, a TROLL or someone just being STUPID.

It's April Fools, but I have met some people that actually believe this works. Those are also the same people that wrote the worst code I've seen in my life.

~D
Re:good code (Score:2)
by theMerovingian (722983) on Friday April 01, @05:10PM (#12114639)

I'm not sure if this is supposed to be FUNNY, a TROLL or someone just being STUPID.

Welcome to /. on April 1, brother. Believe me, I was as surprised by the "Insightful" moderation as anyone!

Re:good code (Score:1)
by MrVictor (872700) on Friday April 01, @05:24PM (#12114803)
Best name for a function ever: doThisShit()
Re:good code (Score:1)
by josath (460165) on Friday April 01, @05:36PM (#12114942)
(http://de3.kicks-ass.net/)
There is a limit to this though, a guy who worked here for a bit had a tendancy to do things like:
function calculateTheSumOfTwoNumbers(theFirstNumber, theSecondNumber)
{
  var temporarySumVariable = theFirstNumber;
  temporarySumVariable += theSecondNumber;
  return temporarySumVariable;
}
OMG LOTF (Score:3, Insightful)
by sfcat (872532) on Friday April 01, @04:19PM (#12114115)
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'
Re:OMG LOTF (Score:2)
by Jerf (17166) on Friday April 01, @05:16PM (#12114691)
(http://www.jerf.org/iri/ | Last Journal: Saturday August 18, @12:04PM)
In truth, a tool like this is impossible to actually write, but it would be cool since I never comment my code.

Well, if you punt on the relevance issue, you could probably come pretty close with an old-style Dissociated Press-style Markov chain generator and a sufficient corpus of comments to draw from. (The other parameters would affect what comments are used for the corpus.)

This could be sort of interesting. But then, pretty much anything fed into such a Markov generator is "sort of interesting".

I suppose this would also be a punt on the "coherence" issue, but I think that would just be part of the joke.
Extra Madden Option (Score:5, Funny)
by Shadow Wrought (586631) on Friday April 01, @04:20PM (#12114120)
(http://slashdot.org/~Shadow%20Wrought/journal | Last Journal: Monday April 11, @04:14PM)
I wonder if it will read the code commentary aloud in John Madden's voice for extra money?
Re:Extra Madden Option (Score:1)
by Fulg (138866) on Friday April 01, @04:30PM (#12114246)
I wonder if it will read the code commentary aloud in John Madden's voice for extra money?

Now THAT, my good sir, is genuinely funny. A definite "+5 Coffee up the nose", in lieu of my non-existent mod points.

Thank you for brightening up my boring /. fake story day!
Re:Extra Madden Option (Score:2)
by Shadow Wrought (586631) on Friday April 01, @06:47PM (#12115976)
(http://slashdot.org/~Shadow%20Wrought/journal | Last Journal: Monday April 11, @04:14PM)
I was laughing as I wrote it thinking of all the "BAM's" and "BOOM's" that he would use to describe stuff;-)

Happy April 1st!

Re:Extra Madden Option (Score:2)
by schon (31600) on Friday April 01, @05:07PM (#12114608)
(http://slashdot.org/)
sweat contest

Umm, exactly what do you think the two people are doing in that chair, that they would sweat so much? .. and why would *anyone* want to hold a contest to see who's the sweatiest?
Dead horse.... (Score:1)
by matth1jd (823437) on Friday April 01, @04:20PM (#12114121)
Beating a dead horse doesn't even come close to these stories now.... please stop. Please.
Re:Dead horse.... (Score:2)
by rayde (738949) on Friday April 01, @04:39PM (#12114329)
(http://www.distributed.net/)
oh come on, it's april fools. if you want some real news, go to CNN's Sci/Tech page for today. we'll all welcome you back here tomorrow with duplicate stories on how much we all hate SCO.
Re:Dead horse.... (Score:1)
by Jane Hackworth (872492) on Friday April 01, @04:56PM (#12114503)
There's an address bar up near the top of your browser. If you click in it and type an URL, you can change the website you're looking at. No, I'm not kidding!
That's an AFD product that would be of some use (Score:1)
by roberto0 (242247) <roberto0@gmail.cFREEBSDom minus bsd> on Friday April 01, @04:20PM (#12114124)
(Last Journal: Sunday November 24, @05:44PM)
Funnier than Google Gulp, but not as funny as that Parrot gag from O'Leary a few years ago.
Quote from the Commentator (Score:1)
by Mad Marlin (96929) <chris-gore@earthlink.net> on Friday April 01, @04:20PM (#12114128)
(http://www.cgore.com/)
Think about it for a moment: You are that star footballer.

Ha! Fat chance.

auto comments? (Score:1)
by thundercatslair (809424) on Friday April 01, @04:21PM (#12114133)
This is probably a joke, but comments are the most useful part of any code. I used to hate them finding it boring and useless. After a I wrote a few large projects I couldn't comment enough. Auto comments might not be as usefull rather then if you did them yourself
Re:auto comments? (Score:1)
by me at werk (836328) on Friday April 01, @05:49PM (#12115145)
(http://xrl.us/mawff | Last Journal: Tuesday April 05, @03:05PM)
I think auto comments would be useful. For example, we were talking in #firefox the other day and somehow got onto "optimized code", which, while not as easy to read as the longer code which happens to be self explanatory, does the job better with less text.

The auto commenter could come through and turn that optimized code into a sentence or so of what it'd do, then post it as comments. It'd be pretty useful, especially if it were able to do it recursively (Got a program and can't easily figure out what it does? Run the auto commenter and it'll tell you in plain english!).

It's brilliant, just not the best application of the application right off. Best for the 'maintenance programmer' or someone trying to understand your code.
This should be a compiler option (Score:1)
by zigzag (2071) on Friday April 01, @04:21PM (#12114137)
Along with the new auto-debug option.
Auto April Fools Submitting (Score:3, Insightful)
by MadMorf (118601) on Friday April 01, @04:21PM (#12114139)
(http://www.e-milfs.com/ | Last Journal: Tuesday March 08, @10:39AM)
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...
Re:Auto April Fools Submitting (Score:2)
by Jellybob (597204) <jon&jellybob,co,uk> on Friday April 01, @04:39PM (#12114326)
(http://www.jellybob.co.uk/ | Last Journal: Thursday January 29, @09:43AM)
I'd never thought of it that way... I guess it would make sense though - they can arrange the yearly company party without anyone knowing they're gone!

It's genious really.
Comments... (Score:5, Funny)
by arose (644256) on Friday April 01, @04:21PM (#12114140)
/* I don't know what I was thinking */
/* This shouldn't work... */
/* I'll just insert a backdoor here, no one will ever notice */
/* SCO code here, don't tell them */
Comments are for pussies (Score:1)
by govtcheez (524087) <govtcheez03@hotmail.com> on Friday April 01, @04:22PM (#12114150)
(http://slashdot.org/)
It was hard to write, it should be hard to read.
Nice example of poor commenting style (Score:3, Insightful)
by Kelerain (577551) <avc_mapmaster@ho[ ]il.com ['tma' in gap]> on Friday April 01, @04:22PM (#12114151)
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.
Re:Nice example of poor commenting style (Score:2)
by Peyna (14792) on Friday April 01, @05:01PM (#12114546)
(http://csilo.com/)
i++; // increment i by one

The problem isn't so much the redundant comments like this, it's that some people think that they are appropriate to tell us what the function does. Perhaps more importantly, "i" should have a name that tells you what it's function is, and the comment could tell you perhaps WHY we're incrementing it. If it is blatantly obvious so that even the least intelligent programmer can figure out the how, what and why of the function, no comment is needed.

So if you have:

i++; // increment by one

perhaps a better function would be:

i++; // increase number of days since slashdot posted a meaningful article because the time is now 24:00 GMT.
Re:Nice example of poor commenting style (Score:1)
by moxjake (557231) <jpbower@mtu.DEBIANedu minus distro> on Friday April 01, @05:29PM (#12114855)
(http://www.playerdomain.net/ | Last Journal: Saturday September 14, @11:58AM)
Not only that, but they misspelled Dijkstra
Re:Nice example of poor commenting style (Score:2)
by HFXPro (581079) on Friday April 01, @06:54PM (#12116082)
what ID though? does application of this function have any side effects?
I can't wait! (Score:2)
by Stephen Samuel (106962) <samuel@@@bcgreen...com> on Friday April 01, @04:23PM (#12114157)
(http://www.bcgreen.com/~samuel | Last Journal: Sunday May 23, @04:03PM)
.... Until 12:00 Noon hits the International Date line.

It's 12:20 on the west coast. Only another 3 1/2 hours left.

(( On the bright side, though, I did convince a friend that I'd taken a job in Redmond as a shill for (OK: 'Spokesperson') for Microsoft. ))

Re:I can't wait! (Score:1)
by !usrlocalbinallen (769373) on Friday April 01, @05:40PM (#12115009)
(http://www.mudcat.org/)
That should be spokesmodel!
got this from fortune (Score:3, Funny)
by mpaon (787734) on Friday April 01, @04:23PM (#12114166)
Good programmers never comment their code; it was hard to write, it should be hard to understand.
I wish all the software I saw was as well commente (Score:4, Insightful)
by Software (179033) on Friday April 01, @04:23PM (#12114167)
(http://userfriendly.org/ | Last Journal: Tuesday April 12, @11:40AM)
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.

Re:I wish all the software I saw was as well comme (Score:1)
by Vadim Grinshpun (31) on Friday April 01, @04:43PM (#12114371)
(http://gleep.dhs.org/~vadim)
Because some places require you to write comments (even when they are really not necessary) and enforce it with a style checker.
One way to shut up the said checker is to generate comments of this sort. Sad, but true :)
Re:I wish all the software I saw was as well comme (Score:2)
by Oligonicella (659917) on Friday April 01, @05:35PM (#12114931)
"One way to shut up the said checker is to generate comments of this sort."

Yeah, as opposed to providing a valid comment, despite it's being "not necessary".
Re:I wish all the software I saw was as well comme (Score:3, Informative)
by eyegone (644831) on Friday April 01, @04:50PM (#12114422)

I suspect that you're trolling, but that is a Javadoc comment. The comment text, "Sets the Home to a new value," will be used as the method's description in the automatically generated HTML documentation.
Re:I wish all the software I saw was as well comme (Score:2)
by raygundan (16760) on Friday April 01, @05:28PM (#12114850)
(http://slashdot.org/)
I agree. This happens all too often-- it's what you get when you mandate code comments but don't add time for it to your project schedule. Doing it right can frequently take longer than writing the code, and sadly, nobody will pay for the time it takes. So the programmers tag every "i=1;" with a "//set i equal to 1" and leave out anything even remotely subtle or useful.
Re:I wish all the software I saw was as well comme (Score:2)
by Oligonicella (659917) on Friday April 01, @05:50PM (#12115160)
Lemme get this straight. You believe that the process of designing (or choosing) an algorithm doesn't provide you with the information you then simply type up as a comment?

Explain how that is possible, please.

In a working environ, a dipshit who fills their program with "//set i equal to 1" type shit deserves termination. It ain't for their own amusement, and it ain't amusing

Re:I wish all the software I saw was as well comme (Score:2)
by raygundan (16760) on Friday April 01, @10:51PM (#12118144)
(http://slashdot.org/)
The information may be there, but organizing it and putting it down in a useful fashion is not something most developers ever do, let alone do quickly. It's rare that I see good info, particularly on side effects and non-parameter requirements (file formats, db requirements, external system constraints and expectations, etc...)

I agree with you that a good programmer should be able to do this instinctively after design and implementation of the code. Unfortunately, not every (or even most) programmers are good. Real life, however, forces you to deal with and create procedures for the lousy programmers. A manager who doesn't understand the variation among his developers is asking for crap when proper documentation is not checked and enforced-- and when the time it really takes is not factored into the project estimates.

The dipshits do deserve termination. I'd rather have nothing than crap. Sadly, you will almost always have to work with people like this-- and you (and/or the project manager) will *have* to find ways to coax usable output out of them, or you end up doing their jobs for them.

I'm just saying that putting the time squeeze on people who are already just barely getting things done isn't going to result in a font of wisdom in the comments. By not making allowances for differences in skill (and thus development time) you end up making maintenance or expansion drastically more difficult down the road, because documentation is what gets crapified first.

And remember: there is always somebody smarter than you, too. So don't be too smug with the dipshits.
Re:I wish all the software I saw was as well comme (Score:2)
by InfiniteWisdom (530090) on Friday April 01, @05:46PM (#12115099)
(http://www.vinaypai.com/)
Possibly because companies have "standards" written by people that don't understand technology that dictate that every function must have a comment explaining its purpose. This can get truly atocious with OO languages where you often have trivial accessor functions like the one in this example.
Re:I wish all the software I saw was as well comme (Score:2)
by yomahz (35486) on Friday April 01, @10:21PM (#12118044)

  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.


Have you never used an IDE [eclipse.org]? They look auto-generated because they were.
The personality check answers all questions.. (Score:2)
by Gopal.V (532678) <gopalv82NO@SPAMyahoo.com> on Friday April 01, @04:24PM (#12114172)
(http://t3.dotgnu.info/ | Last Journal: Monday March 14, @02:05AM)
if you have any more doubts - look at the configuration [cenqua.com] screen. Also peek at the commented code - looks familiar ?. (linux [linux.no], etc..)
"Commentator" - you can get it for free. (Score:2)
by AtariAmarok (451306) on Friday April 01, @04:25PM (#12114189)
This is truly a revolutionary technology. There is even a mode whereby it will be nice and friendly and propagate itself through "Microsoft Internet Explorer" without you even asking: inserting comments into all the code on your computer for you! They can't do it all for free, so don't you worry at all about the ''' home loan and ''''viagra comments that appear in all of your code. It it is just part of their business model.
Enough of the damn April Fools jokes (Score:1)
by Laconian (578463) on Friday April 01, @04:25PM (#12114190)
Slashdot has become utterly worthless today. I thirst for legitimate articles!
Re:Enough of the damn April Fools jokes (Score:2)
by nb caffeine (448698) <.moc.oohay. .ta. .pongic.> on Friday April 01, @04:33PM (#12114272)
(http://www.intellectualjourney.com/)
Dude, thats every day. At least there isnt dupes today... (knock on wood)
+1, INSIGHTFUL (Score:1)
by hanshotfirst (851936) on Friday April 01, @05:42PM (#12115064)
Where are mod points when I need them?
Re:+1, INSIGHTFUL (Score:1)
by hanshotfirst (851936) on Friday April 01, @05:46PM (#12115105)
Just after I posted the above, the dupe article for iCopulate, Executive PONG, etc., was posted.

It's nice to see things beginning to return to normal.

Wow! (Score:1)
by ABaumann (748617) on Friday April 01, @04:25PM (#12114191)
Man do I wish this was real. Maybe it could just take random quotes from bash.org and insert them as comments in my code.

Oooh! Brb... spending time at work writing code to insert random bash.org comments in commercial applications.
Utterly useless to me (Score:2, Interesting)
by Cheirdal (776541) on Friday April 01, @04:25PM (#12114200)
(http://mycodedontstink.com/slackers/)
I can look at any piece of code in any project I've worked on and see what the code technically does. What I can't do is look at something and say "Ah, this criteria exists in the code because of business rule #275 for customer X." Almost all my comments are related to business rules and what I'm trying to accomplish. There is no way an autocomment tool could analyze the code for the business rules I use.
Re:Utterly useless to me (Score:2, Funny)
by Cheirdal (776541) on Friday April 01, @04:33PM (#12114269)
(http://mycodedontstink.com/slackers/)
Damn you April Fool's Day! ;)
Re:Utterly useless to me (Score:2)
by Jeremi (14640) on Friday April 01, @06:53PM (#12116061)
(http://www.lcscanada.com/jaf)
Some of the most useful comments in my codebase look like this:


        sLayout->addSpacing(10); // FogBugz #2768


This adds very little clutter to the code, and if anyone wants to know why that line is there, they can head over to the bug database and read all 50 paragraphs of description and debate regarding the problem that this line fixed, when it was added, how it works, etc.

Personality Controls (Score:1)
by Rightcoast (807751) on Friday April 01, @04:27PM (#12114214)
(http://www.rightcoaster.com/)
I will run mine with verbosity turned way down and bitterness turned way up...Just like the real me!
This one is giving my PHB an idea :( (Score:3, Funny)
by mollog (841386) on Friday April 01, @04:27PM (#12114216)
The PHB wants to order these so he has a place to sit while micromanaging.
Missing languages (Score:2)
by frisket (149522) <peter@@@silmaril...ie> on Friday April 01, @04:28PM (#12114228)
(http://silmaril.ie/cgi-bin/blog)
Damn, still nothing for XSLT.
Auto Comment Slashdot (Score:1)
by superstick58 (809423) <superstick58 AT hotmail DOT com> on Friday April 01, @04:29PM (#12114233)
I have adapted this technology to the Slashdot commenting system. Now, I will always have first post, always be the first to say In Soviet Russia...

I can already taste the Karma.

Let's see, it's April Fools... (Score:2)
by syphax (189065) on Friday April 01, @04:29PM (#12114237)
(Last Journal: Wednesday August 18, @06:22PM)
... so it must be time to head over to ./ and BITCH about the lame April Fool's jokes!

Me, I love April 1 because I can ignore ./ for a full day. Or at least a few more hours than usual...
PaiRON? (Score:2)
by red_dragon (1761) on Friday April 01, @04:30PM (#12114249)
(http://fully.qualified.url/)

PairOn... Pron... PairOn... Pron...

I don't know, but that chair seems designed exclusively for eXtreme Pr0n-watching with the SO.

Oh, wait; I'm on Slashdot... nevermind.

// TODO... (Score:5, Funny)
by duckpoopy (585203) on Friday April 01, @04:32PM (#12114262)
(Last Journal: Wednesday August 04, @04:27PM)
//TODO: remove this comment
Cool Chair! (Score:1)
by lbmouse (473316) on Friday April 01, @04:32PM (#12114263)
I want that chair! Finally a Herman Miller that will fit my fat ass.
best one (Score:1)
by jonathanduty (541508) on Friday April 01, @04:37PM (#12114307)
(http://www.jonandkerry.com/)
This gets my vote as best one of the day.
Comments ... NO! (Score:2, Interesting)
by jmartens (721229) <jimmartensNO@SPAMhotmail.com> on Friday April 01, @04:39PM (#12114330)
Real programmers don't comment. If you did that someone might actually be able to figure out what you are doing. You need a code obfuscate function that takes simple functions and makes them complex and adds nonsensical comments, such as:

Before:
int i = 1;
while (i 1000) { ... A[i] ...;
    i ++;
}

After: //Super Froopy node generator
int i=11; //Charge the Interociter
while (i 8003) { ... A[(i-3)/8] ...; //null node generator
    i += 8;
}
But... (Score:1, Interesting)
by RayDude (798709) on Friday April 01, @04:39PM (#12114331)
If the comments are so simple that a machine parser can write them, how could they possibly be useful?

I thought the point of comments is to write the things that are not obvious. Obvious comments are coding spam where I work.

Raydude
Best April Fools I've seen :) (Score:3, Funny)
by Toby The Economist (811138) on Friday April 01, @04:40PM (#12114334)
bitterness=9,profanity on

major lol :)

--
Toby
In the name of all that is geeky! (Score:1)
by Conspiracy_Of_Doves (236787) on Friday April 01, @04:43PM (#12114363)
Enough! Make it stop! Make it stop!
First Test Run (Score:3, Funny)
by Nom du Keyboard (633989) on Friday April 01, @04:43PM (#12114365)
10 PRINT "Hello World" 'what a novice
20 END 'boy I'm glad that's over
Re:First Test Run (Score:1)
by gkwok (773963) on Friday April 01, @05:04PM (#12114581)
(http://www.gregorykwok.org/)
You forgot

15 GOTO 10 'um, yeah. goto line 10

GIVE ME CYANIDE!.... (Score:1)
by djan (121552) on Friday April 01, @04:45PM (#12114383)
It's got to be more peaceful than this.
Groan (Score:2)
by Chanc_Gorkon (94133) <jmclaug3&columbus,rr,com> on Friday April 01, @04:49PM (#12114414)
Sheesh....Now the fscking ADS are even April Fools.
How about the Automated Code Review (tm) program? (Score:1)
by mollog (841386) on Friday April 01, @04:50PM (#12114421)
If there was a follow-on product that could automatically do group code reviews, complete with inane and gratutious remarks, truisms, and CS type boilerplate comments, I could really use that. Talks about eXtreme Programming!
for loop comment (Score:1)
by 0xABADC0DA (867955) on Friday April 01, @05:00PM (#12114533)
//avoid using the reverse "i >= 0; i--" style loop here

bitterness=9:
// only some lame intern would write a counting
// loop as "i >= 0; i--" instead of "i-->0;"

1. puts lots of work into craft
2. become clueful, uber-coder
3. sell clue on ebay for ad-free slashdot pages
4. ...
5. profit?

mundane and simple (Score:1)
by imess (805488) on Friday April 01, @05:10PM (#12114631)
if the code is so mundane and simple, why does it need to be auto-commented?
Who the hell is Dykstra? (Score:2)
by roman_mir (125474) on Friday April 01, @05:22PM (#12114776)
(http://russkey.mozdev.org/ | Last Journal: Monday December 08, @12:44PM)
The probably meant Dijkstra [utexas.edu]
but then again, they wrote the C0|\/||\/|3|\|7470r, who am I to question?

MY GOD! (Score:1)
by cdcarter (822001) on Friday April 01, @05:43PM (#12115071)
(http://slashdot.org/cdcarter.freeshell.org | Last Journal: Friday December 24, @01:05PM)
My God, will they ever stop?!?!?!?!? *TIME MACHINE TO 11:59 PM* Windows LongHorn, Re-Named Windows NeverHappeining-Whore
Commenting my Code (Score:1)
by 00 Agent Kid (833256) on Friday April 01, @05:45PM (#12115096)
(http://www.yoshistation.com/)
This could be useful, but I'd probably find myself deleting autocomments more than keeping them. I sparsely comment my code, and only do so when it is necessary. I can't really see this saving me a lot of time.
Is this day over yet? (Score:1)
by Skudd (770222) on Friday April 01, @06:15PM (#12115498)
(http://blog.skudd.com/ | Last Journal: Monday January 10, @10:28PM)
I've never even enjoyed this "holiday", and it seems that this year it's just gone overboard. Hell, look at that ThinkGeek ad up there... "iCopulate"?! An iPod dildo? WTF?!

If anyone needs me, I'll be living in reality for the rest of the day.
I'm sad. (Score:1)
by Lord Duran (834815) on Friday April 01, @06:25PM (#12115635)
I saw the computer virus spread to humans article, I saw the ipodtreo article, but not before I saw a machine-made commentator did I realize that it was april fools.
Re:ENOUGH!!!! (Score:1)
by jkmiecik (242175) <adljfhadljf AT adflgadkfhadf DOT com> on Friday April 01, @04:25PM (#12114187)
Amen brother. It's just fucking annoying.
Re:Comments? Who needs comments? (Score:2)
by MyLongNickName (822545) on Friday April 01, @04:29PM (#12114241)
(Last Journal: Friday March 25, @10:23PM)
It says "this guy shouldn't be allowed to touch himself, much less a computer".
Re:ENOUGH!!!! (Score:5, Funny)
by jaysones (138378) on Friday April 01, @04:33PM (#12114274)
I guess we'd better cancel Sense of Humor Day too, then.
Re:ENOUGH!!!! (Score:1)
by Jane Hackworth (872492) on Friday April 01, @04:41PM (#12114346)
That...was "insightful"?

Would you F- off with the April Fool's whining already? We Get It! We've figured it out already: you are superior to the rest of us, who are obviously too easily amused.

To be bored with April Fool's Day is to be bored with life.

If you hate Slashdot so much, leave (Score:1, Troll)
by Quattro Vezina (714892) on Friday April 01, @04:46PM (#12114396)
(Last Journal: Monday August 09, @10:05PM)
Dear Zod, it's one fucking day. If you don't like it, what the fuck is so hard about not reading Slashdot for one fucking day?

Just leave already, you're not welcome here.

Asshat.
Re:*THE* Authority for all april fools pranks (Score:1)
by DrinkingIllini (842502) on Friday April 01, @04:48PM (#12114408)
Stop Posting This Shit IN EVERY DAMN ARTICLE!

Thank you.
Re:ENOUGH!!!! (Score:1, Funny)
by Anonymous Coward on Friday April 01, @04:52PM (#12114450)
Relevance=1,Verbosity=6,Religion=On,Profanity=On
Re:enough already, its past noon PST, stop (Score:2)
by Drooling Iguana (61479) on Friday April 01, @04:58PM (#12114515)
Posting Slashdot comments via telegram?
Re:*THE* Authority for all april fools pranks (Score:3, Insightful)
by DJStealth (103231) on Friday April 01, @05:35PM (#12114921)
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 [slashdot.org]