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 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

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.

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 an umbrella term to denote various spiritual and political movements that arose among indigenous Melanesians during the early-mid 20th century. The definition of cargo cult is vague, having been used for "almost any sort of organised, village-based social movement with religious and political aspirations" and "a variety of forms of social unrest that ethnographers elsewhere tagged millenarian, messianic, nativistic, vitalistic, revivalistic, or culture-contact or adjustment movements". "Cargo cults" were often organised around a central charismatic prophet, who either pushed for the revival of ancestral traditions or the adoption of new traditions in order to appease ancestral spirits. Although many accounts focus on the acquisition of Western material goods, the definition of "cargo" was broader than this, with many such movements focused on spiritual salvation, or were political expressions of a desire for autonomy. Many scholars see the movements as a reaction to the disruption to traditional ways of life caused by the colonisation of Melanesia during the late 19th century by Western powers and the resulting oppression and discrimination, as well as the contact between traditional gift giving and colonial capitalist economies.

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.

Rapid application development (RAD), also called rapid application building (RAB), is both a general term for adaptive software development approaches, and the name for James Martin's method of rapid development. In general, RAD approaches to software development put less emphasis on planning and more emphasis on an adaptive process. Prototypes are often used in addition to or sometimes even instead of design specifications.

<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.

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

<i>Code Complete</i> 1993 book by Steve McConnell

Code Complete is a software development book, written by Steve McConnell and published in 1993 by Microsoft Press, encouraging developers to continue past code-and-fix programming and the big design up front and waterfall models. It is also a compendium of software construction techniques, which include techniques from naming variables to deciding when to write a subroutine.

<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.

In the context of software engineering, software quality refers to two related but distinct notions:

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.

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.

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.

Application performance engineering is a method to develop and test application performance in various settings, including mobile computing, the cloud, and conventional information technology (IT).

<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. 1 2 Lindstrom, Lamont (2018). "Cargo cults". The Open Encyclopedia of Anthropology. Retrieved 2024-01-17.
  3. 1 2 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