Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

WTF no comments

Name: Anonymous 2008-01-15 22:42

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: Anonymous 2008-01-15 22:51

Thats expert programmer code.

Name: Anonymous 2008-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: Anonymous 2008-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.)

Name: Anonymous 2008-01-16 7:40

        /: : /: :.|     /: : : : : :/: : : : : : : : : : : \: : : :\
.        /: : /: : : !   /: : : : : : :/: : : :/: : : : : : : : : : ヽ: :ヽ: \
.         ,': : : : : : : i:  /: : : : : : :/:l: : : :|: : : : : : :\: : : : : : :l: :ド:ヽ
       i: : : : : : : :i / : : : : : : ,': :|: : : :|: : :l: :ヽ: : : ヽ : : l : |: :|  l|
       |: : : : : : : :∨ : : : : : : :ハ: :|: : : :|: : :| : ハ : :|_\:l : |: :l  ||
       |: : : : : : : : | : : : : : : : |: l: |: : : :|: : :|: :| | ;.イ∨从:∧/  リ
       |: : : : : : : : | : : : : : : : |: l: |: : : :|: : :|:八 j/Vィて㍉/ : !    Won't you believe it's just my luck~
.        i: : : : : : : :.| : : : : : : : l: :斗七:丁厂⌒`  fト::゚リ イ: : :|
       l: : : : : : : :l : : : : : : : | ∨ィチてヾ     ゞ='^ | : : |
.        l : : : : : : : i:.: : : : : : :|Y圦iド:;イリ     、   } : : |
         l: : : : : : : : : : : : : : : :Vヾゞ辷ン^      〉  /: : : |
        | : : : : : : : : ':, : : : : : : .            __   ′: : :|
       ハ: : : : : : : :.い : : : : : : '. 、    < _/ イ: :l: : : :|
       l : '.: : : : : : : l:ハ : : : : : : ∨> 、_   /::∧: :l : : :|
       |: : l : : : : : : /: ∧ : : : : : : '.     丁ヽ::::/::∧ l: : :.|
       |: : | : : : : : /: /::∧ : : : : : : :    { 八::::/::∧:l: :│
        /: : :l : : : : //:::/::∧: : : : : : ∨   ∨ 《Ⅸ:::/:∧: :│
.       /: : :/| : : : /ノ :::::::::/::∧: : : : :l: |-─__》 V::/::∧ │
     /: : :/│: : 〃::\::::::::/::::|: : : : :l: |:\{{二¨7__V:::::::::ヽ |
    ./: : /  j: : /::::::::::::丶 ::::::::|: : : : :l: |  \ {{ ̄ }}ヘ、_::::::::\

Name: Anonymous 2008-01-16 8:35

>>4
l2program

Name: Anonymous 2008-01-16 8:37

>>4
Comments shouldn't explain what code does, they should explain why it does it. The "what" should be obvious.

Name: Anonymous 2008-01-16 8:49

>>7
The "why" is not distinct from the "what".

Name: Anonymous 2008-01-16 9:01

>>8
what:

i++; /* increment i by 1 */
p[i] = 0; /* set p[i] to zero */


why:

/* set that to zero because the `FOO' protocol requires exactly
   `N' characters */
i++;
p[i] = 0;


I hope you see the difference.

Name: Anonymous 2008-01-16 9:08

Name: Anonymous 2008-01-16 9:18

>>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: Anonymous 2008-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.

Name: Anonymous 2008-01-16 9:24

Documenting code is for enterprise faggots. RTFRFC.

Name: Anonymous 2008-01-16 9:25

lol >>12 posted an ascii penus lol

Name: Anonymous 2008-01-16 9:59

>>14
It is called bottom and the correct symbol is ⊥.

Name: Anonymous 2008-01-16 11:02

>>15
DON'T HELP HIM

Name: Anonymous 2008-01-16 11:12

So, I vaguely remember the ``_|_'' from Haskell. What is this mysterious entity?

Name: Anonymous 2008-01-16 11:38

>>17
It is called buttcrack and the correct symbol is (_|_).

Name: Anonymous 2008-01-16 11:48

>>18
Nay.

Name: Anonymous 2008-01-16 12:21

>>17
It should give you nightmares.

Name: Anonymous 2008-01-16 16:34

The rule is comment why - not what.

Name: Anonymous 2008-01-16 16:43

>>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.

Name: Anonymous 2008-01-16 16:44

>>22
So you're just a lazy faggot.

Name: Anonymous 2008-01-16 17:46

>>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: Anonymous 2008-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?

Name: Anonymous 2008-01-16 18:04

>>25
documentation.

Name: Anonymous 2008-01-16 19:08

>>22
Learn some ctags, my good sir.

Name: Anonymous 2008-01-16 22:05

>>26
There is none.

Name: Anonymous 2008-01-17 0:14

>>28
I see what you did there.

Name: Anonymous 2009-02-25 6:57


The only thing I   think probably in.

Name: Anonymous 2011-02-04 19:31


Don't change these.
Name: Email:
Entire Thread Thread List