© 2019, DISCnet            DISCnet is the Data Intensive Science Centre in SEPnet, and an STFC Centre for Doctoral Training;  a collaboration between

the Universities of Southampton, Sussex, Portsmouth, Queen Mary University of London, and Open University

linkedinlogo.png
slack-15-682088.png

Best Practices for Scientific Computing

Software Carpentry's mission is to help scientists and engineers get more research done in less time and with less pain by teaching them basic lab skills for scientific computing. This hands-on workshop will cover basic concepts and tools, including

 

  • building and designing programs in Python,

  • managing the development of code with version control in Git, and

  • testing the correctness of Python code using the Nose unit test framework.

 

Participants will be encouraged to help one another.

Day 1:

 

Automating tasks with the Unix shell

 The Unix shell is a power tool that allows you to do complex things with just few keystrokes by helping you in combining existing programs in new ways and automate repetitive tasks. This session guides you through the basics of file system and the shell and will start you on the path towards using powerful tools and computing resources. The following topics will be covered: Introducing the shell, Files and Directories, Creating things, Pipes and Filters, Loops, Shell Scripts and Finding Things

 

Python basics: Building Programs with Python

In this session, you'll learn good programming practices with an introduction to the fundamentals of Python. The following topics will be covered: Basics - e.g. Starting Python, using variables. Working with arrays and lists. Basic program control - loops and conditionals. Creating and using functions. Using libraries. Using Python from the command line. Reading and plotting data

 

Day 2:

 

Writing robust code and unit testing with Python 

Does the code developed by you work the way it should do? Can you (or others) verify these assertions for themselves? And perhaps most importantly, to what extent are you confident of the accuracy of results that appear in publications? This session will teach you techniques of developing robust code and good unit tests to improve the predictability of a change, make development more productive and produce code that works as expected and produces desired results. The following topics will be covered: Introduction to Nose testing framework. Writing and executing unit tests. Defensive programming. Handling exceptions. Test-Driven development

 

Version control with Git 

This session will teach you how to track and manage changes within your code, how to collaborate with other developers through a shared code repository, and generally improve the reproducibility of your research. The following topics will be covered: Creating and cloning repositories. Committing changes to files. Viewing changes. Working with remote repositories, e.g. through GitHub. Resolving conflicts

 

Learning & Teaching Resources / links / background reading:

Wilson et al 2014, PLoS Biol 12(1):”Best Practices for Scientific Computing”

http://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.1001745

 

Examples will be provided during the course

 

Prerequisites / Linked Modules:

Software prerequisites are listed here:

https://southampton-rsg.github.io/2017-11-08-southampton-swc/prerequisites.html

Please make sure you have all required software installed when arriving to the course

 

Approximate number of hours:

taught material + exercises + self-study: 15 hours