{"id":19,"date":"2025-01-19T05:59:10","date_gmt":"2025-01-19T05:59:10","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/minisblog\/?p=19"},"modified":"2025-01-19T05:59:10","modified_gmt":"2025-01-19T05:59:10","slug":"code-smell-like-roses","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/minisblog\/2025\/01\/19\/code-smell-like-roses\/","title":{"rendered":"Code Smell Like Roses"},"content":{"rendered":"\n<p>I\u2019d like to start making my code simpler and more consistent, using the same structure so it\u2019s easier to read and understand. One thing I wonder about is how long it takes me to write code after reading so much other code to figure out how it works and how to make my part fit with the rest. Then I go through my drawings, turn that into code, test it, and write my documentation based on everything I just did. While writing the docs, I often realize that some code smells or the logic doesn\u2019t make as much sense. I also remember that phrase we\u2019ve all heard: &#8220;If it works, don\u2019t touch it.&#8221; In theory, yeah, if it works I shouldn\u2019t touch it. But I need to make sure others understand what\u2019s going on because at the end of the day, whatever\u2019s happening in the code is just a combination of 0s and 1s that make the program do its job. Like Martin says, writing clean code isn\u2019t optional when I think about code life, reusability, and improvement throughout the program\u2019s life. I need to make sure the code is bug-free and clean so it works with others\u2019 programs and doesn\u2019t cause too many bugs. When I started coding, my mindset was just to code and make it work. But when I think about how long it takes me to read and understand other people\u2019s code, I realize how important it is to write code with quality in mind.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019d like to start making my code simpler and more consistent, using the same structure so it\u2019s easier to read and understand. One thing I wonder about is how long it takes me to write code after reading so much other code to figure out how it works and how to make my part fit [&hellip;]<\/p>\n","protected":false},"author":14593,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/minisblog\/wp-json\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/minisblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/minisblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/minisblog\/wp-json\/wp\/v2\/users\/14593"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/minisblog\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":1,"href":"https:\/\/blogs.oregonstate.edu\/minisblog\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":20,"href":"https:\/\/blogs.oregonstate.edu\/minisblog\/wp-json\/wp\/v2\/posts\/19\/revisions\/20"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/minisblog\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/minisblog\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/minisblog\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}