Cargo cult programming

Last updated

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.

Contents

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.

Etymology

John Frum cross on Tanna Island, Vanuatu JohnFrumCrossTanna1967.jpg
John Frum cross on Tanna Island, Vanuatu

Cargo cults 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. [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

Related Research Articles

<span class="mw-page-title-main">Computing</span> Activity involving calculations or computing machinery

Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both hardware and software. Computing has scientific, engineering, mathematical, technological, and social aspects. Major computing disciplines include computer engineering, computer science, cybersecurity, data science, information systems, information technology, and software engineering.

Software engineering is an engineering approach to software development. A practitioner, called a software engineer, applies the engineering design process to develop software.

In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer.

The waterfall model is a breakdown of development activities into linear sequential phases, meaning they are passed down onto each other, where each phase depends on the deliverables of the previous one and corresponds to a specialization of tasks. The approach is typical for certain areas of engineering design. In software development, it tends to be among the less iterative and flexible approaches, as progress flows in largely one direction through the phases of conception, initiation, analysis, design, construction, testing, deployment and maintenance. The waterfall model is the earliest SDLC approach that was used in software development.

A software bug is a bug in computer software.

Steven C. McConnell is an author of software engineering textbooks such as Code Complete, Rapid Development, and Software Estimation. He is cited as an expert in software engineering and project management.

<span class="mw-page-title-main">Cargo cult</span> New religious movement

Cargo cults were diverse spiritual and political movements that arose among indigenous Melanesians following Western colonisation of the region in the late 19th century. Features common to most cargo cult groups include the presence of charismatic prophet figures foretelling an imminent cataclysm and/or a coming utopia for followers—a worldview known as millenarianism. Claims made by these prophets varied greatly from movement to movement, with some predicting the return of the dead or an abundance of food. The movements usually sought to appease "ancestral spirits or other powerful beings" by either reviving ancestral traditions or adopting new rituals, such as ecstatic dancing or imitating the actions of colonists and military personnel. Most groups foretold the coming of a bounty of Western goods or money as part of their prophecy, although this was not a universal feature of such movements, with other prophets telling their followers to abandon Western goods. Anthropologists have described cargo cults as rooted in pre-existing aspects of Melanesian society, as a reaction to colonial oppression and inequality disrupting traditional village life, or both.

In software engineering, a design pattern describes a relatively small, well-defined aspect of a computer program in terms of how to write the code.

An anti-pattern in software engineering, project management, and business processes is a common response to a recurring problem that is usually ineffective and risks being highly counterproductive. The term, coined in 1995 by computer programmer Andrew Koenig, was inspired by the book Design Patterns and first published in his article in the Journal of Object-Oriented Programming. A further paper in 1996 presented by Michael Ackroyd at the Object World West Conference also documented anti-patterns.

<span class="mw-page-title-main">Open-source software</span> Software licensed to ensure source code usage rights

Open-source software (OSS) is computer software that is released under a license in which the copyright holder grants users the rights to use, study, change, and distribute the software and its source code to anyone and for any purpose. Open-source software may be developed in a collaborative, public manner. Open-source software is a prominent example of open collaboration, meaning any capable user is able to participate online in development, making the number of possible contributors indefinite. The ability to examine the code facilitates public trust in the software.

"No Silver Bullet—Essence and Accident in Software Engineering" is a widely discussed paper on software engineering written by Turing Award winner Fred Brooks in 1986. Brooks argues that "there is no single development, in either technology or management technique, which by itself promises even one order of magnitude [tenfold] improvement within a decade in productivity, in reliability, in simplicity." He also states that "we cannot expect ever to see two-fold gains every two years" in software development, as there is in hardware development.

The following outline is provided as an overview of and topical guide to software engineering:

<span class="mw-page-title-main">History of software engineering</span>

The history of software engineering begins around the 1960s. Writing software has evolved into a profession concerned with how best to maximize the quality of software and of how to create it. Quality can refer to how maintainable software is, to its stability, speed, usability, testability, readability, size, cost, security, and number of flaws or "bugs", as well as to less measurable qualities like elegance, conciseness, and customer satisfaction, among many other attributes. How best to create high quality software is a separate and controversial problem covering software design principles, so-called "best practices" for writing code, as well as broader management issues such as optimal team size, process, how best to deliver software on time and as quickly as possible, work-place "culture", hiring practices, and so forth. All this falls under the broad rubric of software engineering.

In software development, code reuse, also called software reuse, is the use of existing software, or software knowledge, to build new software, following the reusability principles.

The Software Peter principle is used in software engineering to describe a dying project which has become too complex to be understood even by its own developers.

A cargo cult is a type of a ritualistic belief system.

Coding best practices or programming best practices are a set of informal, sometimes personal, rules that many software developers, in computer programming follow to improve software quality. Many computer programs require being robust and reliable for long periods of time, so any rules need to facilitate both initial development and subsequent maintenance of source code by people other than the original authors.

The open-source-software movement is a social movement that supports the use of open-source licenses for some or all software, as part of the broader notion of open collaboration. The open-source movement was started to spread the concept/idea of open-source software.

Software construction is a software engineering discipline. It is the detailed creation of working meaningful software through a combination of coding, verification, unit testing, integration testing, and debugging. It is linked to all the other software engineering disciplines, most strongly to software design and software testing.

<span class="mw-page-title-main">Open source</span> Source code made freely available

Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open source model is a decentralized software development model that encourages open collaboration. A main principle of open source software development is peer production, with products such as source code, blueprints, and documentation freely available to the public. The open source movement in software began as a response to the limitations of proprietary code. The model is used for projects such as in open source appropriate technology, and open source drug discovery.

References

  1. Raymond, Eric S. (11 October 1996). The New Hacker's Dictionary (Third ed.). MIT Press. ISBN   978-0262680929. OCLC   42329393. OL   9828647M.
  2. Lindstrom, Lamont (2018). "Cargo cults". The Open Encyclopedia of Anthropology. Retrieved 2024-01-17.
  3. Jarvis, Brooke (2019). "Who Is John Frum?". Topic. Archived from the original on 2019-04-18.
  4. McConnell, Steve (2003). Professional Software Development . Addison-Wesley. pp.  23-26. ISBN   978-0-321-19367-4 via Internet Archive.
  5. McConnell, Steve (March–April 2000). "Cargo Cult Software Engineering" (PDF). IEEE Software : 11–13. eISSN   1937-4194. ISSN   0740-7459 . Retrieved 5 May 2023.

Further reading