{"id":6275,"date":"2017-01-12T16:00:03","date_gmt":"2017-01-12T15:00:03","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=6275"},"modified":"2017-01-12T16:01:36","modified_gmt":"2017-01-12T15:01:36","slug":"the-unreasonable-effectiveness-of-getting-your-code-to-run-on-someone-elses-machine","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=6275","title":{"rendered":"The unreasonable effectiveness of getting your code to run on someone else&#8217;s machine"},"content":{"rendered":"<p>If you are a researcher and are currently writing scripts or developing code then I have a suggestion for you. If you haven&#8217;t done it already, get yourself a willing volunteer and send them your code\/analysis\/simulation\/voodoo and ask them to run it on their machine to see what happens.\u00a0<strong>Bonus points are awarded for choosing someone who uses a different operating system from you!<\/strong><\/p>\n<p>This simple act is one of the things I recommend in my talk <a href=\"http:\/\/mikecroucher.github.io\/MLPM_talk\/\">Is Your Research Software Correct<\/a>\u00a0and it can often help improve both code and workflow.<\/p>\n<p>It quickly exposes patterns that are not good practice. For example, scattered references to &#8216;\/home\/walkingrandomly\/mydata.dat&#8217; suddenly don&#8217;t seem like a great idea when your code buddy is running windows. The &#8216;minimal tweaking&#8217; required to move your analysis from your machine to theirs starts to feel a lot less minimal as you get to the bottom of the second page of instructions.<\/p>\n<p><strong>Crashy McCrashFace<\/strong><\/p>\n<p>When I start working with someone new, the first thing I ask them to do is to provide access to their code and simple script called\u00a0<strong>runme\u00a0<\/strong>or similar that will build and run their code and spit out an answer that we agree is OK. Many projects stumble at this hurdle! Perhaps my compiler is different to theirs and objects to their abuse (or otherwise) of the standards or maybe they&#8217;ve forgotten to include vital dependencies or input data.<\/p>\n<p>Email ping-pong ensues as we attempt to get the latest version&#8230;zip files with names like PhD_code_ver1b_ForMike_withdata_fixed.zip get thrown about while everyone wonders where Bob is because he totally got it working on Windows back in 2009.<\/p>\n<p><strong>git clone<\/strong><\/p>\n<p>&#8216;Hey Mike, just clone the git repo and run the test suite. It should be fine because the latest continuous integration run didn&#8217;t throw up any issues. The benchmark code and data we&#8217;d like you to optimise is in the benchmarks folder along with the timings and results from our most recent tests. Ignore the papers folder, that just reproduces all of the results from our recent papers and links to Zenodo DOIs&#8217;<\/p>\n<p>&#8216;&#8230;&#8230;&#8230;&#8230;&#8217;<\/p>\n<p>&#8216;Are you OK Mike?&#8217;<\/p>\n<p>&#8216;I&#8217;m&#8230;..fine. Just have something in my eye&#8217;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are a researcher and are currently writing scripts or developing code then I have a suggestion for you. If you haven&#8217;t done it already, get yourself a willing volunteer and send them your code\/analysis\/simulation\/voodoo and ask them to run it on their machine to see what happens.\u00a0Bonus points are awarded for choosing someone [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":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":[7,80,67],"tags":[],"class_list":["post-6275","post","type-post","status-publish","format-standard","hentry","category-programming","category-rse","category-scientific-software"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-1Dd","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/6275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6275"}],"version-history":[{"count":3,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/6275\/revisions"}],"predecessor-version":[{"id":6285,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/6275\/revisions\/6285"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}