{"id":101,"date":"2011-08-16T19:45:42","date_gmt":"2011-08-16T19:45:42","guid":{"rendered":"http:\/\/torrentialequilibrium.net\/?p=101"},"modified":"2011-09-18T03:55:55","modified_gmt":"2011-09-18T03:55:55","slug":"all-aboard-the-learning-train","status":"publish","type":"post","link":"https:\/\/torrentialequilibrium.net\/?p=101","title":{"rendered":"All aboard the Learning Train!"},"content":{"rendered":"<p><script type=\"text\/javascript\">\/\/ <![CDATA[\nvar d = new Date();\nvar time = d.getHours();\nif (time>=6 &#038;& time<12) { document.write(\"Good morning! \"); } else if (time>=12 &#038;& time<18) { document.write(\"Good afternoon! \"); } else if (time>=18 &#038;& time<24)\n{\ndocument.write(\"Good evening! \");\n}\nelse\n{\ndocument.write(\"Why are you up so late? \");\n}\n\/\/ ]]><\/script><br \/>\nThis is broken now that I&#8217;ve moved to WordPress! Now come back in a few hours and see if that greeting has changed. I made up (re: stole) a dealie that makes it change based on the time of day. Hopefully it works right.<\/p>\n<p>The point of this exercise -aside from seeing how little function you can get from as many lines of code as possible- is to play with JavaScript a bit today. The code I used is really not complicated at all, but it took me almost half an hour to get that greeting to the point where it would <em>show up on the page.<\/em> I don&#8217;t much care for JavaScript; I cannot foresee any reason why I would use it. Alas, to learn XSLT properly, one must also know XML. And to learn XML, a firm grasp on JavaScript is highly recommended. So today I&#8217;m learning about JavaScript. It&#8217;s going slowly.<\/p>\n<p>I don&#8217;t really think that it&#8217;s useless or anything. It&#8217;s just like, I&#8217;m reading and there&#8217;s these cool things you can do but then I turn around and realize that there&#8217;s no reason to. Sure I could put a self-updating time stamp on the site, but why bother? You&#8217;re probably reading this on a computer, and the time and date are right there on the bottom-right corner of your screen. I can do algebra on my page with JavaScript, but I cannot imagine any situation where it would be useful. Even if\/else is just if\/then&#8217;s dropout cousin for webpage content. I&#8217;d make stuff up just for the sake of learning it, but really, that would amount to <em>making homework for myself<\/em>. Mind you, I&#8217;m in the JavaScript tutorial equivalent of kindergarten, so maybe there&#8217;s better stuff beyond the horizon.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is broken now that I&#8217;ve moved to WordPress! Now come back in a few hours and see if that greeting has changed. I made up (re: stole) a dealie that makes it change based on the time of day. Hopefully it works right. The point of this exercise -aside from seeing how little function &hellip; <a href=\"https:\/\/torrentialequilibrium.net\/?p=101\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">All aboard the Learning Train!<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,21],"tags":[],"class_list":["post-101","post","type-post","status-publish","format-standard","hentry","category-admin","category-irl"],"_links":{"self":[{"href":"https:\/\/torrentialequilibrium.net\/index.php?rest_route=\/wp\/v2\/posts\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/torrentialequilibrium.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/torrentialequilibrium.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/torrentialequilibrium.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/torrentialequilibrium.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=101"}],"version-history":[{"count":2,"href":"https:\/\/torrentialequilibrium.net\/index.php?rest_route=\/wp\/v2\/posts\/101\/revisions"}],"predecessor-version":[{"id":118,"href":"https:\/\/torrentialequilibrium.net\/index.php?rest_route=\/wp\/v2\/posts\/101\/revisions\/118"}],"wp:attachment":[{"href":"https:\/\/torrentialequilibrium.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/torrentialequilibrium.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/torrentialequilibrium.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}