{"id":1776,"date":"2024-08-18T15:52:34","date_gmt":"2024-08-18T15:52:34","guid":{"rendered":"https:\/\/summergeometry.org\/sgi2024\/?p=1776"},"modified":"2024-08-18T16:31:36","modified_gmt":"2024-08-18T16:31:36","slug":"the-origins-of-bug-and-debugging-in-computing-and-engineering","status":"publish","type":"post","link":"https:\/\/summergeometry.org\/sgi2024\/the-origins-of-bug-and-debugging-in-computing-and-engineering\/","title":{"rendered":"The Origins of &#8216;Bug&#8217; and &#8216;Debugging&#8217; in Computing and Engineering"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><sub>By Ehsan Shams<\/sub><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">During these six fascinating weeks at SGI, I have said and heard the words &#8220;bug&#8221; and &#8220;debugging&#8221; so often that if I had an inch for every time, I could go from Egypt to Tahiti and back a few dozen times. Haha! As an etymology enthusiast, I couldn&#8217;t resist digging into the origins of these terms. Here\u2019s what I discovered.<br><br>The use of the term &#8220;bug&#8221; in engineering and technology contexts dates back to at least the 19th century. The term was used by Thomas Edison in a letter written in 1878 to Tivadar Pusk\u00e1s <a href=\"https:\/\/edisondigital.rutgers.edu\/document\/D7821ZAO#?xywh=-1%2C-182%2C940%2C1090\" data-type=\"link\" data-id=\"https:\/\/edisondigital.rutgers.edu\/document\/D7821ZAO#?xywh=-1%2C-182%2C940%2C1090\">here<\/a>, in which Edison referred to minor engineering flaws or difficulties as &#8220;bugs,&#8221; implying that these small issues were natural in the process of invention and experimentation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Specifically, Edison wrote about the challenges of refining his inventions in this letter, stating:<br><br><strong>&#8220;It has been just so in all of my inventions. The first step is an intuition\u2014and comes with a burst, then difficulties arise\u2014this thing gives out and [it is] then that &#8216;bugs&#8217;\u2014as such little faults and difficulties are called\u2014show themselves, and months of intense watching, study and labor are requisite before commercial success\u2014or failure\u2014is certainly reached.&#8221;<\/strong><br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"525\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/thomas-edison-taking-a-nap-outdoors.webp\" alt=\"\" class=\"wp-image-1781\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/thomas-edison-taking-a-nap-outdoors.webp 700w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/thomas-edison-taking-a-nap-outdoors-300x225.webp 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><small>Thomas Edison and His &#8216;Insomnia Squad&#8217;: Debugging Inventions All Night and Napping Through the Day. Photo: Bettmann\/Getty Images<\/small><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The term gained further prominence in the mid-20th century, especially in computing when engineers working on the Mark II computer at Harvard University in 1947, and found that the computer was malfunctioning. Upon investigation, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Grace_Hopper\" data-type=\"link\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/Grace_Hopper\">Grace Hopper<\/a> discovered that a moth had become trapped in one of the machine&#8217;s relays (Relay #70 on Panel \u201cF\u201d of the Harvard Mark II Aiken Relay Calculator), causing a problem, and took a photo of it and documented it.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"596\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/harvard-mark-1-action.jpg\" alt=\"\" class=\"wp-image-1779\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/harvard-mark-1-action.jpg 500w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/harvard-mark-1-action-252x300.jpg 252w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><figcaption class=\"wp-element-caption\">Harvard Mark II Aiken Relay Calculator<\/figcaption><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"499\" height=\"400\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/first_computer_bug.jpg\" alt=\"\" class=\"wp-image-1777\" style=\"width:391px;height:auto\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/first_computer_bug.jpg 499w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/first_computer_bug-300x240.jpg 300w\" sizes=\"auto, (max-width: 499px) 100vw, 499px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"502\" height=\"102\" src=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/firstbug_navalhistoricalcenter.jpg\" alt=\"\" class=\"wp-image-1778\" srcset=\"https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/firstbug_navalhistoricalcenter.jpg 502w, https:\/\/summergeometry.org\/sgi2024\/wp-content\/uploads\/2024\/08\/firstbug_navalhistoricalcenter-300x61.jpg 300w\" sizes=\"auto, (max-width: 502px) 100vw, 502px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">The engineers removed the moth and taped it into the log book with the note: <strong>\u201cFirst actual case of a bug being found.\u201d<\/strong> While the term &#8220;bug&#8221; had already been in use to describe technical issues or glitches, this incident provided a literal example of the term, and it is often credited with popularizing the concept of &#8220;de-bugging&#8221; in computer science.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The logbook, complete with the taped moth, is preserved in the Smithsonian National Museum of American History as a notable piece of computing history. This incident symbolically linked the term &#8220;bug&#8221; with computer errors in popular culture and the history of technology.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Turns out that the term &#8220;bug&#8221; has a rich etymology, originating in Middle English where it referred to a ghost or hobgoblin that troubled and scared people. By the 16th century, &#8220;bug&#8221; started to be used to describe insects, particularly those that were seen as pests, such as bedbugs which cause discomfort, then in the 19th century, engineers adopted &#8220;bug&#8221; as a metaphor for small flaws or defects in machinery, likening these issues to tiny pests that could disrupt a system&#8217;s operation and cause discomfot.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s hilarious how the word &#8220;bug&#8221; still sends shivers down our spines\u2014back then, it was ghosts and goblins, and now it could be a missing bracket hiding somewhere in a hundred-something-line program, a variable you forgot to declare, or an infinite loop that makes your code run forever!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>References<\/strong>:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Edison, T. (1878). <em>Letter to Tivadar Pusk\u00e1s<\/em>. The Thomas Edison Papers. Rutgers University. <a href=\"https:\/\/edisondigital.rutgers.edu\/document\/D7821ZAO#?xywh=-2%2C-183%2C940%2C1090\">https:\/\/edisondigital.rutgers.edu\/document\/D7821ZAO#?xywh=-2%2C-183%2C940%2C1090<\/a><\/li>\n\n\n\n<li>National Geographic Education. (n.d.). <em>World\u2019s first computer bug<\/em>. Retrieved August 18, 2024, from <a href=\"https:\/\/education.nationalgeographic.org\/resource\/worlds-first-computer-bug\">https:\/\/education.nationalgeographic.org\/resource\/worlds-first-computer-bug<\/a><\/li>\n\n\n\n<li>Hopper, G. M. (1987). The Mark II computer and the first &#8216;bug&#8217;. <em>Proceedings of the ACM History of Programming Languages Conference<\/em>.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Ehsan Shams During these six fascinating weeks at SGI, I have said and heard the words &#8220;bug&#8221; and &#8220;debugging&#8221; so often that if I had an inch for every time, I could go from Egypt to Tahiti and back a few dozen times. Haha! As an etymology enthusiast, I couldn&#8217;t resist digging into the [&hellip;]<\/p>\n","protected":false},"author":81,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[89],"ppma_author":[29],"class_list":["post-1776","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-etymology"],"authors":[{"term_id":29,"user_id":0,"is_guest":1,"slug":"cap-ehsan-ali","display_name":"ehsan.ali","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","author_category":"","first_name":"","last_name":"","user_url":"","job_title":"","description":""}],"_links":{"self":[{"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/posts\/1776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/users\/81"}],"replies":[{"embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/comments?post=1776"}],"version-history":[{"count":6,"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/posts\/1776\/revisions"}],"predecessor-version":[{"id":1803,"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/posts\/1776\/revisions\/1803"}],"wp:attachment":[{"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/media?parent=1776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/categories?post=1776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/tags?post=1776"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2024\/wp-json\/wp\/v2\/ppma_author?post=1776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}