In 1947, engineers working on Harvard's Mark II computer found a moth trapped in one of the machine's relays. They removed it, taped it into the logbook, and wrote that it was the “first actual case of bug being found.” The page survives today.

The story is famous, but one important detail is often lost: the moth did not create the word “bug.” Engineers had already been using “bug” to describe technical faults long before electronic computers.

What was the Mark II?

The Mark II was an early electromechanical calculating system. It relied on large numbers of relays—physical switching components that opened and closed as the machine performed calculations.

How did the moth enter computing history?

When the machine malfunctioned, the team discovered an actual insect caught in a relay. Because “bug” was already technical slang for a problem, the discovery became a perfect joke: this time the bug was literally a bug.

Did Grace Hopper invent the term “computer bug”?

No. The word had been used for mechanical and technical defects before Hopper's computing work. She later helped make the moth story famous, but the terminology itself predates the incident.

How did “debugging” become normal language?

As computing expanded, bug and debugging became standard terms for finding and correcting faults in hardware and software. Today a bug might be a logical error, a bad condition, or unexpected behavior—with no insect anywhere near the machine.

Why is the story unforgettable?

Because a metaphor suddenly became literal. Engineers were accustomed to searching for “bugs,” and in 1947 they actually found one with wings.

The best version of the story is more interesting than the myth: Grace Hopper did not invent the word bug. Instead, an already familiar technical term became wonderfully literal when a real moth was found inside a computer.