Re: Cargo Cult Membership



In article <pan.2006.07.04.20.56.47.199172@xxxxxxxxxxxxxxx>,
Mark Isaak <eciton_NOSPAM@xxxxxxxxxxxxxxx> wrote:

On Sun, 02 Jul 2006 13:38:56 -0700, rupert.morrish@xxxxxxxxx wrote:

Augray wrote:
On Sat, 1 Jul 2006 22:28:00 -0500, "bullpup" <bullpup@xxxxxxxxxxxxx>
wrote in <f3Hpg.28440$gv2.25415@xxxxxxxxxxxxxxxxxxxxxx> :

http://www.unexplained-mysteries.com/column.php?id=73181

I would suggest that this essay is, well, flawed. For instance, the
writer states that

Cargo Cult thinking is very much alive today, and particularly
susceptible to it are computer programmers.

However, his knowledge of programming seems suspect:

Those who write Cargo cult programs explain their useless code as
a way of working around a certain computer bug, whose origins
they know nothing about. A classic example are programmers who
think that using commenting code is good, and then produce every
line with comments such as "increment i by 1". The result is a
lot of bad, problematic computer coding that can screw up a lot
of things.

However, commenting code has no influence on the final program. The
comments are there to explain your programming rationale to yourself,
or any other programmer, five years from now when the code has to be
modified or debugged.

No, the author is correct. Useless comments, like:

// increment i by one
i++;

are a /symptom/ of cargo cult programming.

I think the worst example I saw was:

#define TWO 2

most likely from someone who had been told never to hard-code constants.

Followed by an update

#define TWO 3

--
"The power of the Executive to cast a man into prison without formulating any
charge known to the law, and particularly to deny him the judgement of his
peers, is in the highest degree odious and is the foundation of all totali-
tarian government whether Nazi or Communist." -- W. Churchill, Nov 21, 1943

.



Relevant Pages

  • Re: Revisiting an old friend: Set oRS = Nothing
    ... > Yet bugs have been documented that have been corrected by explicitly ... metaphor: "defensive programming". ... recent discovery of the cargo cult metaphor. ...
    (microsoft.public.inetserver.asp.general)
  • Re: Cargo Cult Membership
    ... his knowledge of programming seems suspect: ... Those who write Cargo cult programs explain their useless code as ... line with comments such as "increment i by 1". ... MSDN and including it in your program. ...
    (talk.origins)
  • Re: Cargo Cult Membership
    ... his knowledge of programming seems suspect: ... Those who write Cargo cult programs explain their useless code as ... line with comments such as "increment i by 1". ... commenting code has no influence on the final program. ...
    (talk.origins)
  • Re: Cargo Cult Membership
    ... his knowledge of programming seems suspect: ... Those who write Cargo cult programs explain their useless code as ... commenting code has no influence on the final program. ... "Voice or no voice, the people can always be brought to the bidding of ...
    (talk.origins)
  • Re: OT: The REAL RIddle of DO LOOPS Solved
    ... No I did actually mean increment until the value reaches it's maximum ... whether the STEP is +1 or -1, without requiring the explicit ... I also stand by the more basic principle that programming languages are ... The program would have required modification to ...
    (sci.stat.math)

Loading