In engineering, a bug is a defect in the design, manufacture or operation of machinery, circuitry, electronics, hardware, or software that produces undesired results or impedes operation. It is contrasted with a glitch which may only be transient. Sometimes what might be seen as unintended or defective operation can be seen as an feature.
History
The Middle English word is the basis for the terms "" and "" as terms used for a monster. The term "bug" to describe defects has been a part of engineering jargon since the 1870s and predates electronic 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: 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. In the 1940 film, Flight Command, a defect in a piece of direction-finding gear is called a "bug". In a book published in 1942, Louise Dickinson Rich, speaking of a powered ice cutting machine, said, "Ice sawing was suspended until the creator could be brought in to take the bugs out of his darling." Isaac Asimov used the term "bug" to relate to issues with a robot in his short story "Catch That Rabbit", published in 1944. electromechanical computer's log, featuring a dead moth that was removed from the device. The term "bug" was used in an account by computer pioneerGrace Hopper, who publicized the cause of a malfunction in an early electromechanical computer. A typical version of the story is: Hopper did not find the bug, as she readily acknowledged. The date in the log book was September 9, 1947. The operators who found it, including William "Bill" Burke, later of the Naval Weapons Laboratory, Dahlgren, Virginia, were familiar with the engineering term and amusedly 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 Dictionarys etymology of the word contains an attestation from 1945, in the context of aircraft engines.
"It's not a bug, it's a feature"
Some user bugs work as the designer intended, reflecting a mismatch between the specifications and user expectations. Sometimes the behavior in question is written in user documentation or is billed as an undocumented feature, which is captured by the catchphrase "It's not a bug, it's a feature". This quip is recorded in The Jargon File dating to 1975 and may predate that.