Skip to main content
Thanks for visiting — take a look around, or let us know what you think.servicesblogget in touchRegister on Mostutor — first 1,000 get 3 months free
GCSE & A-Level Computer Science

Bug Hunting: Famous Coding Errors That Cost Millions

Sudershan SoniBy Sudershan Soni 28 July 2026 7 min read

A single missing punctuation mark destroyed a rocket worth millions of dollars, seconds after launch. A rounding error nearly crashed a stock exchange's opening. The most expensive bugs in software history are almost never dramatic, complicated mistakes — they're tiny, easily-overlooked ones that happened to sit in exactly the wrong place.

GCSE core

Mariner 1: the punctuation mark that cost a rocket

In 1962, NASA's Mariner 1 probe was destroyed by ground control less than five minutes after launch, after its guidance software began issuing wildly incorrect steering commands. The root cause traced back to a single missing character in a hand-transcribed guidance equation — a smoothing formula that was supposed to average out small sensor variations instead treated every tiny fluctuation as a real, urgent course correction, sending the rocket off its intended path.

DO 5 I = 1.10intended: DO 5 I = 1,10 (a loop) — one typo (. instead of ,)DO5I = 1.10read as: create a variable and assign it 1.10 — no loop at all

One missing character changed a smoothing formula into something that read every small sensor fluctuation as a real steering command — a tiny difference with a catastrophic result.

Why small bugs cause the biggest disasters

A large, obvious bug tends to get caught quickly — the program crashes immediately, or produces an obviously wrong answer that someone notices in testing. The bugs that cause real damage are almost always the ones subtle enough to survive testing and reach production: an off-by-one error in a loop, a rounding assumption that only breaks at an unusual value, a condition that's correct 99.9% of the time and catastrophically wrong the rest. The smaller and quieter the mistake, the more places it can hide.

Exam-style question

A programmer writes a loop intended to process all 10 items in a list (indexed 0 to 9), but writes 'for i in range(1, 10)' instead of 'for i in range(0, 10)'. Explain what type of bug this is and what its effect would be. [3 marks]

Show model answer and mark breakdown
  1. This is an off-by-one error (1 mark)
  2. Because indexing starts at 0, the loop as written starts at 1 and never processes the item at index 0 — the first item in the list is silently skipped (1 mark)
  3. The last item (index 9) is still processed correctly, since range(1, 10) does include 9 — the program runs without crashing, it just quietly produces an incomplete result (1 mark)

Examiner focus: work out exactly which index is missed by comparing the intended range to the written one, rather than giving only a general definition of 'off-by-one error'.

Common mistake: assuming the program will crash, or that the last item is the one skipped — this particular version skips the first item and runs without crashing, which is exactly what makes off-by-one errors dangerous: they don't always announce themselves.

What these failures actually changed

Mariner 1's failure became a standard case study in software engineering education, and it directly influenced how mission-critical code gets reviewed — the idea that a single transcription error could ever reach a live guidance system without a second check is precisely what modern code review, automated testing and formal verification exist to prevent. Every famous historical bug is, in a real sense, the reason a specific engineering safeguard exists today. If debugging, testing or software engineering practice needs explaining as real professional skill rather than exam-only material, that's exactly what our GCSE computer science tutoring is for — see the full learning pathway here.

Frequently asked questions

Was the Mariner 1 hyphen bug really just one character?

The most repeated version of the story is a missing hyphen (or overbar, in the original FORTRAN notation) in a guidance equation, which caused the rocket's software to misinterpret a formula and issue incorrect steering commands — the rocket was deliberately destroyed less than 5 minutes after launch to prevent it crashing into a populated area. Some historians debate the exact technical detail, but the core lesson — a tiny, easily-missed error causing a catastrophic failure — is well documented.

Why do 'off-by-one' errors happen so often?

Because counting in code often starts from 0, not 1 — the first item in a list is usually at position 0, not position 1 — and it's extremely easy to write a loop or condition that's out by exactly one position in either direction. It's one of the most common bug categories in all of programming, precisely because the mistake is so small and easy to make without noticing.

What actually stops bugs like these reaching production today?

Automated testing (running code against known expected results before it ships), code review (a second person checking the logic before it's merged), and stricter typed languages that catch some classes of error before the program even runs. None of these guarantee zero bugs, but they catch the overwhelming majority of the kind of small, easily-missed mistakes that caused the most famous historical failures.

Reader ratings & reviews

Rate this article across a few different things — your rating helps other readers, and helps us improve.

Content
Images
Presentation
Language clarity
Usefulness

0/3000

Was this article helpful?

Tell us what you think — a correction, a question it left unanswered, or a topic you'd like covered next.

Prefer To Talk? Book a free video call at a time that suits you: 15 minutes for a quick question, 30 for anything else. Times show in your own time zone.

Sudershan Soni

About the author

Sudershan Soni

Founder & Lead Tutor at Mostak Services — an MSc-qualified Mathematics, Science, Computer Science & STEM tutor with 20+ years of professional experience, teaching students from 11+ and GCSE to A-Level and beyond, online worldwide.

Read full profile

Want computer science that builds real understanding?

One-to-one lessons build real debugging skill, not just syntax memorisation. Book a free discussion and we'll show you how.