{"id":24036,"date":"2022-01-27T20:25:57","date_gmt":"2022-01-28T01:25:57","guid":{"rendered":"http:\/\/blog.kenperlin.com\/?p=24036"},"modified":"2022-01-27T20:25:57","modified_gmt":"2022-01-28T01:25:57","slug":"barriers-to-learning-programming","status":"publish","type":"post","link":"http:\/\/blog.kenperlin.com\/?p=24036","title":{"rendered":"Barriers to learning programming"},"content":{"rendered":"<p>I&#8217;ve been studying my musical &#8220;programming lesson&#8221; from yesterday&#8217;s post, and trying see it with a fresh pair of eyes. I&#8217;m trying to imagine what it would be like to look at that code if you had never before seen JavaScript.<\/p>\n<p>I notice that some of the programming constructs are unnecessarily mysterious. That is, they do something simple, but you wouldn&#8217;t know it just by looking at them.<\/p>\n<p>For example, look at these two lines of code:<\/p>\n<p><font face=\"courier\" color=\"blue\">&nbsp; &nbsp; &nbsp; for (i = 0 ; i &lt;= 7 ; i++)<\/font><br \/>\n<font face=\"courier\" color=\"blue\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;play(1\/4, i);<\/font><\/p>\n<p>All the first line does is count upwards: 0,1,2,3,4,5,6,7. Which is a pretty simple operation. But that would not be at all obvious to somebody who had never before seen JavaScript.<\/p>\n<p>The problem, I think, is that a language like JavaScript is designed to be very flexible, so that experts can do all sorts of advanced things with it. Which is great if you are an expert, but not so great if you are a beginner.<\/p>\n<p>Breaking that first line down into its component parts:<\/p>\n<p>&nbsp; <font face=\"courier\" color=\"blue\">i = 0<\/font> &nbsp; says &#8220;Start by setting the value of variable <font face=\"courier\" color=\"blue\">i<\/font> to zero.&#8221;<br \/>\n&nbsp; <font face=\"courier\" color=\"blue\">i &lt;= 7<\/font> says &#8220;Keep looping while <font face=\"courier\" color=\"blue\">i<\/font> is not more than seven.&#8221;<br \/>\n&nbsp; <font face=\"courier\" color=\"blue\">i++<\/font> &nbsp; &nbsp; &nbsp;<small> <\/small>says &#8220;Each time through the loop, increment the value of <font face=\"courier\" color=\"blue\">i<\/font>.&#8221;<\/p>\n<p>Once you understand that, it&#8217;s not so bad. But getting past that is a lot to ask of somebody who is just beginning to learn programming.<\/p>\n<p>I love the flexibility of JavaScript. But I wish there were a way to learn it that didn&#8217;t create so many barriers to entry for the beginner.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been studying my musical &#8220;programming lesson&#8221; from yesterday&#8217;s post, and trying see it with a fresh pair of eyes. I&#8217;m trying to imagine what it would be like to look at that code if you had never before seen JavaScript. I notice that some of the programming constructs are unnecessarily mysterious. That is, they &hellip; <a href=\"http:\/\/blog.kenperlin.com\/?p=24036\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Barriers to learning programming&#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\/24036"}],"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=24036"}],"version-history":[{"count":27,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/24036\/revisions"}],"predecessor-version":[{"id":24063,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/24036\/revisions\/24063"}],"wp:attachment":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24036"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}