{"id":393,"date":"2015-10-21T23:49:26","date_gmt":"2015-10-21T23:49:26","guid":{"rendered":"http:\/\/blogs.oregonstate.edu\/gemmlab\/?p=393"},"modified":"2015-10-21T23:50:48","modified_gmt":"2015-10-21T23:50:48","slug":"on-learning-to-code","status":"publish","type":"post","link":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/2015\/10\/21\/on-learning-to-code\/","title":{"rendered":"On learning to Code&#8230;"},"content":{"rendered":"<p><strong>By <a href=\"http:\/\/mmi.oregonstate.edu\/amanda-holdman\">Amanda Holdman<\/a>, MSc student, Dept. Fisheries and Wildlife, OSU<\/strong><\/p>\n<p>I\u2019ve never sworn so much in my life. I stared at a computer screen for hours trying to fix a bug in my script. The cause of the error escaped me, pushing me into a cycle of tension, self-loathing, and keyboard smashing.<\/p>\n<p>The cause of the error? A typo in the filename.<\/p>\n<p>When I finally fixed the error in my filename and my code ran perfectly \u2013 my mood quickly changed. I felt invincible; like I had just won the World Cup. I did a quick victory dance in my kitchen and high-fived my roommate, and then sat down and moved on the next task that needed to be conquered with code. Just like that, programming has quickly become a drug that makes me come back for more despite the initial pain I endure.<\/p>\n<p>I had never opened a computer programming software until my first year of graduate school. Before then Matlab was just the subject of a muttered complaint by my college engineering roommate. As a biology major, I blew it off as something (thank goodness!) I would never need to use. Needless to say, that set me up for a rude awakening just one year later.<\/p>\n<p>The time has finally come for me to, *gulp*, learn how to code. I honestly think I went through all 5 stages of grief before I realized I was at the point where I could no longer put it off.<\/p>\n<p>By now you are familiar with the GEMM Lab updating you with photos of our charismatic study species in our beautiful study areas. However, summer is over. My field work is complete, and I\u2019m enrolled in my last course of my master\u2019s career. So what does this mean? Winter. And with winter comes data analysis. So, instead of spending my days out on a boat in calm seas, watching humpbacks breach, or tagging along with Florence to watch gray whales forage along the Oregon coast, I\u2019ve reached the point of my graduate career that we don\u2019t often tell you about: Figuring out what story our data is telling us. This stage requires lots of coffee and patience.<\/p>\n<p>However, in just two short weeks of learning how to code, I feel like I\u2019ve climbed mountains. I tackle task after task, each allowing me to learn new things, revise old knowledge, and make it just a little bit closer to my goals. One of the most striking things about learning how to code is that it teaches you how to problem solve. It forces you to think in a strategic and conceptual way, and to be honest, I think I like it.<\/p>\n<p>For example, this week I mapped the percent of my harbor porpoise detections over tidal cycles. One of the most important factors explaining the distribution and behavior of coastal marine mammals are tides. Tidal forces drive a number of preliminary and secondary oceanographic processes like changes in water depth, salinity, temperature, and the speed and direction of currents. It\u2019s often difficult to unravel which part of the tidal process is most influential to a species due to the several covariates related to the change in tides , how inter-related those covariates are, and the elusive nature of the species (like the cryptic harbor porpoise). However, while the analysis is preliminary, if we map the acoustic detections of harbor porpoise over the tidal cycle, we can already start to see some interesting trends between the number of porpoise detections and the phases of the tide. Check it out!<\/p>\n<p><a href=\"http:\/\/blogs.oregonstate.edu\/gemmlab\/files\/2015\/10\/reef3_clicks.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"394\" data-permalink=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2015\/10\/reef3_clicks-e1491010714808.jpg\" data-orig-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2015\/10\/reef3_clicks-e1491010714808.jpg\" data-orig-size=\"700,344\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"reef3_clicks\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2015\/10\/reef3_clicks-300x147.jpg\" data-large-file=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2115\/files\/2015\/10\/reef3_clicks-1024x503.jpg\" class=\"alignnone wp-image-394\" src=\"http:\/\/blogs.oregonstate.edu\/gemmlab\/files\/2015\/10\/reef3_clicks.jpg\" alt=\"reef3_clicks\" width=\"695\" height=\"341\" \/><\/a><\/p>\n<p>Now, I won\u2019t promise that I\u2019ll be an excellent coder by the end of the winter, but I think I might have a good chance at being able to mark the \u201cproficient\u201d box next to Matlab and R on my first job application. Yet, whatever your reason for learning code &#8211; whether you are an undergraduate hoping to get ahead for graduate school, a graduate student hoping to escape the inevitable (like me), or just someone who thinks getting a code to work properly is a fun game &#8211; my advice to you is this:<\/p>\n<p>Google first. If that fails, take mental breaks. Revisit the problem later. Think through all possible sources of error. Ask around for help. Then, when you finally fix the bug or get the code to work the way you would like it to, throw a mini-party. After it\u2019s all over, take a deep breath and go again. Remember, <a href=\"http:\/\/whatshouldwecallgradschool.tumblr.com\/search\/code\/page\/2\">you are not alone!<\/a><\/p>\n<p>Happy coding this winter GEMM Lab readers \u2013 and I wish you lots of celebratory dancing!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Amanda Holdman, MSc student, Dept. Fisheries and Wildlife, OSU I\u2019ve never sworn so much in my life. I stared at a computer screen for hours trying to fix a bug in my script. The cause of the error escaped me, pushing me into a cycle of tension, self-loathing, and keyboard smashing. The cause of &hellip; <a href=\"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/2015\/10\/21\/on-learning-to-code\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">On learning to Code&#8230;<\/span><\/a><\/p>\n","protected":false},"author":5886,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[188686,1],"tags":[215839,135655,636094,208832,148762,712761,712793],"class_list":["post-393","post","type-post","status-publish","format-standard","hentry","category-current-projects","category-uncategorized","tag-amanda-holdman","tag-coding","tag-harbor-porpoise","tag-matlab","tag-oregon-coast","tag-r","tag-tidal-cycle"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5Mfqy-6l","_links":{"self":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/posts\/393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/users\/5886"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/comments?post=393"}],"version-history":[{"count":1,"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/posts\/393\/revisions"}],"predecessor-version":[{"id":395,"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/posts\/393\/revisions\/395"}],"wp:attachment":[{"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/media?parent=393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/categories?post=393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.blogs.oregonstate.edu\/gemmlab\/wp-json\/wp\/v2\/tags?post=393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}