The inevitability of bugs
By Charles Miller
January 30, 2009 San Miguel de Allende

Some time ago I wrote about the etymology of the term bug as it applies to the computer. I think everyone today knows that bug refers to a flaw, failure or error of some kind in the computer or its software.

In a previous column I related that the term came into the vernacular when the early computer researcher Grace Hopper found a moth in one of the mechanical relays of the Mark II computer at Harvard University. What I read lately seems to indicate that that is neither the beginning nor the end of the story of the bug.

It seems that Hopper loved to recount the story of the bug in the computer. In her logbook entry of September 9, 1945 (some say 1947), she recorded the malfunction and attached the actual moth thereto with a piece of tape. She readily acknowledged that it was one of her assistants, not she, who found the bug.

The story grew to the status of legend in the world of computers, but as we look closer into the historical events it becomes clear that the term bug was not invented then. Using that word to describe inexplicable defects has been a part of engineering jargon for perhaps a century. Knowing this, it is possible to read Grace Hopper’s notation “First actual case of bug being found” and see the meaning much differently.

Hopper, who rose to the rank of Rear Admiral in the United States Navy before her retirement, was very popular on the speaking circuit. She told the story of the first bug many times, but it is now clear that she did not claim to be the inventor of the term.

There is evidence to show that the engineers who worked on early radar systems during World War II referred to their technical problems as “bugs.” Or at least that is the word used when they needed to use one that was printable.

Some would like to give the Mark II researchers at Harvard credit for originating the term “debug,” but that does not hold, either. There are records to show that the word “debugging” was used in the context of troubleshooting airplane engines during and before the war.

As far back as 1878, the inventor Thomas Edison wrote a letter to an associate and used the term. He wrote, “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.…”

Even before that, in 1842, Ada Byron, who is today credited as being the first computer programmer, wrote the word “bug” in her notes about the difficulty of preparing program cards for Charles Babbage’s mechanical computer, the “difference engine.”

Finding and fixing bugs, or debugging, has always been a major part of computer programming. As computer programs grow more complex, bugs invariably find their way in. When the obvious ones are found and corrected, the remaining ones become more difficult to find. Often programmers spend more time and effort finding and fixing bugs than writing the original program. This was defined by the early computing pioneer Maurice Wilkes in the 1940s when he recorded his realization that much of the rest of his life would be spent finding mistakes in his own programs.

Bugs are a consequence of human factors and necessarily a part of programming and the creative process. In other words, they are always going to be with us so long as humans are involved.

Charles Miller is a freelance computer consultant, a frequent visitor to San Miguel since 1981 and now practically a full-time resident. He can be contacted at 044 (415) 101-8528 or email FAQ8 (at) SMAguru.com.