Jump to content

Talk:Cargo cult programming

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 184.20.10.253 (talk) at 16:30, 26 November 2020 (remove ref on talk page). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconComputer science Start‑class Low‑importance
WikiProject iconThis article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StartThis article has been rated as Start-class on Wikipedia's content assessment scale.
LowThis article has been rated as Low-importance on the project's importance scale.
Things you can help WikiProject Computer science with:

WikiProject iconComputing: Software / CompSci Start‑class Low‑importance
WikiProject iconThis article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StartThis article has been rated as Start-class on Wikipedia's content assessment scale.
LowThis article has been rated as Low-importance on the project's importance scale.
Taskforce icon
This article is supported by WikiProject Software (assessed as Low-importance).
Taskforce icon
This article is supported by WikiProject Computer science (assessed as Low-importance).
Things you can help WikiProject Computer science with:

Find sources: Google (books · news · scholar · free images · WP refs· FENS · JSTOR · TWL

I'm linking to a PDF version of Feynman's address, which is also linked from Cargo_cult_science

This lead me to a couple of questions:

Jodi.a.schneider 22:20, 20 June 2007 (UTC)[reply]

Copyvio or not?

The page contained the following text:

== Alert, possible copyright violation ==
see http://www.tuxedo.org/~esr/jargon/html/entry/cargo-cult-programming.html

I really can't tell right away what the licensing is on the other site.

I removed it, since clicking a few times 'up' brings one to http://www.tuxedo.org/~esr/jargon/html/index.html which says:

"This document (the Jargon File) is in the public domain, to be freely used, shared, and modified. There are (by intention) no legal restraints on what you can do with it, but there are traditions about its proper use to which many hackers are quite strongly attached. Please extend the courtesy of proper citation when you quote the File, ideally with a version number, as it will change and grow over time."

Seems quite clear to me. --Andre Engels

More specifically - http://www.tuxedo.org/~esr/jargon/quoting.html. --Khendon


Merged from Cargo cult

The following was added to cargo cult and then deleted by User:Wesley - someone might want to merge/replace this article with this text:

"A related term is cargo cult programming, which involves an unskilled or novice computer programmer copying some program code from one place and pasting it into another place, with little or no understanding of how the code works or how to properly adapt it to its new desired function. It is as if the code just fell out of the sky and is expected to do wonderful things, but without any understanding of how to make it work well. With the increasing popularity of the internet, this has become especially popular with JavaScript scripts and CGI scripts."

Reference to World War II

According to the Wikipedia entry for "Cargo Cult", the aboriginal practice began in the late 19th century. TPOBrien 01:04, 31 December 2006 (UTC)[reply]

Issues with the line about null/empty checks

"Obsessive and redundant checks for null values or testing whether a collection is empty before iterating its values may be a sign of cargo cult programming. Such obsessive checks make the code less readable, and often prevent the output of proper error messages, obscuring the real cause of a misbehaving program." I think this needs to be elaborated upon. It can occur that a programmer is checking for things that don't need to be checked. This can be considered cargo-cult programming because it is a result of the programmers ignorance. For example if you are checking for an empty collection before iterating over it that might be unnecessary because with most loop/iteration constructs the platform generally skips over empty collections. But with, say, a repeat-until construct that is not the case and this check would be necessary. A lot of null-checking can just be the practice of 'defensive programming'. Or it might be bad practice because a framework already guarantees injection of a non-null value. Or it can be a situation where a nullpointerexception is just as informative as the information a null-check would give you, so null-checking is redundant. So it's really an 'it depends' thing and not an absolute thing. Words like 'obsessive' and 'might' already indicate this but I think it needs to be more explicit or else you risk developers calling proper defensive code out as 'cargo-cult programming' and that's not desirable. The simpler solution would be to just delete this sentence. I'm not doing that myself because I'm just a newbie here and I want to respect the contributors. [1] Timwaagh (talk) 00:29, 8 June 2020 (UTC)[reply]

Where are the examples?

This kind of article is incomplete without any examples?! --184.20.10.253 (talk) 16:28, 26 November 2020 (UTC)[reply]