{"id":236,"date":"2005-09-20T03:28:56","date_gmt":"2005-09-20T01:28:56","guid":{"rendered":"http:\/\/www.greenman.co.za\/wordpress\/?p=236"},"modified":"2005-09-20T03:28:56","modified_gmt":"2005-09-20T01:28:56","slug":"the-ie-legacy-of-the-day","status":"publish","type":"post","link":"https:\/\/www.greenman.co.za\/blog\/?p=236","title":{"rendered":"The IE legacy of the day"},"content":{"rendered":"<p>My HTML exploration probably peaked in the days of Netscape 4 and IE 4, so I&#8217;ve been left with many bad habits from those grim days when standards were little more than a twinkle in the eye (as opposed to now, where to most they&#8217;re still little more than a wailing infant).<\/p>\n<p>All programmers have a history of silly things that caught them out and resulted in an immense amount of time wasted. My favourite one comes from when I was teaching a Delphi course to UNISA students in the day. Syntax such as:<br \/>\n<code><br \/>\nif (a = b)<br \/>\n<\/code><br \/>\nis perfectly acceptable in Delphi. Later that evening, I was ready to code up a storm in Perl. However I got stuck early on, and spent ages trying to work out why some logic wasn&#8217;t working properly. It turns out I was using something like:<br \/>\n<code><br \/>\nif ($a = $b)<br \/>\n<\/code><br \/>\ninstead of <br \/>\n<code><br \/>\nif ($a == $b)<\/p>\n<p><\/code><\/p>\n<p>A miserable equal sign cost me a good night&#8217;s sleep (and I also relearned the rule that if you don&#8217;t see something immediately, take a break &#8211; you&#8217;ll probably see it quickly when you return).<\/p>\n<p>This week&#8217;s mistake, while it didn&#8217;t cost me much time, meant there was a bug on a site for much longer than there needed to be.<\/p>\n<p>Anyone who knows HTML can tell you that<\/p>\n<p><code><br \/>\n&lt;a href='blah.php' target='_blank'&gt;<br \/>\n<\/code><br \/>\nwill open up the page in a new window, right? Wrong. Firefox is a little more picky than that, and the line needs to read:<\/p>\n<p><code><br \/>\n&lt;a href='blah.php' target=\"_blank\"&gt;<br \/>\n<\/code><br \/>\nIt&#8217;s the first time I&#8217;ve ever known of a difference between double quotes and single quotes in HTML. I tend to use single quotes all the time, since in PHP<br \/>\n<code><br \/>\n$x = \"&lt;h3 class='c'&gt;Take me to $place\/h3&gt;\";<br \/>\n<\/code><br \/>\nis a lot easier than<br \/>\n<code><br \/>\n$x = '&lt;h3 class=\"c\"&gt;Take me to '.$place.'&lt;\/h3&gt;';<\/p>\n<p><\/code><\/p>\n<p>Live and learn \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My HTML exploration probably peaked in the days of Netscape 4 and IE 4, so I&#8217;ve been left with many bad habits from those grim days when standards were little more than a twinkle in the eye (as opposed to now, where to most they&#8217;re still little more than a wailing infant). All programmers have&hellip; <a class=\"more-link\" href=\"https:\/\/www.greenman.co.za\/blog\/?p=236\">Continue reading <span class=\"screen-reader-text\">The IE legacy of the day<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[7],"tags":[],"class_list":["post-236","post","type-post","status-publish","format-standard","hentry","category-metal-technical","entry"],"_links":{"self":[{"href":"https:\/\/www.greenman.co.za\/blog\/index.php?rest_route=\/wp\/v2\/posts\/236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greenman.co.za\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greenman.co.za\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greenman.co.za\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greenman.co.za\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=236"}],"version-history":[{"count":0,"href":"https:\/\/www.greenman.co.za\/blog\/index.php?rest_route=\/wp\/v2\/posts\/236\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.greenman.co.za\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greenman.co.za\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greenman.co.za\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}