Learn about the first computer bug
About this idea
Discover the amusing origin story of the term 'debugging'—it was literally a moth stuck in a relay of Harvard's Mark II computer in 1947! This quick tale connects early computing history with terminology we still use today.
On this page
How to get started
STEP 1
the story (3 minutes)
- September 9, 1947 at Harvard University
- Grace Hopper and team working on the Mark II computer
- The computer (huge, room-sized, using mechanical relays) kept malfunctioning
- They opened it up and found... an actual moth stuck in relay #70
- Grace taped the moth in the logbook with note: 'First actual case of bug being found'
- The moth is still preserved at the Smithsonian!
STEP 2
the context (3 minutes)
- 'Bug' already meant malfunction in engineering (Thomas Edison used it in 1870s)
- But this was the first literal bug causing a computer problem
- Mark II used electromechanical relays - physical switches clicking on/off
- Insects were attracted to the warmth and light
- Modern computers don't have this problem (solid state, sealed)
- 'Debugging' became official term for fixing computer problems
STEP 3
grace hopper's legacy (2 minutes)
- Grace Hopper: pioneering computer scientist, Rear Admiral US Navy
- Invented first compiler (translates human-readable code to machine code)
- Popularized term 'debugging' through this incident
- She'd later say: 'From then on, when anything went wrong, we said we were debugging the computer'
- Phrase spread throughout computing world
STEP 4
connection TO today
- Every time a programmer 'debugs' code, they're referencing this 1947 moth
- The moth photo is one of computing's most famous images
- Reminds us that even revolutionary technology had humble, humorous moments
What you’ll need
- none
Recommended resources
Tutorials & Learning
Progress milestones
Track your progress with these key achievements:
1
5 minutes
Learned the first bug story
2
8 minutes
Understand Grace Hopper's significance
Common challenges
Every beginner faces obstacles. Here's how to overcome them:
Want to know more about early computers
Solution: Research the Mark II, ENIAC, or UNIVAC. Or explore Grace Hopper's invention of the compiler—arguably more important than the moth!
Share your progress
Celebrate your achievements and inspire others:
- • Share this story with programmers or tech enthusiasts
- • Use as an icebreaker in tech meetings
- • Post the famous moth photo with the story