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.

Origin

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.

Computer programming or coding is the composition of sequences of instructions, called programs, that computers can follow to perform tasks. It involves designing and implementing algorithms, step-by-step specifications of procedures, by writing code in one or more programming languages. Programmers typically use high-level programming languages that are more easily intelligible to humans than machine code, which is directly executed by the central processing unit. Proficient programming usually requires expertise in several different subjects, including knowledge of the application domain, details of programming languages and generic code libraries, specialized algorithms, and formal logic.

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

In computing, source code, or simply code or source, is text that conforms to a human-readable programming language and specifies the behavior of a computer. A programmer writes code to produce a program that runs on 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 cult is a term used to denote various spiritual and political movements that arose among indigenous Melanesians following Western colonisation of the region in the late 19th century. The stereotypical cargo cults were movements of Melanesian villagers revolving around a charismatic prophet figure who sought to induce "ancestral spirits or other powerful beings" to provide them with "cargo" through either reviving ancestral traditions or adopting new rituals, such as ecstatic dancing or imitating the actions of colonists. These prophets also often foretold a cataclysm and/or coming great change in society. Although anthropologists have described a number of movements where the desired "cargo" was Western material goods, which were conceived by the villagers as being produced by ancestral spirits, the term "cargo cult" has been used by anthropologists to "label almost any sort of organised, village-based social movement with religious and political aspirations", where "cargo" could also refer to spiritual salvation, or proto-nationalistic desire for independence from colonial authorities. Anthropologists see cargo cults as rooted in pre-existing aspects of Melanesian society, such as their focus on material wealth, as well as a reaction to colonial oppression and inequality disrupting traditional village life.

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 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> Practice of freely allowing access and modification of source code

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