{"id":17443,"date":"2023-01-18T17:36:52","date_gmt":"2023-01-19T01:36:52","guid":{"rendered":"https:\/\/www.markrkelly.com\/Blog\/?p=17443"},"modified":"2023-01-18T19:39:48","modified_gmt":"2023-01-19T03:39:48","slug":"atmospheric-rivers-and-coding-conundrums","status":"publish","type":"post","link":"https:\/\/www.markrkelly.com\/Blog\/2023\/01\/18\/atmospheric-rivers-and-coding-conundrums\/","title":{"rendered":"Atmospheric Rivers and A Coding Conundrum"},"content":{"rendered":"<p align=\"center\"><img decoding=\"async\" src=\"https:\/\/s.hdnux.com\/photos\/01\/31\/13\/73\/23379667\/3\/1200x0.jpg\" width=\"400\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/s.hdnux.com\/photos\/01\/30\/73\/37\/23312332\/6\/1200x0.jpg\" width=\"400\"><\/p>\n<p>As has been widely reported on the news, even nationally, California has experienced a nearly unprecedented series of storms moving in from the Pacific in what are called &#8220;atmospheric rivers,&#8221; some ten storms since late December, with only partial day breaks in between. <!--more-->That is, there have been only two or three sunny days so far this entire month. Fortunately we&#8217;ve not been directly affected. No leaks in the roof; no landslides from the hillside behind us. And we&#8217;ve avoided road closures, several along Highway 13 below us, mostly by staying home.<\/p>\n<p>(I&#8217;m not sure if the photos above are visible without subscriber access to the SF Chronicle site. If not, apologies.)<\/p>\n<p>\\\\<\/p>\n<p>This week I am back to regular development of my sfadb.com database, working at least an hour a day to implement the final pieces of my vision, ever since forever, of the site. Today I discovered a peculiarity of the Visual Basic code that Microsoft Access uses for macros. I was getting weird results, outputting lists of ranked items limited by a cap on the rank, depending on category. I toyed and toyed with inserting tracing code to see what was happening, why the limit on one category kept getting set to the limit on a different category.<\/p>\n<p>I&#8217;ve <a href=\"https:\/\/www.markrkelly.com\/Blog\/about\/memoirs\/working-at-the-rocket-factory-for-30-years\/\">said before<\/a> how, with rare exceptions, you can *always* figure out a problem with code, because it&#8217;s deterministic. But today&#8217;s problem challenged that. I had always thought that this would work:<\/p>\n<p>If A and B then<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C<br \/>\nelseif D and E then<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F<br \/>\nelse<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;G<br \/>\nendif<\/p>\n<p>Was a perfectly valid logical construct. But it wasn&#8217;t working. I had cases where D and E were true, but the result came out G. But as I played around and rebuilt this as,<\/p>\n<p>If A then<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If B then<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;endif<br \/>\nelseif D then<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if E then<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;endif<br \/>\nelse<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;G<br \/>\nendif<\/p>\n<p>Then it worked! Why didn&#8217;t the earlier version work? I don&#8217;t know. Something peculiar about Visual Basic in Microsoft apps? And yet &#8212; I did figure it out, the problem with my code to generate those pages, if only by trial and error, and now it works.<\/p>\n<p>\\\\<\/p>\n<p>I began a review\/summary of Michael Shermer&#8217;s THE MORAL ARC this afternoon, but of course I underestimated the amount of time it would take to do a complete summary. Will plan to finish tomorrow.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As has been widely reported on the news, even nationally, California has experienced a nearly unprecedented series of storms moving in from the Pacific in what are called &#8220;atmospheric rivers,&#8221; some ten storms since late December, with only partial day &hellip; <a href=\"https:\/\/www.markrkelly.com\/Blog\/2023\/01\/18\/atmospheric-rivers-and-coding-conundrums\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-17443","post","type-post","status-publish","format-standard","hentry","category-personal-history"],"_links":{"self":[{"href":"https:\/\/www.markrkelly.com\/Blog\/wp-json\/wp\/v2\/posts\/17443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.markrkelly.com\/Blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.markrkelly.com\/Blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.markrkelly.com\/Blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.markrkelly.com\/Blog\/wp-json\/wp\/v2\/comments?post=17443"}],"version-history":[{"count":7,"href":"https:\/\/www.markrkelly.com\/Blog\/wp-json\/wp\/v2\/posts\/17443\/revisions"}],"predecessor-version":[{"id":17450,"href":"https:\/\/www.markrkelly.com\/Blog\/wp-json\/wp\/v2\/posts\/17443\/revisions\/17450"}],"wp:attachment":[{"href":"https:\/\/www.markrkelly.com\/Blog\/wp-json\/wp\/v2\/media?parent=17443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.markrkelly.com\/Blog\/wp-json\/wp\/v2\/categories?post=17443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.markrkelly.com\/Blog\/wp-json\/wp\/v2\/tags?post=17443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}