From: Jonathan de Boyne Pollard on
>
>>
>> If an obscure technique is being employed, then a comment to that
>> effect is a helpful pointer but I have seen _REALLY USEFUL_ comments
>> along the following lines ...
>>
>> x := X + 1 ; increment x
>>
>> ... which only serve to increase the noise floor.
>>
> In our shop, those appeared when we got the idiotic edict that each
> line had to have a comment.
>
Such edicts make one want to write code in the form

x /* The variable x */
= /* is assigned */
x /* its value * /
+ /* plus * /
2 /* one */
; /* . */

From: Eric Chomko on
On Mar 16, 12:51 pm, Jonathan de Boyne Pollard <J.deBoynePollard-
newsgro...(a)NTLWorld.COM> wrote:
> >> If an obscure technique is being employed, then a comment to that
> >> effect is a helpful pointer but I have seen _REALLY USEFUL_ comments
> >> along the following lines ...
>
> >> x := X + 1  ; increment x
>
> >> ... which only serve to increase the noise floor.
>
> > In our shop, those appeared when we got the idiotic edict that each
> > line had to have a comment.
>
> Such edicts make one want to write code in the form
>
>      x  /* The variable x */
>      =  /* is assigned */
>      x  /* its value * /
>      +  /* plus * /
>      2  /* one */
>      ;   /* . */

Or,

char *x /* magic pointer */

x--; /* bump the pointer backwards */
From: Kenny McCormack on
In article <IU.D20100316.T165150.P1185.Q0(a)J.de.Boyne.Pollard.localhost>,
Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups(a)NTLWorld.COM> wrote:
>>
>>>
>>> If an obscure technique is being employed, then a comment to that
>>> effect is a helpful pointer but I have seen _REALLY USEFUL_ comments
>>> along the following lines ...
>>>
>>> x := X + 1 ; increment x

A true CLC pedantic would point out that the above does not increment x
(unless x and X have the same value).

>>> ... which only serve to increase the noise floor.
>>>
>> In our shop, those appeared when we got the idiotic edict that each
>> line had to have a comment.
>>
>Such edicts make one want to write code in the form
>
> x /* The variable x */
> = /* is assigned */
> x /* its value * /
> + /* plus * /
> 2 /* two */
> ; /* . */

Correction applied. HTH.

--
(This discussion group is about C, ...)

Wrong. It is only OCCASIONALLY a discussion group
about C; mostly, like most "discussion" groups, it is
off-topic Rorsharch revelations of the childhood
traumas of the participants...

From: ImpalerCore on
On Mar 16, 12:51 pm, Jonathan de Boyne Pollard <J.deBoynePollard-
newsgro...(a)NTLWorld.COM> wrote:
> >> If an obscure technique is being employed, then a comment to that
> >> effect is a helpful pointer but I have seen _REALLY USEFUL_ comments
> >> along the following lines ...
>
> >> x := X + 1  ; increment x
>
> >> ... which only serve to increase the noise floor.
>
> > In our shop, those appeared when we got the idiotic edict that each
> > line had to have a comment.
>
> Such edicts make one want to write code in the form
>
>      x  /* The variable x */
>      =  /* is assigned */
>      x  /* its value * /
>      +  /* plus * /
>      2  /* one */
>      ;   /* . */

It also shows that maintaining these kinds of comment are more trouble
than the comment is worth. The maintenance of these comments is way
higher than the information they give, i.e. Who forgot to change the '/
* one */' to '/* two */'?
From: Andrew Poelstra on
On 2010-03-16, ImpalerCore <jadill33(a)gmail.com> wrote:
> On Mar 16, 12:51�pm, Jonathan de Boyne Pollard <J.deBoynePollard-
> newsgro...(a)NTLWorld.COM> wrote:
>> >> If an obscure technique is being employed, then a comment to that
>> >> effect is a helpful pointer but I have seen _REALLY USEFUL_ comments
>> >> along the following lines ...
>>
>> >> x := X + 1 �; increment x
>>
>> >> ... which only serve to increase the noise floor.
>>
>> > In our shop, those appeared when we got the idiotic edict that each
>> > line had to have a comment.
>>
>> Such edicts make one want to write code in the form
>>
>> � � �x �/* The variable x */
>> � � �= �/* is assigned */
>> � � �x �/* its value * /
>> � � �+ �/* plus * /
>> � � �2 �/* one */
>> � � �; � /* . */
>
> It also shows that maintaining these kinds of comment are more trouble
> than the comment is worth. The maintenance of these comments is way
> higher than the information they give, i.e. Who forgot to change the '/
> * one */' to '/* two */'?

x /* The pointer */
-> /* equals */
x /* itself */
= /* minus */
2 /* five */
; /* :( */


--
Andrew Poelstra
http://www.wpsoftware.net/andrew
 |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11
Prev: System Calls
Next: Warning to newbies