Share on Facebook Share on Twitter Email
Answers.com

Cargo cult programming

 
Hacker Slang: cargo cult programming
 

A style of (incompetent) programming dominated by ritual inclusion of code or program structures that serve no real purpose. A cargo cult programmer will usually explain the extra code as a way of working around some bug encountered in the past, but usually neither the bug nor the reason the code apparently avoided the bug was ever fully understood (compare shotgun debugging, voodoo programming).

The term ‘cargo cult’ is a reference to aboriginal religions that grew up in the South Pacific after World War II. The practices of these cults center on building elaborate mockups of airplanes and military style landing strips in the hope of bringing the return of the god-like airplanes that brought such marvelous cargo during the war. Hackish usage probably derives from Richard Feynman's characterization of certain practices as “cargo cult science” in his book Surely You're Joking, Mr. Feynman! (W. W. Norton & Co, New York 1985, ISBN 0-393-01921-7).


Search unanswered questions...
Enter a word or phrase...
All Community Q&A Reference topics
Wikipedia: Cargo cult programming
 

Cargo cult programming is a style of computer programming that is characterized by the ritual inclusion of code or program structures that serve no real purpose. Cargo cult programming is typically symptomatic of a programmer not understanding either a bug he was attempting to solve or the apparent solution (compare shotgun debugging, voodoo programming).[1] The term may also apply when an unskilled or novice computer programmer (or one not experienced with the problem at hand) copies some program code from one place and pastes it into another place, with little or no understanding of how the code works, or if it is required in its new position.

Contents

Overview

Cargo cult programming can also refer to the results of (over-)applying a design pattern or coding style blindly without understanding the reasons behind that design principle in the first place. Examples are adding unnecessary comments to self-explanatory code, adding deletion code for objects that garbage collection would have collected automatically with no problem, creating factory objects to build simple objects, etc. It often happens when programmers are inexperienced with the programming language, or simply overzealous.

The term "cargo cult", as an idiom, originally referred to aboriginal religions which grew up in the South Pacific after World War II. The practices of these groups centered on building elaborate mock-ups of airplanes and military landing strips in the hope of summoning the god-like airplanes that had brought marvelous cargo during the war.[2][3] Use of the term in computer programming probably derives from Richard Feynman's characterization of certain practices as "cargo cult science".[3][4]

Cargo cult software engineering

A related term in software engineering is cargo cult software engineering, coined by Steve McConnell.

McConnell describes software development organizations that attempt to emulate more successful development houses, either by slavishly following a software development process, or by taking a commitment oriented development approach.

In both cases, McConnell contends that competence ultimately determines whether a project succeeds or fails, regardless of the development approach taken; furthermore, he claims that incompetent "impostor organizations", that merely imitate the form of successful software development organizations are, in fact, engaging, in what he calls Cargo cult software engineering.[3]

See also

References

  1. ^ Eric S. Raymond (1996). The New Hacker's Dictionary. MIT Press. ISBN 0262680920. 
  2. ^ Dr. Nikolai Bezroukov. "Cargo Cult Programming article". Softpanorama (slightly skeptical) Open Source Software Education Society. http://www.softpanorama.org/Skeptics/cargo_cult_programming.shtml. Retrieved on 2008-03-25. 
  3. ^ a b c From the Editor (March/April 2000). "Cargo Cult Software Engineering". IEEE Software. http://stevemcconnell.com/ieeesoftware/eic10.htm. Retrieved on 2008-05-24. 
  4. ^ "Definition of cargo cult programming". Jargon File at jargon.net. http://www.jargon.net/jargonfile/c/cargocultprogramming.html. Retrieved on 2008-03-25. 

This article is based in part on the Jargon File, which is in the public domain.

Further reading

  • Surely You're Joking, Mr. Feynman!, Richard Feynman, W. W. Norton & Co, New York, 1985, ISBN 0-393-01921-7. One of the chapters is the transcript of a 1974 Caltech commencement address, which contained the coining of "Cargo cult science".
  • Cargo Cult Science, by Richard P. Feynman. Article based on his 1974 Caltech Commencement address, with pictures, as originally published in Engineering and Science, Volume 37:7, June 1974. Digitized version from Caltech Library, retrieved June 20, 2007

 
 

 

Copyrights:

Hacker Slang. The Jargon File. Copyright © 2007.  Read more
Wikipedia. This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Cargo cult programming" Read more