'What the origin of the name bug?

I know it's a little off-topic, but what is the origin of the name "BUG" used in IT development when we have an issue with our applications ?



Solution 1:[1]

Because a butterfly was stucked in a computer and it created a bug. It is true !

Solution 2:[2]

It was used by Grace Hopper in 1946:

In 1946, when Hopper was released from active duty, she joined the Harvard Faculty at the Computation Laboratory where she continued her work on the Mark II and Mark III. Operators traced an error in the Mark II to a moth trapped in a relay, coining the term bug. This bug was carefully removed and taped to the log book. Stemming from the first bug, today we call errors or glitches in a program a bug

Reference:

https://en.wikipedia.org/wiki/Bug_(engineering)

https://ei.cs.vt.edu/~history/Hopper.Danis.html

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Avim
Solution 2 Alessandro Vozza