{"id":6426,"date":"2014-08-22T00:01:41","date_gmt":"2014-08-22T07:01:41","guid":{"rendered":"http:\/\/www.wambooli.com\/blog\/?p=6426"},"modified":"2014-08-16T09:16:29","modified_gmt":"2014-08-16T16:16:29","slug":"small-programs-immediate-feedback","status":"publish","type":"post","link":"https:\/\/www.wambooli.com\/blog\/?p=6426","title":{"rendered":"Small Programs, Immediate Feedback"},"content":{"rendered":"<p>Programming a computer may seem like a daunting task, but it&#8217;s actually one of the simplest things you can learn &#8212; provided that it&#8217;s taught properly.<br \/>\n<!--more--><br \/>\nIt helps to be motivated to learn anything. I&#8217;m sure some people would be reluctant to into outer space or date a celebrity if they lacked proper motivation.<\/p>\n<p>The motivation to learn a programming language could be for a career, to start your own billion dollar app company, to complete a dratted college course, or just curiosity. No matter what, if you&#8217;re willing to learn, I can teach you how to program. It&#8217;s really easy.<\/p>\n<p>The problem with teaching programming is that the people who teach it are generally programmers &#8212; and they&#8217;re good at what they do. They&#8217;ve been doing it so long that everything makes sense. They don&#8217;t question anything. And they completely forget what it&#8217;s like to be a beginner. This holds true today as much as it did back in the early 1980s, back when I first learned to program.<\/p>\n<p>Back in the microcomputer era, learning was done by reading books.<\/p>\n<p>Weird, I know.<\/p>\n<p>I purchased tons of books on programming. Generally, they were all the same: a huge, complex program opened Chapter 1 and never left. The author would talk down the reader. And it seemed, for the most part, that he was more interested in impressing his colleagues than teaching a beginner.<\/p>\n<p>To prove how nothing changes, recently I watched an online training course for learning C programming. The first &#8220;lesson&#8221; was about 4 minutes long. It featured the standard <code>Hello, World<\/code> program, but the code was several dozen lines long. It also included two header files, one referenced inside the other. (If that doesn&#8217;t make sense, then understand that it&#8217;s just a complicated, awkward thing to do.)<\/p>\n<p>Looking at that online course through a beginner&#8217;s eyes, I could imagine how daunting it would be. Heck, I&#8217;d give up! Based on the course, programming was obviously too complex. Yep, things haven&#8217;t changed much.<\/p>\n<p>My approach is simple: Small programs. Immediate feedback.<\/p>\n<p>That simple approach is how I first learned to program. The BASIC training manual that came with my TRS-80 was based on an earlier work done by Dr. David A. Lien, <em>Learning TRS-80 BASIC<\/em>. All the examples were small, maybe 10 lines of code maximum for each program. That made it easy to type and especially to view all at once on the screen.<\/p>\n<p>Then, throughout the text, new concepts were introduced by subtly modifying the code. You&#8217;d change one thing, then run the code to see how it worked. That prompted experimentation, which works when you&#8217;re learning to program. Feedback is immediate; the compiler (or interpreter) pretty much knows exactly what the problem is and where in the code things went awry. That&#8217;s a great way to learn, as opposed to the &#8220;You Got It Wrong!&#8221; approach for other complex things, such as accounting and women.<\/p>\n<p>You&#8217;d think this method would be well-known and popular now, but it&#8217;s not. And teaching this way is no secret, as it&#8217;s been done successfully for years. Lamentably, some things never change.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s my take on the best way to learn programming.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-6426","post","type-post","status-publish","format-standard","hentry","category-main"],"_links":{"self":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6426","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6426"}],"version-history":[{"count":2,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6426\/revisions"}],"predecessor-version":[{"id":6438,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6426\/revisions\/6438"}],"wp:attachment":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}