{"id":1767,"date":"2021-03-16T15:31:02","date_gmt":"2021-03-16T15:31:02","guid":{"rendered":"https:\/\/www.hannahdee.wales\/blog\/?p=1767"},"modified":"2022-07-12T15:40:21","modified_gmt":"2022-07-12T15:40:21","slug":"book-review-algorithms-to-live-by","status":"publish","type":"post","link":"https:\/\/www.hannahdee.wales\/blog\/?p=1767","title":{"rendered":"Book review: Algorithms to live by"},"content":{"rendered":"\n<p>I recently finished <a href=\"https:\/\/www.hive.co.uk\/Product\/Brian-Christian\/Algorithms-to-Live-By--The-Computer-Science-of-Human-Decisions\/15214334\">Algorithms to Live by<\/a> (the computer science of human decisions), by Brian Christian and Tom Griffiths. The book provides a fairly detailed popular science account of some major findings from computer science, relating computational algorithms to the way humans solve problems. As an example &#8211; how do we fit things in our busy lives? Let&#8217;s look at scheduling theory! Or, how should we organise our books and libraries and computer files? Let&#8217;s look at the theories behind Caching!<\/p>\n\n\n\n<p>As an interloper into computer science I found the book particularly interesting; I know about a lot of CS and algorithmic concepts through working in CS but as I studied cognitive science for my first degree I haven&#8217;t studied algorithms formally. So sometimes i find myself bluffing about stuff like Big O notation, and optimisation. It&#8217;s quite fun to read a book which covers all this and relates it to real world human problems. <\/p>\n\n\n\n<p>For example, with big O, the analogies used involved a dinner party. Cleaning the house in advance is O(1) as it takes the same amount of time however many guests are coming. Passing a dish around the dinner table with everyone taking some food is O(n), as it&#8217;ll take longer for each member, but is still linear. If each guest greets each other guest that&#8217;s O(n<sup>2<\/sup>), as the amount of time goes up with the square of the number of guests. <\/p>\n\n\n\n<p>The book is generally written in an approachable and fairly amusing way &#8211; it even has a cheeky rickroll at the start of the chapter on game theory. There&#8217;s a &#8220;but&#8221; though, and it&#8217;s one around gender; every now and then the authors talk about computing and computer scientists as if we are all guys. At the start of CS this wasn&#8217;t the case, and it certainly isn&#8217;t the case now. <\/p>\n\n\n\n<p>Consider the problem of optimal stopping, for example: you are looking for a house, and you want to be sure you get the best house for your money, but you can only view one house at a time. At what point do you say &#8220;This house is good enough&#8221; and stop looking? It&#8217;s a tricky problem.  The answer is that you have a calibration phase where you&#8217;re just looking, and then once that phase is over, you keep looking until you see a house which is better than any you&#8217;ve seen so far. The calibration phase is all about getting a feel for the market and should involve seeing about a third of the candidates.  This problem is historically known as the secretary problem &#8211; and involves guys interviewing secretaries. It would have been possible to cover this, mention the historical name, and then use a bunch of examples from housebuying or other domains. <\/p>\n\n\n\n<p>But no, the authors have guys choosing secretaries and proposing to girls, applying their optimal stopping theory to the selection of women from a pool. It&#8217;s the 21st century, boys. Do better.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently finished Algorithms to Live by (the computer science of human decisions), by Brian Christian and Tom Griffiths. The book provides a fairly detailed popular science account of some major findings from computer science, relating computational algorithms to the way humans solve problems. As an example &#8211; how do we fit things in our busy lives? Let&#8217;s look at scheduling theory! Or, how should we organise our books and libraries and computer files? Let&#8217;s look at the theories behind Caching! As an interloper into computer science I found the book particularly interesting; I know about a lot of CS and algorithmic concepts through working<span class=\"more-link\"><a href=\"https:\/\/www.hannahdee.wales\/blog\/?p=1767\">Read More &rarr;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[152,121,153,129,145],"class_list":["entry","author-handee","post-1767","post","type-post","status-publish","format-standard","category-books","tag-algorithms","tag-general-nerdiness","tag-reading","tag-stem","tag-tech"],"_links":{"self":[{"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1767","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1767"}],"version-history":[{"count":1,"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1767\/revisions"}],"predecessor-version":[{"id":1768,"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1767\/revisions\/1768"}],"wp:attachment":[{"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1767"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1767"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}