So, I'm reading some source code from Plan 9, and I just realized that it's nearly uncommented. I expected a little more from Rob Pike.
Name:
Anonymous2008-01-15 22:51
Thats expert programmer code.
Name:
Anonymous2008-01-15 23:07
Did anyone remember Call to Power II? It was a sequel to a mediocre Civ III clone, but it was alright. After a LONG time, all of it got open-sourced by Activision, and guess what they fucking did?
Took out ALL the comments. They replaced them with whitespace, so now the files are all fucked up. If you google for it, you'll find it and see what I mean. Its annoying as fuck.
Name:
Anonymous2008-01-16 7:20
Some code doesn't need to be commented. Explaining what well-written code does is like the classic example of overcommenting, "i++; /* increment i by 1 */".
(I don't believe that Activision would have that sort of code though. Game programmers generally aren't on the level of the Plan 9 guys.)
>>3
They probably had tons of "inappropriate for the general public" comments and took the "fuck this, just wipe them all" approach.
What total rubbish, though. Way to make a useless contribution to the community.
Name:
Anonymous2008-01-16 9:18
>>9
Your example is horrible, because in the second part you explain the "what" along with the "why".
Also, explicit null-termination is a very common thing to do when handling strings in C, and therefore hardly merits a mention; the reader can just assume that it is being done for a reason (i.e. because the FOO protocol requires it) and shut up about it. I would further argue that any misunderstandings caused by this are the smaller pain in the _|_ than the maintenance load imposed by verbose commenting.
>>21
Sometimes some "what" is nice. Like the first time I see switch(alt(alts)) {..., I really don't want to track down its definition (in some other file) and figure out its intended purpose.
>>22
use multiple monitors. my computers have 3 monitors each. the first is for the code, the second is for documentation and the third for misc.
Name:
Anonymous2008-01-16 17:48
>>23
You could say the same about most faggots (programmers). At least I'm not a stupid faggot that actually wants to go about every tast in the most difficult possible way.
>>24
How would a second or third monitor help in this situation?