{"id":3558,"date":"2011-09-05T15:41:01","date_gmt":"2011-09-05T22:41:01","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=3558"},"modified":"2011-09-05T15:41:01","modified_gmt":"2011-09-05T22:41:01","slug":"started-programming-young","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/started-programming-young\/","title":{"rendered":"Started Programming Young"},"content":{"rendered":"<p>I have some of the strangest memories of my struggles to jump into computer programming.<\/p>\n<p><strong>Back To BASIC<\/strong><br \/>\nI remember doing some <a href=\"http:\/\/en.wikipedia.org\/wiki\/Logo_(programming_language)\">Logo programming<\/a> on Apple II computers at school in 5th grade (1987 timeframe). But that was mostly driving turtle graphics. Then I remember doing some TRS-80 BASIC in 7th grade, circa 1989. Emboldened by what <em>very little<\/em> I had learned in perhaps the week or 2 we took in a science class to do this, I tried a little <a href=\"http:\/\/en.wikipedia.org\/wiki\/GW-BASIC\">GW-BASIC<\/a> on my family&#8217;s &#8220;IBM-PC compatible&#8221; computer (they were still called that back then). I still remember what my first program consisted of. Even back then I was interested in manipulating graphics and color on a computer screen. Thus:<\/p>\n<pre>\r\n10 color 1\r\n20 print \"This is color 1\"\r\n30 color 2\r\n40 print \"This is color 2\"\r\n...\r\n<\/pre>\n<p>And so on through 15 colors. Hey, it did the job&#8211; it demonstrated the 15 different colors you could set in text mode.<\/p>\n<p><strong>What&#8217;s FOR For?<\/strong><br \/>\nThat 7th grade computer unit in science class wasn&#8217;t very thick on computer science details. I recall working with a lab partner to transcribe code listings into a computer (and also saving my work to a storage cassette). We also developed form processing programs that would print instructions to input text followed by an &#8220;INPUT I$&#8221; statement to obtain the user&#8217;s output.<\/p>\n<p>I remember there was some situation where we needed a brief delay between input and printing. The teacher told us to use a construct of the form:<\/p>\n<pre>\r\n10 FOR I = 1 TO 20000\r\n20 NEXT I\r\n<\/pre>\n<p>We had to calibrate the number based on our empirical assessment of how long it lasted but I recall that the number couldn&#8217;t be much higher than about 32000, for reasons that would become clearer much later.<\/p>\n<p>Imagine my confusion when I would read and try to comprehend BASIC program code I would find in magazines. I would of course see that FOR..NEXT construct all over the place but obviously not in the context of introducing deliberate execution delays. Indeed, my understanding of one of the fundamental building blocks of computer programming &#8212; iteration &#8212; was completely skewed because of this early lesson.<\/p>\n<p><strong>Refactoring<\/strong><br \/>\nSomewhere along the line, I figured out that the FOR..NEXT could be used to do the same thing a bunch of times, possibly with different values. A few years after I had written that color program, I found it again and realized that I could write it as:<\/p>\n<pre>\r\n10 for I = 1 to 15\r\n20 color I\r\n30 print I\r\n40 next I\r\n<\/pre>\n<p>It still took me a few more years to sort out the meaning of WHILE..WEND, though.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It was a struggle for me to learn basic tenets of programming early on<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[],"class_list":["post-3558","post","type-post","status-publish","format-standard","hentry","category-programming"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/3558","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=3558"}],"version-history":[{"count":5,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/3558\/revisions"}],"predecessor-version":[{"id":3563,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/3558\/revisions\/3563"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=3558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=3558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=3558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}