{"id":39,"date":"2025-01-17T01:19:53","date_gmt":"2025-01-17T01:19:53","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/braysblog\/?p=39"},"modified":"2025-01-17T01:19:53","modified_gmt":"2025-01-17T01:19:53","slug":"first-blog-of-2025","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/braysblog\/2025\/01\/17\/first-blog-of-2025\/","title":{"rendered":"First Blog of 2025!!"},"content":{"rendered":"\n<p>Throughout my academic career, I have sometimes found myself rushing to push out code, telling myself that I will come back later and make it better. But as the book Clean Code says, &#8220;Later equals never.&#8221; This is pretty much always true. I find myself slapping comments onto the messy code in an attempt to make it presentable. It&#8217;s likely a result of human nature and follows the old adage, &#8220;if it ain&#8217;t broke, don&#8217;t fix it.&#8221; While this saying has some merit, messy code that runs is still broken.<\/p>\n\n\n\n<p>After reading about clean code and bad code smells, one thing I want to strive to do is ensure that my first draft is high quality and presentable. As I stated above, this has been a struggle for me. However, I noticed about a month ago that I had fallen into an even stranger and more subtle habit.<\/p>\n\n\n\n<p>Coding in an academic setting often involves being presented with a difficult problem, that you don&#8217;t know how to solve, and then throwing ideas at the code-wall to see what sticks. So when I have been stuck on a problem in the past, and my first idea didn&#8217;t work, I frequently find myself saying internally, &#8220;I&#8217;ll just try this new idea&#8221; with little faith that it will work. Because I am in a rush for time and not even sure that my new idea will produce anything good, I write it in a sloppy way. I then iterate on this process until the codebase is done, and it&#8217;s a mess.<\/p>\n\n\n\n<p>I don&#8217;t actually think this is an issue of not understanding clean code. I know how to write clean code, for the most part, and I even understand in that very moment I am not writing clean code.<\/p>\n\n\n\n<p>So, if it&#8217;s not an issue of knowing how to write clean code, then what is it? For me, it&#8217;s <em>improper planning<\/em>. I often feel so strapped for time that I don&#8217;t want to put in the work of thinking out my code structure and logic before I begin writing. This may be fine in most academic settings; I always end up making the code look presentable before I submit. However, when bugs do occur, a block of messy code can actually really damage my ability to solve for bugs. Additionally, when I leave an assignment for the night, it takes me way more time than it should to understand what I just did the day before.<\/p>\n\n\n\n<p>Ultimately, there is little excuse for messy code. While it may be a good short term method to maximize time savings, it won&#8217;t help in the long-run. Moral of the story: I am going to start writing clean code always, even for my first draft, and the way I am going to assist myself in this endeavor is through proper planning.<\/p>\n\n\n\n<p>I won&#8217;t change overnight, but I am determined to correct this error. Because at the end of the day, messy code is broken code, and if it&#8217;s broke, we should fix it.<\/p>\n\n\n\n<p>Brayden Edwards<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Throughout my academic career, I have sometimes found myself rushing to push out code, telling myself that I will come back later and make it better. But as the book Clean Code says, &#8220;Later equals never.&#8221; This is pretty much always true. I find myself slapping comments onto the messy code in an attempt to [&hellip;]<\/p>\n","protected":false},"author":14525,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-39","post","type-post","status-publish","format-standard","hentry","category-posts"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/braysblog\/wp-json\/wp\/v2\/posts\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/braysblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/braysblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/braysblog\/wp-json\/wp\/v2\/users\/14525"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/braysblog\/wp-json\/wp\/v2\/comments?post=39"}],"version-history":[{"count":1,"href":"https:\/\/blogs.oregonstate.edu\/braysblog\/wp-json\/wp\/v2\/posts\/39\/revisions"}],"predecessor-version":[{"id":40,"href":"https:\/\/blogs.oregonstate.edu\/braysblog\/wp-json\/wp\/v2\/posts\/39\/revisions\/40"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/braysblog\/wp-json\/wp\/v2\/media?parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/braysblog\/wp-json\/wp\/v2\/categories?post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/braysblog\/wp-json\/wp\/v2\/tags?post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}