{"id":740,"date":"2009-09-23T21:59:29","date_gmt":"2009-09-23T21:59:29","guid":{"rendered":"http:\/\/occamstypewriter.org\/mindthegap\/2009\/09\/23\/in_which_i_become_a_macrobiologist_again\/"},"modified":"2009-09-23T21:59:29","modified_gmt":"2009-09-23T21:59:29","slug":"in_which_i_become_a_macrobiologist_again","status":"publish","type":"post","link":"https:\/\/occamstypewriter.org\/mindthegap\/2009\/09\/23\/in_which_i_become_a_macrobiologist_again\/","title":{"rendered":"In which I become a macrobiologist \u2013 again"},"content":{"rendered":"<p>Yes, I have finally surrendered to the inevitable. After seven days straight sitting at my desk welded to ImageJ, the public domain, Java-based image processing program, my chronic repetitive strain disorder is starting to seriously impair my ability to use a computer. (I&#8217;ve long since lost the battle with both a right- and left-handed mouse, so when even the trusty tappable trackpad starts to hurt me, I know I&#8217;m in trouble. It&#8217;s the computer equivalent of vancomycin-resistent tuberculosis.) ImageJ is free, and lovely, and damned good at turning even the most proprietary of evil corporate image formats into tiffs, but it&#8217;s very laborious and click-intensive to zap your photos into anything you&#8217;d feel proud exposing to your boss, let alone a referee or two.<\/p>\n<p>\nSo after a long day doing the same 27 actions over and over again, joints throbbing in protest, I started to think about making a macro. Now, we used to be able to sweet-talk our dearly departed French post-doc into crafting these for us, mostly I think because he enjoyed the challenge more than some of the things he had to do in the lab. When my bioinformaticist collaborator was visiting and I started complaining about my hands, he suggested we take a bash at one ourselves. Recording the 27 actions was the easy part \u2013 ImageJ is great for that; the difficult bit was working out how to ask the macro to visit every file in a given folder and, most importantly, to give the output file an intelligent name. I got some advice from our microscope guy, who suggested pillaging other pre-existing macros for ideas, which got me a long way. Then the bioinformaticist added a few more touches. But I couldn&#8217;t get the damned thing to run. I was quickly frightened off the few geeky forums I tried to scan \u2013 like most of that ilk, they seemed ludicrously scathing and quite happy to wipe the floor with any newbie who might have missed something while RTFMing. Finally, I showed it to <a href=\"http:\/\/network.nature.com\/people\/rpg\/blog\">Richard<\/a> and he immediately saw that I was missing a few braces at the end, thereby failing to close the subroutine. One hour later, while I was drinking tea in the common room, the brand-new, shiny macro had unpacked all 7000-odd tiffs, tidy as you like.<\/p>\n<p>\nFor want of a brace, the battle was almost lost. (Well, at least that&#8217;s what we Americans call them; the British prefer the lovely phrase \u201ccurly brackets\u201d.) And it all reminded me of how much I used to love programming. I&#8217;ve never been formally trained, but I taught myself a bit of C during a summer stint at the NIH in the Waste Management Services. Desperate to work in a lab but unable to secure a research position, I fell into a sort of weird troubleshooting internship, just doing whatever needed to be done at a moment&#8217;s notice. Looking back, it was one of the most interesting jobs I&#8217;ve ever had, for sheer variety. I remember having to learn how to program a bar-code reader, to set up and train people in an ingenious new toxic waste biosensor employing fluorescent micro-organisms, and essentially teaching myself C from the Kernighan and Ritchie bible so that I could set up a database of all the chemicals on campus and what you had to do to neutralize them in case of emergency. <\/p>\n<p>\nNot one day after my database was up and running in beta version, our WMS headquarters got the call: there&#8217;d been a massive chemical spill on campus, and the emergency services wanted to know what to do. I could hear sirens in the background, and everyone was staring at me. I asked someone to phone in the names of the chemicals, and I looked them up in my database and called the guys in moonsuits and told them what the recommended containing procedure was. <\/p>\n<p>\nDisaster averted, faster than you can type &#8216;grep&#8217;. Looking back, it seems ludicrous: did they really base their actions on the advice of a 20-year-old intern? It doesn&#8217;t seem possible, but that&#8217;s actually how it happened. Since then, I haven&#8217;t done any more programming, but having inspected my 7000 tiffs, and seeing immediately that each is going to need an additional 5 actions to make them perfect&#8230;well, brace yourselves.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yes, I have finally surrendered to the inevitable. After seven days straight sitting at my desk welded to ImageJ, the public domain, Java-based image processing program, my chronic repetitive strain disorder is starting to seriously impair my ability to use &hellip; <a href=\"https:\/\/occamstypewriter.org\/mindthegap\/2009\/09\/23\/in_which_i_become_a_macrobiologist_again\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-740","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/occamstypewriter.org\/mindthegap\/wp-json\/wp\/v2\/posts\/740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/occamstypewriter.org\/mindthegap\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/occamstypewriter.org\/mindthegap\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/occamstypewriter.org\/mindthegap\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/occamstypewriter.org\/mindthegap\/wp-json\/wp\/v2\/comments?post=740"}],"version-history":[{"count":0,"href":"https:\/\/occamstypewriter.org\/mindthegap\/wp-json\/wp\/v2\/posts\/740\/revisions"}],"wp:attachment":[{"href":"https:\/\/occamstypewriter.org\/mindthegap\/wp-json\/wp\/v2\/media?parent=740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/occamstypewriter.org\/mindthegap\/wp-json\/wp\/v2\/categories?post=740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/occamstypewriter.org\/mindthegap\/wp-json\/wp\/v2\/tags?post=740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}