{"id":1200,"date":"2012-02-27T17:02:42","date_gmt":"2012-02-27T22:02:42","guid":{"rendered":"http:\/\/anvil-of-time.com\/wordpress\/?p=1200"},"modified":"2021-03-11T11:13:45","modified_gmt":"2021-03-11T16:13:45","slug":"coding-for-amateurs","status":"publish","type":"post","link":"https:\/\/anvil-of-time.com\/programming\/coding-for-amateurs\/","title":{"rendered":"Coding for Amateurs"},"content":{"rendered":"<p>Bumped into this code the other day.  Hmmmm&#8230;<\/p>\n<pre name=\"code\" class=\"VB\">\/\/b_paint_good is a boolean set somewhere else\nIF NOT b_paint_good THEN\n   \/\/do not do something here\n   [code follows]\nELSE\n   \/\/ do something here\n   [more code follows]\nEND IF<\/pre>\n<p>Now what&#8217;s the point of this?  Trying to raise the defect count on your software (in the immortal words of Wally &#8220;I&#8217;m going to code me a mini-van&#8221;).<\/p>\n<p><strong>Never code the negative boolean value first.  If it&#8217;s the only condition you have to code for fine but never if you code for both.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bumped into this code the other day. Hmmmm&#8230; \/\/b_paint_good is a boolean set somewhere else IF NOT b_paint_good THEN \/\/do not do something here [code follows] ELSE \/\/ do something here [more code follows] END IF Now what&#8217;s the point of this? Trying to raise the defect count on your software (in the immortal words&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[16],"_links":{"self":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts\/1200"}],"collection":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/comments?post=1200"}],"version-history":[{"count":2,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts\/1200\/revisions"}],"predecessor-version":[{"id":1202,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts\/1200\/revisions\/1202"}],"wp:attachment":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/media?parent=1200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/categories?post=1200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/tags?post=1200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}