{"id":440,"date":"2018-08-30T21:52:14","date_gmt":"2018-08-31T04:52:14","guid":{"rendered":"http:\/\/dragonwarz.net\/?p=440"},"modified":"2018-08-30T21:52:14","modified_gmt":"2018-08-31T04:52:14","slug":"code-cleaning","status":"publish","type":"post","link":"https:\/\/dragonwarz.net\/?p=440","title":{"rendered":"Code Cleaning"},"content":{"rendered":"\n<p>I have been reading the Clean Code book I got today, and it is exactly what I was looking for!\u00a0 Keeping functions small, preferably do one thing only, have descriptive names, don&#8217;t pass too many variables to a function.\u00a0 These are just a few of the insights helping me clean up my code.\u00a0 It&#8217;s also a good point in development to do this I think, as there are a lot of areas I can improve, and what better way to learn then through lots of practice!\u00a0<\/p>\n\n\n\n<p>I took my one big Sensor Commands function and put it in it&#8217;s own .py file, then broke it up into many smaller functions.\u00a0 MUCH nicer, but still needs work.\u00a0 I&#8217;m pretty happy overall, since I do actually want to share my code and have it be useful to others.\u00a0 Being easy to read and follow seem like important steps in that direction.\u00a0\u00a0<\/p>\n\n\n\n<p>Guess I&#8217;ll be spending lots of time working on the code, but making zero visual and functional changes ^_^\u00a0 It actually sounds like it would be one of those really boring things, and I suppose it would be if that&#8217;s ALL I was doing.\u00a0 However, just like organizing your office to perfection, there&#8217;s a real satisfaction from cleaning up programing code&#8230; of course I wouldn&#8217;t go as far as to say &#8220;To Perfection&#8221;, since I&#8217;m still very much learning!\u00a0 But a desire to learn, and do better are very important steps on the path towards Perfection (Never obtained, always getting closer).\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been reading the Clean Code book I got today, and it is exactly what I was looking for!\u00a0 Keeping functions small, preferably do one thing only, have descriptive names, don&#8217;t pass too many variables to a function.\u00a0 These &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/dragonwarz.net\/?p=440\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-440","post","type-post","status-publish","format-standard","hentry","category-random"],"_links":{"self":[{"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/posts\/440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=440"}],"version-history":[{"count":1,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/posts\/440\/revisions"}],"predecessor-version":[{"id":441,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=\/wp\/v2\/posts\/440\/revisions\/441"}],"wp:attachment":[{"href":"https:\/\/dragonwarz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dragonwarz.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}