{"id":2747,"date":"2009-12-15T18:26:02","date_gmt":"2009-12-15T23:26:02","guid":{"rendered":"http:\/\/blog.kenperlin.com\/?p=2747"},"modified":"2009-12-15T18:26:02","modified_gmt":"2009-12-15T23:26:02","slug":"programming-without-math-part-9","status":"publish","type":"post","link":"https:\/\/blog.kenperlin.com\/?p=2747","title":{"rendered":"Programming without math, part 9"},"content":{"rendered":"<p>There are concepts described easily in normal English conversation that are rather more difficult to describe in computer languages.  For example, when we say &#8220;the block is red&#8221;, or &#8220;the block is blue&#8221;, it is understood that &#8220;red&#8221; and &#8220;blue&#8221; are mutually exclusive.  Therefore if we say &#8220;the block is red and blue&#8221; then it is understood that the block must be painted with some pattern &#8212; red in some places and blue in others.  Yet if we say &#8220;the block is tall and blue&#8221;, there is no such conflict &#8212; the block can indeed be blue all over, no matter how tall or short it is.<\/p>\n<p>This works because we&#8217;ve come to the conversation with an elaborate set of prior understandings.  We know the concept of color, and therefore that red and blue must be mutually exclusive.  In programming parlance, we are bringing with us a rich library of properties that everyone in the conversation shares.<\/p>\n<p>Generally speaking, programmers have a much clunkier way to describe the same thing. Concepts like &#8220;red is the &#8216;color&#8217;, of something&#8221; tend to be spelled out right there in the statement, rather than relying too much on prior understandings of what everything means.   So, for example, we would explicitly say &#8220;the color of the block is blue&#8221;, rather than just &#8220;the block is blue&#8221;.  I think this is one of the things that makes programming difficult for most people to learn.  They are expecting the computer to know what they mean when they say something is red, rather than having to explicitly say that the color of that thing is red.<\/p>\n<p>So it seems that if we want to teach programming in a natural way to people who aren&#8217;t already versed in the ways of programming, we need to build in some of these intuitive ideas about properties.  We need to be able to say things like &#8220;red, blue, yellow and green are colors&#8221;, and then be free to ignore the word &#8220;color&#8221; entirely when we say something is red or blue.<\/p>\n<p>Another thing we do in natural language, without really thinking about it, is to casually talk about entire sets of things.  We don&#8217;t really think about this, we just do it.  When you say &#8220;pick up a box and hand it to me&#8221;, you are really talking about a number of things.  You are asking somebody to consider the entire set of boxes &#8212; presumably the boxes that are in reach of the other person.  Then you are asking that person to randomly choose one of those boxes.   It feels like you were just talking about one object, but in fact you were doing something much more complex.  It doesn&#8217;t seem complex only because we are so used to these sorts of constructions &#8212; we are so <i>good<\/i> at them &#8212; that they completely fly below our radar.<\/p>\n<p>So the question comes up: how much of that kind of implicit wisdom should be built into programming languages to make those languages accessible to everyone?  I&#8217;d be curious to know if anyone has any thoughts about this.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are concepts described easily in normal English conversation that are rather more difficult to describe in computer languages. For example, when we say &#8220;the block is red&#8221;, or &#8220;the block is blue&#8221;, it is understood that &#8220;red&#8221; and &#8220;blue&#8221; are mutually exclusive. Therefore if we say &#8220;the block is red and blue&#8221; then it &hellip; <a href=\"https:\/\/blog.kenperlin.com\/?p=2747\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Programming without math, part 9&#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":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/2747"}],"collection":[{"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2747"}],"version-history":[{"count":1,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/2747\/revisions"}],"predecessor-version":[{"id":2748,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/2747\/revisions\/2748"}],"wp:attachment":[{"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}