{"id":26,"date":"2022-02-02T20:18:31","date_gmt":"2022-02-02T20:18:31","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/teejayjan\/?p=26"},"modified":"2022-02-02T20:18:31","modified_gmt":"2022-02-02T20:18:31","slug":"5-error-hunting","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/teejayjan\/2022\/02\/02\/5-error-hunting\/","title":{"rendered":"#5: Error Hunting"},"content":{"rendered":"\n<p>Working with a React app (or web development, in general) is a funny thing when it comes to errors and warnings. I developed a bad habit fairly early in CS290: the console&#8217;s warnings and error&#8217;s aren&#8217;t really &#8220;real&#8221;. Or at least, they aren&#8217;t real in the same sense as an indentation issue or missing semicolon would be in Python or C++. The web app still compiles, runs, and all (or most) of the functionality works just fine. So what if a list is missing keys or there&#8217;s an unused variable? My app works fine, what&#8217;s the point of adding keys to a list or making sure the yellow squiggly variables are commented-out or deleted? <br><br>As it turns out, Github workflows cares deeply about such warnings. It&#8217;s been a tough but rewarding experience using workflows for the capstone project, as it&#8217;s forcing me to be a more careful programmer and check my development build to ensure I&#8217;m not wasting time and memory with unused variables or making other &#8220;small mistakes&#8221;. However, I can understand in the bigger picture why such warnings and errors exist. In a small project with limited logic and processing, what&#8217;s the big deal if there&#8217;s some wasted time and memory instantiating unused variables? But at some point, as a project size grows, I can see that not only would a bunch of wasted energy create a potential problem for the app itself, but also create nightmare for programmers.<br><br>I&#8217;ve found myself taking a couple days break between programming this project or personal projects and, due to wasted variables or other bad habits (like commenting out code that &#8220;I don&#8217;t need now but might need later&#8221;) can create immense issues for readability and make following program logic more difficult than originally intended. So although I might have gone through CS290 and my first few web projects thinking that I know better than the console, workflows has been forcing me out of my bad habits by making me be more careful about writing clean code. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Working with a React app (or web development, in general) is a funny thing when it comes to errors and warnings. I developed a bad habit fairly early in CS290: the console&#8217;s warnings and error&#8217;s aren&#8217;t really &#8220;real&#8221;. Or at least, they aren&#8217;t real in the same sense as an indentation issue or missing semicolon&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.oregonstate.edu\/teejayjan\/2022\/02\/02\/5-error-hunting\/\">Continue reading <span class=\"screen-reader-text\">#5: Error Hunting<\/span><\/a><\/p>\n","protected":false},"author":11957,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-26","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/teejayjan\/wp-json\/wp\/v2\/posts\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/teejayjan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/teejayjan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/teejayjan\/wp-json\/wp\/v2\/users\/11957"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/teejayjan\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":1,"href":"https:\/\/blogs.oregonstate.edu\/teejayjan\/wp-json\/wp\/v2\/posts\/26\/revisions"}],"predecessor-version":[{"id":27,"href":"https:\/\/blogs.oregonstate.edu\/teejayjan\/wp-json\/wp\/v2\/posts\/26\/revisions\/27"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/teejayjan\/wp-json\/wp\/v2\/media?parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/teejayjan\/wp-json\/wp\/v2\/categories?post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/teejayjan\/wp-json\/wp\/v2\/tags?post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}