Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Cargo cult programming
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Ritual inclusion of computer code that serves 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]], [[magic (programming)|deep magic]]).{{r|Raymond_1996}} The term ''cargo cult programmer'' may apply when anyone inexperienced with the problem at hand [[copy and paste programming|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 [[software design pattern|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 (computer science)|garbage collection]] automatically collects. ==Etymology== {{main|Cargo cult}} [[File:JohnFrumCrossTanna1967.jpg|thumb|[[John Frum]] cross on [[Tanna Island]], Vanuatu]] [[Cargo cult]]s are [[millenarian]] movements that arose in [[Melanesia]] under colonial rule, and inspired [[Richard Feynman]] to coin the expression [[cargo cult science]]. In Feynman's description, after the end of the Second World War practitioners believed that air delivery of cargo would resume if they carried out the proper rituals, such as building runways, lighting fires next to them, and wearing headphones carved from wood while sitting in fabricated control towers. "The form is perfect. It looks exactly the way it looked before. But it doesn’t work." The term then became used more widely as a metaphor for empty rituals. 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.<ref>{{Cite encyclopedia |year=2018 |title=Cargo cults |encyclopedia=The Open Encyclopedia of Anthropology |url=https://www.anthroencyclopedia.com/entry/cargo-cults |access-date=2024-01-17 |last=Lindstrom |first=Lamont}}</ref><ref name="jarvis">{{Cite web |last=Jarvis |first=Brooke |date=2019 |title=Who Is John Frum? |url=https://www.topic.com/who-is-john-frum |url-status=live |archive-url=https://web.archive.org/web/20190418154125/https://www.topic.com/who-is-john-frum |archive-date=2019-04-18 |website=Topic}}</ref> ==Cargo cult software engineering== A related term to cargo cult programming in [[software engineering]] is ''cargo cult software engineering'', coined by [[Steve McConnell]].{{r|McConnell_2003|pages=[https://archive.org/details/professionalsoft00mcco_0/page/23 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''.{{r|mcconnell|pages=11-13}} ==See also== *[[Black box]] *[[Cargo cult science]] *[[Copy-and-paste programming]] *[[GitHub Copilot]] *[[Magic (programming)]] *[[Magical thinking]] *[[Vibe coding]] ==References== {{reflist|refs= <ref name="Raymond_1996">{{Cite book |last=Raymond |first=Eric S. |author-link=Eric S. Raymond |title=The New Hacker's Dictionary |date=1996-10-11 |publisher=[[MIT Press]] |isbn=978-0262680929 |edition=Third |oclc=42329393 |ol=OL9828647M |df=dmy-all}}</ref> <ref name="mcconnell">{{Cite journal |last=McConnell |first=Steve |author-link=Steve McConnell |date=March–April 2000 |title=Cargo Cult Software Engineering |url=https://stevemcconnell.com/wp-content/uploads/2017/08/CargoCultSoftwareEngineering.pdf |journal=[[IEEE Software]] |pages=11–13 |issn=0740-7459 |eissn=1937-4194 |access-date=2023-05-05 |df=dmy-all}}</ref> <ref name="McConnell_2003">{{Cite book |last=McConnell |first=Steve |author-link=Steve McConnell |url=https://archive.org/details/professionalsoft00mcco_0 |title=Professional Software Development |date=2003 |publisher=[[Addison-Wesley]] |isbn=978-0-321-19367-4 |pages=[https://archive.org/details/professionalsoft00mcco_0/page/23 23-26] |url-access=registration |via=[[Internet Archive]] |df=dmy-all}}</ref> }} ==Further reading== {{refbegin}} *{{Cite book |last=Feynman |first=Richard P. |author-link=Richard Feynman |url=https://archive.org/details/surelyyourejokin0000feyn |title="Surely You're Joking, Mr. Feynman": Adventures of a Curious Character |last2=Leighton |first2=Ralph |author-link2=Ralph Leighton |date=1984 |publisher=[[W. W. Norton & Company]] |isbn=978-0393019216 |edition=First |publication-place=New York |pages=338–346 |language=en |chapter=Cargo Cult Science |lccn=84014703 |oclc=10925248 |ol=OL2852326M |access-date=2023-05-02 |chapter-url=https://archive.org/details/surelyyourejokin0000feyn/page/338 |url-access=registration |via=[[Internet Archive]] |df=dmy-all |chapter-url-access=registration}} *{{Cite journal |last=Feynman |first=Richard P. |author-link=Richard Feynman |date=June 1974 |title=Cargo Cult Science |url=http://calteches.library.caltech.edu/51/2/CargoCult.pdf |journal=Engineering and Science |language=en |volume=37 |issue=7 |pages=10–13 |issn=2475-9570 |access-date=2023-05-02 |via=[[California Institute of Technology]] |df=dmy-all}} {{refend}} {{DEFAULTSORT:Cargo Cult Programming}} [[Category:Computer programming folklore]] [[Category:Software engineering folklore]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite book
(
edit
)
Template:Cite encyclopedia
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:Main
(
edit
)
Template:R
(
edit
)
Template:Refbegin
(
edit
)
Template:Refend
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)