{"id":1057,"date":"2009-04-27T17:50:42","date_gmt":"2009-04-27T22:50:42","guid":{"rendered":"http:\/\/blog.kenperlin.com\/?p=1057"},"modified":"2009-04-27T20:41:32","modified_gmt":"2009-04-28T01:41:32","slug":"talking-to-computers-revisited","status":"publish","type":"post","link":"http:\/\/blog.kenperlin.com\/?p=1057","title":{"rendered":"Talking to computers, revisited"},"content":{"rendered":"<p>Back to our old friend Fibonacci, poised precariously between human conversation and computer programming.  The more I think about the Fibonacci sequence as a way in to the question of a <i>lingua franca<\/i> for introducing people to ideas about how to program, the more intriguing it gets.<\/p>\n<p>In this post I&#8217;m going to write things mathematically, foregoing the wordy english versions, since I think we&#8217;re all agreed that the concepts are what ultimately matter here, not the syntax.  Once we&#8217;ve worked out the best conceptual approaches, then we can go back and make things more &#8220;natural-language friendly&#8221;.<\/p>\n<p>One question that comes up is how soon you should introduce variables.  When you say:<\/p>\n<p>&nbsp; &nbsp; F(n) &nbsp; &larr; &nbsp; <b>if<\/b> &nbsp; n &le; 1 &nbsp; <b>then<\/b> &nbsp; n &nbsp;  <b>else<\/b> &nbsp; F(n-1)+F(n-2)<\/p>\n<p>you are assuming your student is ready to understand and use variables like &#8220;n&#8221;.<\/p>\n<p>In contrast, here is a description of the Fibonacci sequence without variables, stated as two &#8220;production rules&#8221;:<br \/>\n&nbsp;<br \/>\n&nbsp; &nbsp; F &nbsp; &larr; &nbsp; [ 0 , 1 ]<\/p>\n<p>&nbsp; &nbsp; F &nbsp; &larr; &nbsp; F &nbsp; <i>append<\/i> &nbsp; F<sub>last<\/sub> + F<sub>last-1<\/sub><\/p>\n<p>This doesn&#8217;t just return a number &#8211; it builds the whole sequence.  Is this approach conceptually clearer and more intuitive?  Is it closer to the way people already think?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back to our old friend Fibonacci, poised precariously between human conversation and computer programming. The more I think about the Fibonacci sequence as a way in to the question of a lingua franca for introducing people to ideas about how to program, the more intriguing it gets. In this post I&#8217;m going to write things &hellip; <a href=\"http:\/\/blog.kenperlin.com\/?p=1057\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Talking to computers, revisited&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/1057"}],"collection":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1057"}],"version-history":[{"count":71,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/1057\/revisions"}],"predecessor-version":[{"id":1128,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/1057\/revisions\/1128"}],"wp:attachment":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1057"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}