bug:機械の中のガ

Every programmer knows the word "bug". It means a mistake in a computer program that makes it behave in the wrong way. But why do we use the name of an insect for a software problem? There's a famous story about this. On 9 September 1947, a team of engineers at Harvard University was working on a huge early computer called the Mark II. The machine kept making errors, and when they looked inside, they found the cause: a moth had got trapped in one of the machine's electrical switches. The engineers carefully removed the moth and taped it into their logbook. Next to it, someone wrote: "First actual case of bug being found." The story was later told many times by Grace Hopper, a pioneering computer scientist who worked on the machine, and the logbook – with the moth still in it – is now kept in a museum in Washington. But here's the interesting part. Look closely at the words "first actual case". The engineers were making a joke. They already used "bug" to mean a technical fault, and they thought it was funny that this time, the bug was a real insect. In fact, engineers had been talking about "bugs" for many decades. The famous inventor Thomas Edison used the word in a letter in 1878 to describe small faults and difficulties in his inventions. So the moth didn't create the word "bug". But it did give us one of the best stories in the history of computing – and the phrase "debugging" has been part of every programmer's life ever since.
プログラマーなら誰でも「bug(バグ)」という言葉を知っています。コンピューターのプログラムがおかしな動きをする原因となるまちがいのことです。でも、なぜソフトウェアの不具合を、虫の名前で呼ぶのでしょうか。 これについては有名な話があります。1947年9月9日、ハーバード大学の技術者チームが、「マークII」という初期の巨大なコンピューターの作業をしていました。機械がしょっちゅうエラーを起こすので中を調べてみると、原因が見つかりました。1匹のガが、機械の電気スイッチの一つにはさまっていたのです。 技術者たちはガを注意深く取り出し、作業日誌にテープではりつけました。そしてその横に、誰かがこう書きました。「バグが見つかった、初めての実例」。この話はのちに、この機械にたずさわったコンピューター科学の先駆者グレース・ホッパーによって何度も語られました。その日誌は、ガがはりつけられたまま、今もワシントンの博物館に保管されています。 けれども、おもしろいのはここからです。「初めての実例」という言葉をよく見てください。技術者たちは冗談を言っていたのです。彼らはすでに「bug」を技術的な不具合という意味で使っていて、今回はそのバグが本物の虫だったことをおもしろがったのです。 実際、技術者たちは何十年も前から「bug」という言葉を使っていました。かの有名な発明家トーマス・エジソンも、1878年の手紙の中で、自分の発明品の小さな欠陥や問題点をこの言葉で表しています。 つまり、「bug」という言葉を生んだのは、あのガではありません。それでも、ガはコンピューターの歴史の中でも指折りの楽しい逸話を残してくれました。そしてそれ以来、「debugging(デバッグ)」はすべてのプログラマーの日常の一部になっているのです。