Cargo cult programming

From HandWiki
Revision as of 09:33, 2 February 2024 by MainEditor (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Ritual inclusion of computer code that serve no purpose


Cargo cult programming is a style of computer programming characterized by the ritual inclusion of code or program structures that serve no real purpose. Cargo cult programming is symptomatic of a programmer not understanding either a bug they were attempting to solve or the apparent solution (compare shotgun debugging, deep magic).[1] The term cargo cult programmer may apply when anyone inexperienced with the problem at hand copies some program code from one place to another with little understanding of how it works or whether it is required.

Cargo cult programming can also refer to the practice of applying a design pattern or coding style blindly without understanding the reasons behind that design principle. Some examples are adding unnecessary comments to self-explanatory code, overzealous adherence to the conventions of a programming paradigm, or adding deletion code for objects that garbage collection automatically collects.

Origin

Main page: Religion:Cargo cult
John Frum cross on Tanna Island, Vanuatu

Cargo cults are millenarian movements that arose in the South Pacific under colonial rule, mainly in Melanesia, and became a subject of study in the mid-20th century. The practices of these movements at times included rituals that adopted the symbols and practices of the colonizers to bring "cargo" — material, spiritual or political fulfillment. As awareness of cargo cults spread in the West, they became a metaphor for empty promises and rituals, used most prominently by physicist Richard Feynman.[2][3] The term "cargo-cult programming" appeared in version 2.5.1 of the Jargon File, a glossary of computing slang, released in January 1991. The term "cargo cult" in anthropology, meanwhile, is increasingly avoided for failing to represent the complexity of Melanesian beliefs.[2][3]

Cargo cult software engineering

A related term to cargo cult programming in software engineering is cargo cult software engineering, coined by Steve McConnell.[4]:23-26

McConnell describes software development organizations that attempt to emulate more successful development houses, either by slavishly following a software development process without understanding the reasoning behind it, or by attempting to emulate a commitment-oriented development approach (in which software developers devote large amounts of time and energy toward seeing their projects succeed) by mandating the long hours and unpaid overtime, while in successful companies these might instead be consequences of high motivation instead of causes of success.

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 "imposter organizations" (which merely imitate the form of successful software development organizations) are in fact engaging in what he calls cargo cult software engineering.[5]:11-13

See also

References

  1. Raymond, Eric S. (1996-10-11). The New Hacker's Dictionary (Third ed.). MIT Press. ISBN 978-0262680929. OCLC 42329393. 
  2. 2.0 2.1 Lindstrom, Lamont (2018). "Cargo cults". The Open Encyclopedia of Anthropology. https://www.anthroencyclopedia.com/entry/cargo-cults. Retrieved 2024-01-17. 
  3. 3.0 3.1 Jarvis, Brooke (2019). "Who Is John Frum?". https://www.topic.com/who-is-john-frum. 
  4. McConnell, Steve (2003). Professional Software Development. Addison-Wesley. pp. 23-26. ISBN 978-0-321-19367-4. https://archive.org/details/professionalsoft00mcco_0. 
  5. McConnell, Steve (March–April 2000). "Cargo Cult Software Engineering". IEEE Software: 11–13. ISSN 0740-7459. https://stevemcconnell.com/wp-content/uploads/2017/08/CargoCultSoftwareEngineering.pdf. Retrieved 2023-05-05. 

Further reading