A moth, a relay and a piece of tape
Around 1947, the operators of the Harvard Mark II, a room-sized electromechanical computer, traced an error to a moth trapped in one of its relays.
They removed it and taped it into the logbook with a note saying this was the first actual case of a bug being found. The note is probably a pun, because 'bug' already meant a fault.
The word was older than the computer
Engineers were using 'bug' for faults at least as far back as the 1870s. In a letter dated 13 November 1878, Thomas Edison wrote that bugs are the little faults and difficulties that turn up while you are inventing something.
So the logbook did not coin the word. It attached a literal insect to a word engineers were already using.
Who gets the credit
Grace Hopper helped make the moth story famous, but she is not credited with finding it. The operators are, and Bill Burke is reportedly among them.
Details such as the exact date and who spotted it vary between retellings, so treat the year as approximate.
