Skip to main content
Menu
☎ (951) 904-2477
Tech & Machines

The First Bug: a Logbook Rite for Debugging

Also called Grace Hopper moth, first actual case of bug being found, Mark II moth, debugging rite

On 9 September 1947, operators of the Harvard Mark II computer found a moth trapped in a relay and taped it into the logbook as the first actual case of a bug being found. Grace Hopper made the story famous. This page tells what really happened and offers a small debugging rite of logging and thanks. It is history, not magic.

TraditionComputing history and engineering custom
RegionHarvard University, Massachusetts, USA
Era1947
Moon◐ Any moon
DayMercury
ElementAir
Difficulty●○○ Simple
Time10 minutes after each fixed bug

Tonight's moon is read when the page loads.

The working

  1. Keep a logbook for the project, paper or digital, and write the date and time on each entry, as the Mark II operators did.
  2. When a bug appears, write down exactly what happened before you change anything.
  3. Find the cause. When you do, write a one-line entry in plain words naming what it actually was.
  4. If you like, tape or paste in a token of it: the printed error line, the bad input, a small sketch. The moth is still on its page.
  5. Write a short thanks under the entry, to whoever reported the bug, to the test that caught it, or to yourself for staying with it.
  6. Write a test that would catch the same bug again, and note its name in the log.
  7. Once a year, on 9 September, read back through the log. It is your own record of what you learned.

Take care: No physical risks. If you tape a real insect into a book, choose one that has already died; never kill one for the purpose.

Versions across time and place

i

Edison's bugs

19th-century engineering · 1878

Thomas Edison wrote of bugs, meaning small faults and difficulties, in letters of the late 1870s. The 1947 log joke works because the word was already engineering slang; the moth made it literal.

Recorded in: Bug (engineering), Wikipedia
ii

Hopper's retelling

Computing folklore · 1950s to 1980s

Grace Hopper, who worked on the Mark II team, told the moth story in lectures for decades, and it became one of the best known tales in computing. She helped give programmers a shared origin story.

Recorded in: Computer History Museum, This Day in History, 9 September

History

On 9 September 1947 the team running the Harvard Mark II, a relay computer built for the US Navy, traced a fault to a moth caught between relay contacts. They taped it into the logbook with a note calling it the first actual case of a bug being found. The joke worked because engineers, Edison among them, had called faults bugs since the 1870s. The page is now held by the Smithsonian's National Museum of American History.

Grace Hopper was on the Mark II team and told the story for decades, but the museum notes the logbook was probably not hers, and historians credit the handwriting to others. This is history, not a spell. Our adaptation is a small engineering rite: log the bug, name its cause plainly, give thanks, and guard against its return. It is a ritual in the plain sense, a habit done with care.

Sources

  1. Log Book With Computer Bug · Smithsonian National Museum of American History
  2. This Day in History: September 9 · Computer History Museum
  3. Bug (engineering) · Wikipedia contributors

Related spells

Want one made just for you?

Tell us what you need and we will craft a custom spell, charm or reading for it. Or call to book a reading or a road blessing in person.

☎ Call UsTranslate