24.06.2025 08:59
The first bug in history: how the moth entered the history of programming
Harvard. 1947.
The middle of the 20th century. Harvard University is home to one of the most advanced computing devices of its time, the Harvard Mark II. It is a monstrous machine, weighing several tons, stuffed with electromechanical relays, rotating drums, kilometers of wires, and lamps. The computers of that time had no screens and could not “show” anything. They only did calculations, according to a predetermined sequence, and everything was entered manually or using punched tape. The people who serviced them were engineers, technicians, mathematicians, and sometimes real detectives. One day in the summer of 1947, a team of engineers working on the Mark II noticed that one of the operations was failing. The program was supposed to perform a calculation, but it did not go beyond a certain stage. Then they opened the machine’s panel to check the relays.
A real bug
What they found inside went down in history. A moth got stuck between the contacts of one of the electromechanical relays. The insect caused a short circuit and prevented the circuit from working properly. It was a real, physical bug. The team then did what any systems engineer would do: they documented the problem. They glued the moth to a technical journal and wrote: “Relay #70 Panel F (moth) in relay — First actual case of bug being found.” That phrase was a turning point: for the first time, the word “bug” was used literally — not as a metaphor, but as a description of… a bug in hardware. The journal has survived. It is now housed in the Smithsonian Institution in Washington, D.C., as part of the museum’s collection on the history of technology.
Were there bugs before that?
In fact, the term “bug” had been used in engineering long before that incident. For example, Thomas Edison wrote about a “bug” as an inexplicable malfunction in the telegraph system back in the late 19th century. At that time, this word meant “a small, strange, but critical problem” in a mechanism or circuit. That is, there were bugs, but such a literal bug was the first. And it was the incident with the moth that gave this word a new life: now it has become not only engineering jargon, but also a stable term in programming.
The birth of the term as a cultural phenomenon
After this story, the word “bug” began to be actively used in computer circles. Then “debugging” appeared - debugging, literally “debugging”. And even if bugs later became digital - logical errors in the code - the memory of the moth remained as a symbol. Grace Hopper herself, a legendary programmer and one of the first women in the history of computer science, who participated in the Mark II team, later humorously described this incident as the moment when “bugs got a face.”
The Legacy of the Moth
The story of the first bug is not just an anecdote for IT specialists. It is part of the cultural DNA of programming. Since then, bugs have become everyday life: from unpredictable failures in interfaces to deep logical failures. But it all started with a simple insect that accidentally ended up in the wrong place. Most likely, the engineers of that day could not imagine that decades later their note would become a meme, a museum exhibit, and an unofficial symbol of one of the most popular professions of the 21st century.