Use of the term "bug" to describe inexplicable defects has been a part of engineering jargon for many decades and predates computers and computer software; it may have originally been used in hardware engineering to describe mechanical malfunctions. For instance, Thomas Edison wrote the following words in a letter to an associate in 1878: It has been just so in all of my inventions. The first step is an intuition, and comes with a burst, then difficulties arise — this thing gives out and [it is] then that "Bugs" — as such little faults and difficulties are called — show themselves and months of intense watching, study and labor are requisite before commercial success or failure is certainly reached. The Middle English word bugge is the basis for the terms "bugbear" and "bugaboo", terms used for a monster. Baffle Ball, the first mechanical pinball game, was advertised as being "free of bugs" in 1931. Problems with military gear during World War II were referred to as bugs (or glitches). A page from the Harvard Mark II electromechanical computer's log, featuring a dead moth that was removed from the device The term "bug" was used in an account by computer pioneer Grace Hopper, who publicized the cause of a malfunction in an early electromechanical computer. A typical version of the story is given by this quote: 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. Hopper was not actually the one who found the insect, as she readily acknowledged. The date in the log book was September 9, 1947, although sometimes erroneously reported as 1945. The operators who did find it, including William "Bill" Burke, later of the Naval Weapons Laboratory, Dahlgren, Virginia, were familiar with the engineering term and, amused, kept the insect with the notation "First actual case of bug being found." Hopper loved to recount the story. This log book, complete with attached moth, is part of the collection of the Smithsonian National Museum of American History. The related term "debug" also appears to predate its usage in computing: the Oxford English Dictionary's etymology of the word contains an attestation from 1945, in the context of aircraft engines.
Programátorská chyba se často i v češtině označuje anglickým výrazem bug a proces jejího odstraňování ladění (debugování). Bug znamená doslova moucha, štěnice nebo obecně brouk. V angličtině se ve významu chyba (například konstruktérská) používá už velmi dlouho – použil ho například Thomas Edison roku 1878, když mluvil o svých vynálezech. S počítači pak pronikl do mnoha dalších jazyků. Traduje se, že původem tohoto významu je problém způsobený skutečným hmyzem. Známá je třeba historka o molu zachyceném na relé počítače Mark II dne 9. září 1947. Mol byl pečlivě vyproštěn a nalepen do záznamu s poznámkou „první skutečný případ nalezeného bugu“. Je ovšem zřejmé nejen to, že se nejedná o první výskyt termínu, ale také to, že operátoři o konstruktérském použití věděli. Zdroj: wikipedia.org