{"id":5324,"date":"2014-01-28T17:08:24","date_gmt":"2014-01-28T16:08:24","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=5324"},"modified":"2014-01-28T17:14:33","modified_gmt":"2014-01-28T16:14:33","slug":"first-ever-matlab-based-software-carpentry-boot-camp","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=5324","title":{"rendered":"First ever MATLAB-based Software Carpentry boot camp"},"content":{"rendered":"<p><strong>What is Software Carpentry?<\/strong><\/p>\n<p><a href=\"http:\/\/software-carpentry.org\/bootcamps\/\">Software Carpentry boot-camps<\/a> aim to ensure that researchers have a working knowledge of several useful technologies from \u00a0the world of software development. \u00a0Concepts such as <a href=\"http:\/\/en.wikipedia.org\/wiki\/Revision_control\">version control<\/a>, <a href=\"http:\/\/en.wikipedia.org\/wiki\/Unit_testing\">unit-testing<\/a>, <a href=\"http:\/\/en.wikipedia.org\/wiki\/Scripting_language\">task-automation<\/a>\u00a0and\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/Modular_programming\">modular programming<\/a>\u00a0 are bread and butter to full time software-developers but are often completely unknown to many researchers; researchers who are nevertheless expected to develop computer code as part of their research output.<\/p>\n<p>An in-depth education in all of these technologies can take a lot of time; time that many researchers simply can&#8217;t spare. Fortunately, however, it is possible to learn just enough to completely transform the quality of your workflow in a relatively short amount of time. \u00a0Software Carpentry boot camps aim to lay the foundations in around two days.<\/p>\n<p><strong>Software Carpentry&#8230;but in MATLAB<\/strong><\/p>\n<p>Traditionally, these bootcamps are taught using open-source languages such as <a href=\"http:\/\/www.python.org\/\">Python<\/a> or <a href=\"http:\/\/www.r-project.org\/\">R<\/a> but many proprietary\u00a0languages are also used in academia such as \u00a0MATLAB, IDL, Mathematica and Maple to name but a few. In the most recent version of MATLAB, Mathworks <a href=\"http:\/\/www.mathworks.co.uk\/help\/matlab\/matlab-unit-test-framework.html\">introduced a unit testing framework<\/a> and so now seemed like a good time to try out Software Carpentry in MATLAB.<\/p>\n<p>On Tuesday 14th January I hosted the first ever <a href=\"http:\/\/software-carpentry.org\/blog\/2014\/01\/feedback-manchester-matlab-bootcamp.html\">MATLAB-based Software Carpentry bootcamp<\/a> in conjunction with <a href=\"http:\/\/www.software.ac.uk\/\">The Software Sustainability Institute<\/a> (of which I am a <a href=\"http:\/\/software.ac.uk\/fellows\/mike-croucher\">2013 fellow<\/a>) and <a href=\"http:\/\/www.mathworks.co.uk\/\">Mathworks<\/a>. Held at <a href=\"http:\/\/www.manchester.ac.uk\/\">The University of Manchester<\/a>, this two-day event gave free software development instruction to researchers from a wide variety of disciplines and, if the feedback forms are to be believed, was a resounding success.<\/p>\n<p>Shoaib Sufi and Aleksandra Pawlik of the Software Sustainability Institute taught material on bash shell scripting and git version control respectively with Ken Deeley of Mathworks providing MATLAB instruction. \u00a0I, along with Mathworks&#8217; Jos Martin and Juan Martinez, acted as the less-than-glamourous but ever-helpful classroom assistants.<\/p>\n<p><strong>Fun and games with BYOD &#8211; Licensing<\/strong><\/p>\n<p>For the decade or so that I&#8217;ve been teaching programming, I&#8217;ve done so in fully equipped teaching labs containing row upon row of identical computers where each have all the required software pre-installed. \u00a0For this event, we decided to try a Bring Your Own Device (BYOD) approach..i.e. students bring their own, personal laptops and we provided a list of required software that needed to be installed for the event. \u00a0Since Manchester&#8217;s MATLAB site license is network-based only and does not allow students to install on personally owned equipment, Mathworks kindly supplied standalone trial licenses for all course attendees.<\/p>\n<p>BYOD has a number of benefits for the student and, in my mind at least, the most important of these benefits is that students are left with a fully working development environment after the course. \u00a0This means that they can start applying their new skills immediately after leaving the course which hopefully leads to them being used &#8216;in anger&#8217; on their research projects. \u00a0Since the students were only supplied with trial licenses, this was not to be the case with MATLAB. \u00a0They will have to switch to using their on-campus machines or purchase their own copy of &#8216;standalone&#8217; MATLAB in order to continue working.<\/p>\n<p>Availability of software is not something that usually concerns an organiser of a Software Carpentry boot camp since the likes of Python and R are available everywhere for free. \u00a0When using a proprietary language such as MATLAB, however, it&#8217;s very much of an issue and I&#8217;d advise any future organiser of a MATLAB boot camp to carefully consider this before proceeding. \u00a0Of course this isn&#8217;t just true of MATLAB, it&#8217;s true of any proprietary language one may choose. \u00a0It will also be less of a problem if your institution has an all you can eat, &#8216;Total Academic Headcount&#8217; \u00a0unlimited site license.<\/p>\n<p><strong>Fun and games with BYOD &#8211; switches and glitches<\/strong><\/p>\n<p>All three major desktop operating systems were represented in the laptops of the 20 or so students &#8212; something that occasionally made for fun times. \u00a0Here is a list of some of the minor issues that arose over the two days<\/p>\n<ul>\n<li>Teaching bash scripting to Windows users always makes me wince a little. \u00a0Environments such as <a href=\"http:\/\/www.cygwin.com\/\">Cygwin<\/a>\u00a0and git bash are great and a little bit of bash never hurt anyone but I can&#8217;t help but wonder if we should be teaching a native scripting language instead such as <a href=\"http:\/\/en.wikipedia.org\/wiki\/Windows_PowerShell\">PowerShell<\/a>. \u00a0After all, Linux users would be surprised if they came to a scripting seminar and we made them use <a href=\"http:\/\/pash.sourceforge.net\/\">pash<\/a>! \u00a0Of course, if the student ever gets access to a HPC system, it is highly probable that it will be running some variant of Linux and so perhaps everyone should learn at least a little bash.<\/li>\n<li>One Mac user had some fancy graphical overlay program which jazzed up his desktop. \u00a0Looked great but it turned out that it sometimes caused MATLAB to crash.<\/li>\n<li>Some of the MATLAB commands that interacted with the file system worked slightly differently across the three operating systems&#8230;something we hadn&#8217;t appreciated ahead of time. This caused delays while we figured out a platform-independent way to proceed.<\/li>\n<li>Some of the Linux machines exposed a <a href=\"http:\/\/www.mathworks.com\/support\/bugreports\/961964\">bug in TLS (thread local storage) in Intel&#8217;s MKL<\/a>\u00a0which caused errors in MATLAB.<\/li>\n<li>MATLAB&#8217;s keyboard shortcuts are different across operating systems. \u00a0It is possible to change the behaviour but MATLABers who&#8217;ve been around a while didn&#8217;t want to. This sometimes led to confusion if the instructor mentioned an explicit keyboard shortcut that happens to be different on the students machine.<\/li>\n<\/ul>\n<p>None of these issues were particularly major but the need to consider and resolve them did take up the time of instructors and demonstrators. \u00a0In a lab-setting, this extra work would not be necessary. \u00a0Obviously we&#8217;ll fix some of the above issues in the next iteration of the course but I believe that BYOD sessions will always require a higher number of demonstrators\/glamorous assistants than more traditional lab-sessions simply because of the inevitable\u00a0variation of software and hardware.<\/p>\n<p><strong>No toolboxes&#8230;.almost!<\/strong><\/p>\n<p>I can see my Mathworks friends rolling their eyes already but I have to get this off my chest. \u00a0Regular readers of this blog will know that I have got some issues with Mathworks&#8217; toolbox system in MATLAB. \u00a0I *really* wanted a software carpentry course that only included pure MATLAB&#8211;no toolboxes at all. \u00a0In the event, we decided on a set of \u00a0course materials that required the use of the statistics toolbox because it made certain things so much easier.<\/p>\n<p>For example, MATLAB uses <a href=\"http:\/\/en.wikipedia.org\/wiki\/NaN\">NaNs<\/a> to <a href=\"http:\/\/www.mathworks.co.uk\/help\/matlab\/data_analysis\/missing-data.html\">represent missing data<\/a> &#8212; a design choice that quickly leads to the desire for functions such as <a href=\"http:\/\/www.mathworks.co.uk\/help\/stats\/nanmean.html\">nanmean<\/a> and <a href=\"http:\/\/www.mathworks.co.uk\/help\/stats\/nanmean.html\">nanmedian<\/a>. \u00a0Unfortunately, despite their simplicity, these functions are in the statistics toolbox and so using them leads to less accessible software (since your users need to have that extra toolbox). \u00a0Of course you could code up your own versions, or <a href=\"http:\/\/biosig-consulting.com\/matlab\/NaN\/\">use free implementations<\/a> easily enough but then you are not using idiomatic MATLAB. \u00a0All very frustrating. \u00a0This wasn&#8217;t the only reason why we added the statistics toolbox to the list of requirements of course but hopefully makes my point.<\/p>\n<p>OK, moan over, I&#8217;m done&#8230;.for now.<\/p>\n<p><strong>Course Material<\/strong><\/p>\n<p>The main course page is at\u00a0<a href=\"http:\/\/apawlik.github.io\/2014-01-14-manchester\/\">http:\/\/apawlik.github.io\/2014-01-14-manchester\/<\/a>\u00a0and the course material for <a href=\"http:\/\/apawlik.github.io\/2014-01-14-manchester\/lessons\/man\/version-control.html\">version control using git<\/a> and <a href=\"https:\/\/github.com\/apawlik\/2014-01-14-manchester\/blob\/master\/shell\/README.md\">shell scripting using\u00a0bash<\/a> are already available. \u00a0We hope to have the MATLAB material (which was developed by Mathworks) available in the near future once we&#8217;ve sorted out some legal issues.<\/p>\n<p>The tutorials were very interactive with the instructors demonstrating commands while students followed along on their own machines&#8211;barely a slide to be seen, just how I like it. \u00a0There were regular exercises with a high ratio of demonstrators to students. \u00a0This was very much a hands-on course which, in my opinion, is the best way to learn programming.<\/p>\n<p>One of the advantages of instructor-led courses is that students can go off-piste if they wish and learn all sorts of extra material. One student, for example, asked senior Mathworks developer, Jos Martin, for a quick code-review of her research simulation at the end of the first day. \u00a0Listening to Jos&#8217; critique of the code was instructive for several of us. \u00a0Jos is also the lead developer of MATLAB&#8217;s parallel computing toolbox &#8212; something I took advantage of by asking him questions relevant to a code-optimization project I&#8217;m currently working on.<\/p>\n<p>It&#8217;s very difficult to replicate this kind of interaction in online courses!<\/p>\n<p><strong>Useful teaching technology<\/strong><\/p>\n<p>The instructors used a couple of pieces of software that I believe significantly enhanced the teaching experience and I plan to use them in future courses of my own.<\/p>\n<ul>\n<li><a style=\"line-height: 13px;\" href=\"http:\/\/technet.microsoft.com\/en-gb\/sysinternals\/bb897434.aspx\">ZoomIt<\/a><span style=\"line-height: 13px;\">\u00a0&#8211; This is a free presentation tool that allows you to zoom into any area of the screen and\u00a0subsequently\u00a0annotate it. \u00a0This might not sound like much but it can really improve a presentation. \u00a0<a href=\"http:\/\/www.youtube.com\/watch?v=rwd47ezrkXM\">Here&#8217;s a video<\/a> of some of its functionality.<\/span><\/li>\n<li><a href=\"http:\/\/etherpad.org\/\">Etherpad<\/a> &#8211; Etherpad is a web based collaborative document editor which we used to post code snippets, links and anything else that anyone felt was useful on the day. We also used it as a chat room which was sometimes useful.<\/li>\n<li>PostIt notes &#8211; Very low tech but very effective. \u00a0Every student had red and green sticky notes. \u00a0If a student had no sticky note on the back of their laptop, it meant they were working and would prefer to be left alone. \u00a0Green means that they had completed the exercise and red (or in our case, orange) means &#8216;I want help&#8217;.<\/li>\n<\/ul>\n<p><strong>Feedback and the future<\/strong><\/p>\n<p>Both Mathworks and the Software Sustainability Institute asked students to fill out their own course feedback forms. \u00a0Since the students had had such a great experience, they were all happy to do so but whittling those two feedback forms down to one that satisfies both institutions is something we should definitely aim for! \u00a0The feedback was extremely positive with almost everyone agreeing that they had got a lot out of the course.<\/p>\n<p>Of course, it wasn&#8217;t perfect and there are several things we could do to make it better for next time:-<\/p>\n<ul>\n<li><span style=\"line-height: 13px;\">Some of the &#8216;Fun and Games with BYOD&#8217; described earlier could have been avoided by modifying the course material a little.<\/span><\/li>\n<li>The individual sections on bash, git and MATLAB were great but I felt that they needed to be tied together better. \u00a0They felt too much like self-contained mini-courses and it wouldn&#8217;t take much extra effort on our part to link them together a little more.<\/li>\n<li>The course was free and places were strictly limited. A couple of people cancelled less than 24 hours before the first day which didn&#8217;t give us enough time to offer the places out to others. Worse still, a few more people simply didn&#8217;t bother to turn up and didn&#8217;t offer any explanation. \u00a0I find that this often happens with free courses and I&#8217;ve yet to figure out a way to improve the situation.<\/li>\n<li>We need to get all of the course material on line!<\/li>\n<\/ul>\n<p>All told, the course was a great success and I hope to be running more of them in the future. A huge thanks to the instructors, Shoaib Sufi, Alexandra Pawlik and Ken Deeley who did the lion&#8217;s share of the hard work on the day but also to Mathworks&#8217; Jos Martin and Juan Martinez who did a great job of helping out students with the exercises, answering questions and generally ensuring that everything ran as smoothly as possible. \u00a0I&#8217;d also like to thank Mathworks&#8217; Stasi Revel and Tanya Morton who helped out with sorting out trial licenses and, finally, thanks to Software Carpentry&#8217;s Greg Wilson who gave support and advice in the weeks leading to the event.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Software Carpentry? Software Carpentry boot-camps aim to ensure that researchers have a working knowledge of several useful technologies from \u00a0the world of software development. \u00a0Concepts such as version control, unit-testing, task-automation\u00a0and\u00a0modular programming\u00a0 are bread and butter to full time software-developers but are often completely unknown to many researchers; researchers who are nevertheless expected [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"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},"jetpack_post_was_ever_published":false},"categories":[11],"tags":[],"class_list":["post-5324","post","type-post","status-publish","format-standard","hentry","category-matlab"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p3swhs-1nS","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/5324","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=5324"}],"version-history":[{"count":11,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/5324\/revisions"}],"predecessor-version":[{"id":5334,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/5324\/revisions\/5334"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}