{"id":551,"date":"2014-09-02T02:13:04","date_gmt":"2014-09-02T08:13:04","guid":{"rendered":"http:\/\/rrbits.com\/epb\/?p=551"},"modified":"2014-09-03T14:44:56","modified_gmt":"2014-09-03T20:44:56","slug":"a-script-day-day-0105","status":"publish","type":"post","link":"https:\/\/rrbits.com\/epb\/2014\/09\/02\/a-script-day-day-0105\/","title":{"rendered":"A Script A Day &#8211; Day 01\/05"},"content":{"rendered":"<p>I had an idea for a programming self-challenge.\u00a0 From Monday, Sept 1st to Friday, Sept 5th: I&#8217;ll write a new script each day.\u00a0 The goal should be simple enough to solve in one day, but not so boring I&#8217;d feel dumb writing about making it.\u00a0 I&#8217;ll likely be sticking to business logic type goals, as I don&#8217;t actually enjoy algorithmic challenges as much.\u00a0 Now if a practical goal requires a decent algorithm, then so be it.<\/p>\n<p><!--more--><\/p>\n<p>Finishing day 1&#8217;s up actually a little into Day 2, but in my defense this one took a little while longer than I was expecting.\u00a0 The task I had in mind was to create an interactive script that could read\/write\/delete records from an encrypted text file.\u00a0 It&#8217;s not quite as elegant as I would have liked, and looking at it now I didn&#8217;t include a way to change the password, but it seems to work, at least on my dev machine.\u00a0 You can pull the repo and try it out yourself from <a title=\"Script-a-Day\" href=\"https:\/\/bitbucket.org\/epb9000\/script-a-day\">bitbucket.<\/a><\/p>\n<p>The biggest problem I encountered was the actual updating of the file.\u00a0 I destroyed a fair number of them before I got adding records working properly.\u00a0 (To make it trickier I wanted to do it in such a way that temporary files were not created in the process.) Viewing was largely a piece of cake.\u00a0 Or pie as the case may be. I celebrated it&#8217;s ease with a slice of banana cream pie.<\/p>\n<div id=\"attachment_552\" style=\"width: 810px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/rrbits.com\/epb\/files\/2014\/09\/script_a_day_1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-552\" class=\"wp-image-552 size-feature-header-box\" src=\"https:\/\/rrbits.com\/epb\/files\/2014\/09\/script_a_day_1-800x486.png\" alt=\"Encrypted Notes screenshot.\" width=\"800\" height=\"486\" srcset=\"https:\/\/rrbits.com\/epb\/files\/2014\/09\/script_a_day_1-800x486.png 800w, https:\/\/rrbits.com\/epb\/files\/2014\/09\/script_a_day_1-300x182.png 300w, https:\/\/rrbits.com\/epb\/files\/2014\/09\/script_a_day_1-200x121.png 200w, https:\/\/rrbits.com\/epb\/files\/2014\/09\/script_a_day_1.png 923w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><p id=\"caption-attachment-552\" class=\"wp-caption-text\">Encrypted Notes screenshot.<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I had an idea for a programming self-challenge.\u00a0 From Monday, Sept 1st to Friday, Sept 5th: I&#8217;ll write a new script each day.\u00a0 The goal should be simple enough to solve in one day, but not so boring I&#8217;d feel dumb writing about making it.\u00a0 I&#8217;ll likely be sticking to business logic type goals, as&#8230;  <a class=\"excerpt-read-more\" href=\"https:\/\/rrbits.com\/epb\/2014\/09\/02\/a-script-day-day-0105\/\" title=\"ReadA Script A Day &#8211; Day 01\/05\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":552,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42,3999],"tags":[4257],"class_list":["post-551","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-programming","tag-script-a-day"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts\/551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/comments?post=551"}],"version-history":[{"count":4,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts\/551\/revisions"}],"predecessor-version":[{"id":557,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts\/551\/revisions\/557"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/media\/552"}],"wp:attachment":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/media?parent=551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/categories?post=551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/tags?post=551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}