Skip to content
slang.fyi

cargo cult programming

/ˈkɑːrɡoʊ kʌlt ˈproʊɡræmɪŋ/

Common

Copy-pasting code or patterns you don't understand because they worked somewhere else.

Not the same as learning by example. The key is the lack of understanding. Someone doing cargo cult programming can't explain why the code is there or what would happen if it were removed.

Real-world examples4 examples
#ExampleWhat it meansSource
01nobody on the team can explain why we have three different logging libraries. cargo cult programming from three different devs who all copied their old jobs.Dependencies accumulated because each developer imported familiar tools without evaluating them.x, 2024
02asked why we use this config and got 'idk it was like that when i joined'. cargo cult programming lives.Nobody added the config intentionally. It was inherited and never questioned.reddit, 2023
03just copy pasting stack overflow without reading it first is cargo cult programming and it will bite you.Blindly applying code without understanding it leads to hidden bugs.reddit, 2024
04i added that useEffect because react tutorials always have one. deleted it and everything still works. cargo cult.A hook was added out of habit rather than necessity.x, 2023

Use it when

  • A developer copies code from Stack Overflow without understanding what it does.
  • A codebase has patterns or dependencies nobody can explain.
  • Someone adds boilerplate 'because every project has it' without knowing why.
  • A fix was applied because it worked in a different context, not because it addresses the actual problem.

Do not use it when

  • Someone is learning by reading and adapting existing code with understanding.
  • You mean copying code without attribution.

Cargo cult programming vs not-invented-here

cargo cult programming

Cargo cult programming is blindly copying external patterns without understanding them.

VS

not-invented-here

Not-invented-here is refusing to use external solutions and insisting on building everything in-house.

Origin and context

Named after cargo cults, where Pacific Island societies mimicked Western rituals after WWII hoping to attract goods. Applied to programming by Steve McConnell in his book Code Complete and popularized in software circles through blogs and the pragmatic programmer community.

First seen
1990s
Confidence
high

Cite this page

Use this stable URL to reference the entry.

https://slang.fyi/cargo-cult-programming
Updated: 2026-08-29License: CC BY 4.0

Related slang