{"id":28,"date":"2007-07-03T04:05:19","date_gmt":"2007-07-03T08:05:19","guid":{"rendered":"http:\/\/blogs.n1zyy.com\/n1zyy\/2007\/07\/03\/writing-code\/"},"modified":"2007-07-03T04:05:19","modified_gmt":"2007-07-03T08:05:19","slug":"writing-code","status":"publish","type":"post","link":"https:\/\/blogs.n1zyy.com\/n1zyy\/2007\/07\/03\/writing-code\/","title":{"rendered":"Writing Code"},"content":{"rendered":"<p>A few things I&#8217;ve learned in writing code:<\/p>\n<ul>\n    <li><strong>$huge_array<\/strong> is a perfectly valid name for a large array&#8230; Until you realize that you were actually trying to create a hash, which is apparently not a PHP feature at all, in which case you suddenly realize that you&#8217;re going to need like six $huge_array&#8217;s&#8230; In which case I broke down and gave them decent names.<\/li>\n    <li>To determine if something is sound programming practice, try it and see if the program crashes, or, in my case, if PHP throws errors. If not, you&#8217;re golden.<\/li>\n    <li>The PHP.net manual is <em>amazing<\/em>. I just learned how to use foreach() tonight.<\/li>\n    <li>Coding is like swimming: even if you&#8217;ve gone years without exercising the skill, you can pick it up in no time. And also like swimming, if you&#8217;ve sucked at it all your life, you&#8217;ll still suck at it just as much later on.<\/li>\n    <li>When you can&#8217;t think of a good way to code in a feature, just put in a comment indicating what it should do. (So far, though, the PHP compiler hasn&#8217;t done a very good job with filling in code based on my comments&#8230;)<\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>A few things I&#8217;ve learned in writing code: $huge_array is a perfectly valid name for a large array&#8230; Until you realize that you were actually trying to create a hash, which is apparently not a PHP feature at all, in &hellip; <a href=\"https:\/\/blogs.n1zyy.com\/n1zyy\/2007\/07\/03\/writing-code\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,11,22],"tags":[],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-computers","category-insanity","category-programming"],"_links":{"self":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":0,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}