{"id":17,"date":"2025-01-15T18:24:05","date_gmt":"2025-01-15T18:24:05","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/katalinanakoa\/?p=17"},"modified":"2025-01-15T18:24:05","modified_gmt":"2025-01-15T18:24:05","slug":"term-2-blog-post-1","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/katalinanakoa\/2025\/01\/15\/term-2-blog-post-1\/","title":{"rendered":"Term #2 Blog post #1"},"content":{"rendered":"\n<p>So for this blog post, I decided to look back at some of my own code. Below is a snippet from my  CS 161 final assignment. I found a lot of code that could&#8217;ve been &#8220;cleaner&#8221; but the most obvious example is the unnecessary global variables. I also found a lot of redundancies and the readability isn&#8217;t great. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"926\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8137\/files\/2025\/01\/Screenshot-2025-01-15-at-10.13.38-AM-1024x926.png\" alt=\"\" class=\"wp-image-18\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8137\/files\/2025\/01\/Screenshot-2025-01-15-at-10.13.38-AM-1024x926.png 1024w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8137\/files\/2025\/01\/Screenshot-2025-01-15-at-10.13.38-AM-300x271.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8137\/files\/2025\/01\/Screenshot-2025-01-15-at-10.13.38-AM-768x694.png 768w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8137\/files\/2025\/01\/Screenshot-2025-01-15-at-10.13.38-AM-1200x1085.png 1200w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/8137\/files\/2025\/01\/Screenshot-2025-01-15-at-10.13.38-AM.png 1524w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>I&#8217;d like to think I&#8217;ve improved since my freshman year, but I know there&#8217;s always room for improvement. Looking at the provided readings serves as a good reminder for practices that should always be in the back of my mind while working. If I could go back in time I&#8217;d tell myself that I need to keep working on avoiding redundant code by refactoring repeated parts into reusable functions. It\u2019s something I still tend to overlook when I\u2019m rushing to get things done, but I know it would make my code cleaner and easier to work with. I&#8217;d also tell myself that I really need to stop using global variables so much. They seem convenient, but they actually make things harder to test and understand later. I need to get better at passing information into functions the right way to make my code more organized and professional.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So for this blog post, I decided to look back at some of my own code. Below is a snippet from my CS 161 final assignment. I found a lot of code that could&#8217;ve been &#8220;cleaner&#8221; but the most obvious example is the unnecessary global variables. I also found a lot of redundancies and the [&hellip;]<\/p>\n","protected":false},"author":14529,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/katalinanakoa\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/katalinanakoa\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/katalinanakoa\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/katalinanakoa\/wp-json\/wp\/v2\/users\/14529"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/katalinanakoa\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":1,"href":"https:\/\/blogs.oregonstate.edu\/katalinanakoa\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":19,"href":"https:\/\/blogs.oregonstate.edu\/katalinanakoa\/wp-json\/wp\/v2\/posts\/17\/revisions\/19"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/katalinanakoa\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/katalinanakoa\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/katalinanakoa\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}