{"id":179,"date":"2008-12-03T03:03:02","date_gmt":"2008-12-03T07:03:02","guid":{"rendered":"http:\/\/patorjk.com\/blog\/?p=179"},"modified":"2014-01-25T17:57:39","modified_gmt":"2014-01-25T21:57:39","slug":"reading-up-on-javascript","status":"publish","type":"post","link":"https:\/\/patorjk.com\/blog\/2008\/12\/03\/reading-up-on-javascript\/","title":{"rendered":"Reading Up On Javascript"},"content":{"rendered":"<p>Shortly after finishing the beta version of my <a href=\"http:\/\/patorjk.com\/typingspeedtest\/\">Typing Speed Test<\/a> I started to feel like my knowledge of Javascript had some holes in it, especially in the event handling area. It&#8217;d been a long time since I&#8217;d read a book on Javascript, so I figured I&#8217;d pick one up one to help fill in the holes in what I knew.<\/p>\n<p>I looked around a little bit before selecting <a href=\"http:\/\/www.quirksmode.org\/book\/\">&#8220;ppk on Javascript&#8221;<\/a>. I chose this book after reading some of the author&#8217;s online articles. They were easy to read and contained a lot of interesting tidbits. I don&#8217;t want to turn this entry into a book review, so I&#8217;ll just say I enjoyed the book and would recommend it. However, the book admittedly doesn&#8217;t cover certain topics like OOP in Javascript. Though even with its omissions, it still ended up covering a lot of ground. The major things I took away from the book were:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.quirksmode.org\/js\/events_order.html\">Event Bubbling vs Event Capturing<\/a> &#8211; I feel bad I didn&#8217;t know about this. It answers the question: If an element and one of its ancestors have an event handler for the same event, which one fires first?<\/li>\n<li>location.href vs location.replace &#8211; It&#8217;s best to use &#8220;replace&#8221;. This is because replace doesn&#8217;t create a new history entry in the visitor&#8217;s browser. This is a good thing, since you don&#8217;t want to make a user&#8217;s back button useless.<\/li>\n<li>The navigator.userAgent string has an amusing story behind why its value is so convoluted.<\/li>\n<li>getElementsByTagName &#8211; I didn&#8217;t know about this DOM function. It looks like it could be really useful though.<\/li>\n<li>DOM Tree Text Nodes &#8211; When you create an HTML document, the text between tags and the text inside of a particular tag become text nodes. IE doesn&#8217;t support empty text nodes while other browsers do, this appears to make modifying the DOM tree a pain.<\/li>\n<\/ul>\n<p>There were other things too, but those are what stick out in my head while I type this. I&#8217;m really glad I read that book. It reminded me of how useful programming books are (I had gotten too use to just Googling whatever I didn&#8217;t know).<\/p>\n<p>Right now I&#8217;m a little more than 50 pages into <a href=\"http:\/\/jsdesignpatterns.com\/\">&#8220;Pro Javascript Design Patterns&#8221;<\/a>, which covers design patterns and OOP in Javascript. So far it&#8217;s really good. I had been meaning to read up on design patterns for a while so I&#8217;m pretty excited about this new book. I&#8217;m averaging almost 20 pages a night, so I should finish up pretty quickly. Once I finish, I&#8217;m going to get back to creating content for this site. I may make some posts in the meantime, but I figured I&#8217;d give you all a heads up as to what I was doing so you didn&#8217;t think I had forgotten about this site.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Shortly after finishing the beta version of my Typing Speed Test I started to feel like my knowledge of Javascript had some holes in it, especially in the event handling area. It&#8217;d been a long time since I&#8217;d read a book on Javascript, so I figured I&#8217;d pick one up one to help fill in &hellip; <a href=\"https:\/\/patorjk.com\/blog\/2008\/12\/03\/reading-up-on-javascript\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Reading Up On Javascript<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,26],"tags":[],"class_list":["post-179","post","type-post","status-publish","format-standard","hentry","category-book-reviews","category-web-apps"],"_links":{"self":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts\/179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/comments?post=179"}],"version-history":[{"count":9,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts\/179\/revisions"}],"predecessor-version":[{"id":474,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts\/179\/revisions\/474"}],"wp:attachment":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/media?parent=179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/categories?post=179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/tags?post=179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}