{"id":13,"date":"2022-02-18T03:55:36","date_gmt":"2022-02-18T03:55:36","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/ljones7\/?p=13"},"modified":"2022-02-18T03:55:36","modified_gmt":"2022-02-18T03:55:36","slug":"just-commit-already","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/ljones7\/2022\/02\/18\/just-commit-already\/","title":{"rendered":"Just commit already."},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"a-warning-to-commitment-phobes\">A warning to commitment phobes.<\/h2>\n\n\n\n<p>You&#8217;ve spent hours upon hours, and days upon days working on your project. You&#8217;ve wrote many lines of code and finally, you think it&#8217;s ready to go. You compile and run, then all of a sudden, it doesn&#8217;t work. Whether it&#8217;s an error, or just nothing happens, you sit there flabbergasted. All that time, you created something that doesn&#8217;t even work. Where do you start? There are so many functions you wrote and debugging bit by bit could take forever, but what can you do?<\/p>\n\n\n\n<p>My first big project in my first programming class was so much larger than all of my other assignments. Instead of writing one function, only several lines of code, I was writing multiple functions, all connected. I was making a small game in python and while I included some print statements to do some tests, I really just kind of ran with it. I took all the knowledge I had on what I should do, slapped it altogether, hit run, and nothing. I panicked, this project was due soon and it did not pass most of the tests.<\/p>\n\n\n\n<p>What could have saved me the extra hours of rebuilding and fixing my program? Testing more frequently would have helped, but also committing. I had created a repository in github, but instead of using github to my advantage, I just worked on my project locally. <\/p>\n\n\n\n<p>Had I used github, after completing a function, I could have run some tests, made sure it worked, and then committed and pushed my code. By committing and pushing to my github repository, I would have had a version of my program that worked up to that certain point. If I kept adding to my program and it stopped working, it would help with problem solving in two ways.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>I would know where to start looking. <br>My project was working the last time I committed and pushed, so there is a good chance the problem is between my last commit and this current one. I can start my focus on debugging the new code, rather than just starting at a random spot.<\/li><li>If nothing is working and I can&#8217;t find a solution, I can go back.<br>By testing and committing often, I would have a working program at different stages of development. If I wasn&#8217;t able to figure out the problem, I would be able to go back to a previous commit where things were working. This means not starting at ground zero and saving some time.<\/li><\/ol>\n\n\n\n<p>With coding it can be easy to get in the zone, but remember to commit and commit often. It can save you in the long run.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A warning to commitment phobes. You&#8217;ve spent hours upon hours, and days upon days working on your project. You&#8217;ve wrote many lines of code and finally, you think it&#8217;s ready to go. You compile and run, then all of a sudden, it doesn&#8217;t work. Whether it&#8217;s an error, or just nothing happens, you sit there&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.oregonstate.edu\/ljones7\/2022\/02\/18\/just-commit-already\/\">Continue reading <span class=\"screen-reader-text\">Just commit already.<\/span><\/a><\/p>\n","protected":false},"author":12114,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/ljones7\/wp-json\/wp\/v2\/posts\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/ljones7\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/ljones7\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/ljones7\/wp-json\/wp\/v2\/users\/12114"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/ljones7\/wp-json\/wp\/v2\/comments?post=13"}],"version-history":[{"count":1,"href":"https:\/\/blogs.oregonstate.edu\/ljones7\/wp-json\/wp\/v2\/posts\/13\/revisions"}],"predecessor-version":[{"id":14,"href":"https:\/\/blogs.oregonstate.edu\/ljones7\/wp-json\/wp\/v2\/posts\/13\/revisions\/14"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/ljones7\/wp-json\/wp\/v2\/media?parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/ljones7\/wp-json\/wp\/v2\/categories?post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/ljones7\/wp-json\/wp\/v2\/tags?post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}