The origins of "bug"

One of the commonly believed origins of the term “bug” (as used in the software context) is the anecdote of a dead moth being causing the malfunction of the Mark II computer in Harvard in 1947. Well, it turns out that the term bug is much older and predates the computer industry by a pretty big margin. I found this out while reading Robert Cringely’s weekly post on Apple’s HD strategy (it is an interesting article by the way) where he’s mentioned the incident and the possible origins as a side note:

It turns out that “bug” was a common term for hardware glitches and dates back to the 19th century and possibly before. Edison used the term in a letter he wrote in 1878. This is no earthshaking news, of course, but simply reminds me how self-centered we are as an industry and there really isn’t much that’s truly new.

Wikipedia also mentions more or less the same thing in the etymology section for software bugs:

While it is certain that the Mark II operators did not coin the term “bug”, it has been suggested that they did coin the related term, “debug“. Even this is unlikely, since the Oxford English Dictionary entry for “debug” contains a use of “debugging” in the context of airplane engines in 1945 (see the debugging article for more).

So that clears up some word origins I guess, but the computer industry can take consolation in finding the first “real” bug :-).