{"id":888,"date":"2011-02-25T19:26:56","date_gmt":"2011-02-26T03:26:56","guid":{"rendered":"http:\/\/www.todayifoundout.com\/?p=888"},"modified":"2016-02-14T15:56:05","modified_gmt":"2016-02-14T23:56:05","slug":"in-1842-ada-lovelace-wrote-the-worlds-first-computer-program","status":"publish","type":"post","link":"http:\/\/www.todayifoundout.com\/index.php\/2011\/02\/in-1842-ada-lovelace-wrote-the-worlds-first-computer-program\/","title":{"rendered":"In 1842, Ada Lovelace Wrote the World\u2019s First Computer Program"},"content":{"rendered":"<div class=\"pf-content\"><p><a href=\"http:\/\/www.todayifoundout.com\/wp-content\/uploads\/2010\/02\/6a00e54fdd46f4883301156f421b92970b-800wi1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-894\" title=\"Ada Lovelace\" src=\"http:\/\/www.todayifoundout.com\/wp-content\/uploads\/2010\/02\/6a00e54fdd46f4883301156f421b92970b-800wi1-e1266337354808.jpg\" alt=\"Ada Lovelace\" width=\"300\" height=\"477\" \/><\/a><a href='http:\/\/www.todayifoundout.com' title='Interesting Facts'>Today I found out<\/a> that Ada Lovelace was the world&#8217;s first computer programmer all the way back in the mid-1800s, writing the world&#8217;s first computer program in 1842.\u00a0 She was also an accomplished mathematician, which was obviously quite rare for women in the era she lived.<\/p>\n<p>Lovelace was the only legitimate daughter of Lord Byron, though she never knew him as he had left England for good in her early years and he died when she was 9 years old.\u00a0 Lovelace was initially taught mathematics, something which was not typical for women of the age, due to the fact that her mother was trying to drive out any insanity that may have come from Lord Byron (obviously her mother didn&#8217;t think too highly of the famed Lord).\u00a0 Ada showed an aptitude for math and science and one of her later tutors, the famous mathematician and logician Augustus De Morgan, noted that her exceptional skill in mathematics might someday lead her to become &#8220;an original mathematical investigator, perhaps of first-rate eminence.&#8221;\u00a0 How right he was.<\/p>\n<p>So how did Ada Lovelace become the world&#8217;s first computer programmer when there were no computers in the 1800s?\u00a0 Well, there are a lot of different ways to make a computer where the way it works &#8220;under the hood&#8221;, so to speak, is very similar to modern day computers which are &#8220;Turing Complete&#8221;. If you aren&#8217;t familiar, the class of machines known as &#8220;Turing Complete&#8221;, more or less, are just machines that can produce the result of any calculation.\u00a0 Or, more aptly, that the machine can be used to simulate the simplest computer such that it is able to do everything this simplest computer can do.\u00a0 Since this theoretical simplest computer, a &#8220;Turing Machine&#8221;, can do anything the most complicated computer can do, then any machine that can do everything it can do can also perform any calculation a modern day computer can do, assuming we are ignoring memory sizes and the like (assuming infinite memory).<\/p>\n<p>It turns out there was one such computer designed by Charles Babbage in the 1800s. Babbage set out to build a machine that was capable of doing a variety of mathematical calculations correctly every time, getting rid of the inherent errors that happen when humans do calculations by hand.\u00a0 Babbage&#8217;s earliest &#8220;computers&#8221; that he designed were not Turing Complete however.\u00a0 In addition to this, his computers did not run on electricity, but rather were entirely mechanical.\u00a0 Some of his designs ran on steam, while others needed to be hand cranked to turn the thousands of gears and parts.<\/p>\n<p>Babbage&#8217;s first &#8220;Difference Engine&#8221;, as he called it, was made up of over 25,000 parts, weighing roughly fifteen tons.\u00a0 However, strangely it was never completed in terms of constructing the machine he had designed; it was only half built.\u00a0 He then came up with a second Difference Engine, which was an improvement on the uncompleted first Difference Engine, capable of returning mathematical results up to 31 digits.\u00a0 He never completed building this one either; though he did complete the designs for these machines that have since been proven to work. \u00a0 Specifically, in 1991, his second model of the Difference Engine was constructed and was demonstrated to work by doing a series of calculations.\u00a0 In 2000, the printer he designed that hooked up to the difference engine was constructed and was also shown to work.<\/p>\n<p>So where does Ada Lovelace fit into all this?\u00a0 After failing to build the second difference engine, primarily due to funding problems, Babbage began designing a much more complex machine, which he called the &#8220;Analytical Engine&#8221;.\u00a0 The Analytical Engine, unlike his difference engines, could be programmed using punch cards, very similar to how early electrical computers were programmed (note: there is some evidence that Ada Lovelace was the one that suggested this improvement to him).\u00a0 This would then allow someone to make some program with the punch cards once and be able to use this program over and over again, without having to manually do everything every time they wanted to do some operation.<\/p>\n<p>This machine was also able to automatically use results of previous calculations in future calculations.\u00a0 So you could simply put in a program, crank the gears and let the machine work, spitting out all the results of your program&#8217;s execution.\u00a0 This and other aspects of the underlying architecture made this machine surprisingly similar in architecture to how modern day computers work.\u00a0 As such, Charles Babbage is known as the &#8220;father of the computer&#8221;.<\/p>\n<p><a href=\"http:\/\/www.todayifoundout.com\/wp-content\/uploads\/2010\/02\/pointers-e1266337410212.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-895\" title=\"Pointers\" src=\"http:\/\/www.todayifoundout.com\/wp-content\/uploads\/2010\/02\/pointers-e1266337410212.png\" alt=\"Pointers\" width=\"325\" height=\"269\" \/><\/a>Like his early machines that were way ahead of their time, this one was simply designed, never built.\u00a0 Had he built it, it would have been the first machine ever to be Turing Complete.\u00a0 Thus, in terms of capabilities, again assuming infinite memory, his machine would have been able to do any calculation a modern day computer could do.<\/p>\n<p>Ada Lovelace, nicknamed by Babbage &#8220;The Enchantress of Numbers&#8221;, was impressed by Babbage&#8217;s Analytical Engine design and between 1842 and 1843 she translated an article by Italian mathematician Luigi Menabrea covering the engine.\u00a0 She then supplemented the article with notes of her own on the engine, with the notes being longer than the memoir itself.\u00a0 In these added notes, she included the world&#8217;s first computer program that would use the machine to calculate a sequence of Bernoulli numbers and has since been shown to be a valid algorithm that would have run correctly had the Analytical Engine ever been built.<\/p>\n<p>Besides this, she also was one of the first to see that this computer Babbage designed could likely someday be used to do more than just crunch numbers, such as be used for music and other non-mathematical purposes.<\/p>\n<p>Ada died a mere 9 years or so after writing this program, at the very young age of 36 years old on November 27, 1852, from uterine cancer and bloodletting by her physicians.<\/p>\n<p>If you liked this article, you might also enjoy our new popular podcast, The BrainFood Show (<a href=\"https:\/\/itunes.apple.com\/us\/podcast\/the-brainfoodshow\/id1350586459\" rel=\"nofollow\" target=\"_blank\">iTunes<\/a>, <a href=\"https:\/\/open.spotify.com\/show\/36xpXQMPVXhWJzMoCHPJKd\" target=\"_blank\">Spotify<\/a>, <a href=\"https:\/\/playmusic.app.goo.gl\/?ibi=com.google.PlayMusic&#038;isi=691797987&#038;ius=googleplaymusic&#038;apn=com.google.android.music&#038;link=https:\/\/play.google.com\/music\/m\/Insimdi4g6puyyr4qbt6tup5b6m?t%3DThe_BrainFood_Show%26pcampaignid%3DMKT-na-all-co-pr-mu-pod-16\" rel=\"nofollow\" target=\"_blank\">Google Play Music<\/a>, <a href=\"http:\/\/www.todayifoundout.com\/index.php\/feed\/brainfood\/\" target=\"_blank\">Feed<\/a>), as well as:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.todayifoundout.com\/index.php\/2010\/05\/the-first-website-ever-made\/\" target=\"_blank\">The First Website Ever Made<\/a><\/li>\n<li><a href=\"http:\/\/www.todayifoundout.com\/index.php\/2012\/10\/steve-jobs-first-business-was-selling-blue-boxes-that-allowed-users-to-get-free-phone-service-illegally\/\" target=\"_blank\">Steve Jobs\u2019 First Business was Selling Blue Boxes that Allowed Users to Get Free Phone Service Illegally<\/a><\/li>\n<li><a href=\"http:\/\/www.todayifoundout.com\/index.php\/2010\/09\/how-the-word-spam-came-to-mean-junk-message\/\" target=\"_blank\">How the Word \u201cSpam\u201d Came to Mean \u201cJunk Message\u201d<\/a><\/li>\n<li><a href=\"http:\/\/www.todayifoundout.com\/index.php\/2014\/09\/history-internet\/\" target=\"_blank\">Who Invented the Internet?<\/a><\/li>\n<li><a href=\"http:\/\/www.todayifoundout.com\/index.php\/2012\/02\/this-day-in-history-february-15-the-first-general-purpose-digital-electronic-computer-is-dedicated-at-the-university-of-pennsylvania\/\" target=\"_blank\">The World\u2019s First General Purpose Digital Electronic Computer<\/a><\/li>\n<\/ul>\n<p><span id=\"bonusfacts\">Bonus<\/span> Facts:<\/p>\n<ul>\n<li>Half of Charles Babbage&#8217;s brain is preserved at the Hunterian Museum in London.\u00a0 No word on what happened to the other half. \ud83d\ude42<\/li>\n<li>The programming language &#8220;Ada&#8221;, which is the &#8220;official&#8221; programming language of the United States military, was named after Ada Lovelace; the military standard for the language, &#8220;MIL-STD-1815&#8221; was given the number of the year of her birth.<\/li>\n<li>Annoyed by an &#8220;inaccuracy&#8221; in the poem &#8220;The Vision of Sin&#8221;, Charles Babbage wrote to the famed poet Alfred Tennyson requesting that he change the lines &#8220;Every moment dies a man, Every moment one is born&#8221; to &#8220;Every moment dies a man, Every moment 1 1\/16 is born&#8221;.<\/li>\n<li>Ada Lovelace&#8217;s image can be seen on the Microsoft product authenticity hologram stickers.<\/li>\n<\/ul>\n<span class=\"collapseomatic \" id=\"id69f39fdfc8049\"  tabindex=\"0\" title=\"Expand for References:\"    >Expand for References:<\/span><div id=\"target-id69f39fdfc8049\" class=\"collapseomatic_content \">\n<ul>\n<li><a title=\"Charles Babbage\" href=\"http:\/\/en.wikipedia.org\/wiki\/Charles_Babbage\" target=\"_blank\">Charles Babbage<\/a><\/li>\n<li><a title=\"Turing Completeness\" href=\"http:\/\/en.wikipedia.org\/wiki\/Turing-complete\" target=\"_blank\">Turing Completeness<\/a><\/li>\n<li><a title=\"Augustus De Morgan\" href=\"http:\/\/en.wikipedia.org\/wiki\/Augustus_De_Morgan\" target=\"_blank\">Augustus De Morgan<\/a><\/li>\n<li><a href=\"https:\/\/xkcd.com\/138\/\" target=\"_blank\">Comic Source<\/a><\/li>\n<li><a title=\"Ada Lovelace\" href=\"http:\/\/en.wikipedia.org\/wiki\/Ada_Lovelace\" target=\"_blank\">Ada Lovelace<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p><a href='http:\/\/www.todayifoundout.com' title='Interesting Facts'>Today I found out<\/a> that Ada Lovelace was the world&#8217;s first computer programmer all the way back in the mid-1800s, writing the world&#8217;s first computer program in 1842.\u00a0 She was also an accomplished mathematician, which was obviously quite rare for women in the era she lived. Lovelace was the only legitimate daughter of Lord Byron, though she never knew him [&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":894,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6,9],"tags":[158,162,159,161,160],"class_list":["post-888","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-today-i-found-out","category-history","category-people","tag-ada-lovelace","tag-computer","tag-computer-programming","tag-first-computer","tag-programming"],"_links":{"self":[{"href":"http:\/\/www.todayifoundout.com\/index.php\/wp-json\/wp\/v2\/posts\/888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.todayifoundout.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.todayifoundout.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.todayifoundout.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.todayifoundout.com\/index.php\/wp-json\/wp\/v2\/comments?post=888"}],"version-history":[{"count":16,"href":"http:\/\/www.todayifoundout.com\/index.php\/wp-json\/wp\/v2\/posts\/888\/revisions"}],"predecessor-version":[{"id":45932,"href":"http:\/\/www.todayifoundout.com\/index.php\/wp-json\/wp\/v2\/posts\/888\/revisions\/45932"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.todayifoundout.com\/index.php\/wp-json\/wp\/v2\/media\/894"}],"wp:attachment":[{"href":"http:\/\/www.todayifoundout.com\/index.php\/wp-json\/wp\/v2\/media?parent=888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.todayifoundout.com\/index.php\/wp-json\/wp\/v2\/categories?post=888"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.todayifoundout.com\/index.php\/wp-json\/wp\/v2\/tags?post=888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}