University of Waterloo

Engineering 6 room 4022, 200 University Ave, Waterloo
March 21-22, 2015
9:00 am - 4:30 pm
Register for the Event

General Information

Software Carpentry's mission is to help scientists and engineers become more productive by teaching them basic skills for computing like program design, version control, data management, and task automation. This two-day hands-on bootcamp will cover basic concepts and tools with a focus on scientific computing for first-year graduate students. Participants will be encouraged to help one another and to apply what they have learned to their own research problems.

Instructors: Nasser M Abukhdeir, Pawel Pomorski, Albert O'Connor

Helpers: WatPy, SHARCNET

Who: The course is aimed at incoming graduate students who wants to learn basic program skills, Python and scientific computing.

Where: Engineering 6 room 4022, 200 University Ave, Waterloo. Get directions with OpenStreetMap or Google Maps.

Requirements: Participants must bring a laptop with a few specific software packages installed (listed below).

Contact: Please mail nmabukhdeir@uwaterloo.ca for more information.


Lunch and Coffee are provided.

Schedule

Day 1

09:00 Automating tasks with the Unix shell
10:30 Coffee break
10:45Intro to Source Control
12:00 Lunch break
13:00 Intro to Python
14:30 Coffee break
14:45 Coding Practice
16:00 Wrap up

Day 2

09:00 Numpy
10:30 Coffee break
10:45Numpy
12:00 Lunch break
13:00 Plotting with PyLab
14:30 Coffee break
14:45 Practice Problem Session
16:00 Wrap up

Syllabus

The Unix Shell

Course Materials
  • Files and directories: pwd, cd, ls, mkdir, ...
  • History and tab completion
  • Pipes and redirection
  • Looping over files
  • Creating and running shell scripts
  • Finding things: grep, find, ...
  • Reference...

Programming in Python

Course Materials
  • Using libraries
  • Working with arrays
  • Reading and plotting data
  • Creating and using functions
  • Loops and conditionals: for, if, else, ...
  • Defensive programming
  • Using Python from the command line
  • Reference...

Version Control with Mercurial

Course Materials
  • Version control for text based files
  • Creating a repository
  • Recording changes to files: add, commit, ...
  • Viewing changes: status, diff, ...
  • Ignoring files
  • Working on the web: clone, pull, push, ...
  • Resolving conflicts
  • Open licenses
  • Where to host work, and why

NumPy and SciPy

Download Notebooks
  • Using Python for numeric computation

Setup

To participate in a Software Carpentry bootcamp, you will need working copies of the software described below. Please make sure to install everything (or at least to download the installers) before the start of your bootcamp.

Overview

Editor

When you're writing code, it's nice to have a text editor that is optimized for writing code, with features like automatic color-coding of key words. The default text editor on Mac OS X and Linux is usually set to Vim, which is not famous for being intuitive. if you accidentally find yourself stuck in it, try typing the escape key, followed by ':q!' (colon, lower-case 'q', exclamation mark), then hitting Return to return to the shell.

There are many cross platform options, such as Sublime Text or Atom. If you don't have a preference, we recommend Komodo Edit for Python. Komodo Edit is free, although they do sell an upgraded version called Komodo IDE.

The Bash Shell

Bash is a commonly-used shell. Using a shell gives you more power to do more tasks more quickly with your computer.

Mercurial

Mercurial is a state-of-the-art version control system. It lets you track who made changes to what when and has options for easily updating a shared or public version of your code on bitbucket.org.

Python

Python is becoming very popular in scientific computing, and it's a great language for teaching general programming concepts due to its easy-to-read syntax. We teach with Python the latest version 3.4.x.

If you just want to learn Python and aren't interested in NumPy, you can install Python for your system directly from python.org or use your system Python if it is 3.4 (try running python3 on your command line). If your goal is scientific computing, individually installing all the scientific packages for Python can be a bit difficult, so we recommend an all-in-one installer.

Windows

Python

Bash and Mercurial

Download and install Cygwin. During the installation process, at the "Choose A Download Site" stage specify the UW mirror: http://mirror.csclub.uwaterloo.ca/cygwin/ in the "User URL" box, then click "Add", then select the newly added mirror before clicking "Next". During the "Select Packages" stage search/install the mercurial package located under Python, as well as the nano package located under Editors. In both cases click the "Skip" button to enable installation .

Mac OS X

Bash

The default shell in all versions of Mac OS X is bash, so there is no need to install anything extra. You access bash from the Terminal (found in /Applications/Utilities). You may want to keep Terminal in your dock for this workshop.

Mercurial

Download a binary installer for Mercurial which matches your Mac OS X version.

Python

Linux

Bash

The default shell is usually bash, but if your machine is set up differently you can run it by opening a terminal and typing bash. There is no need to install anything.

Mercurial

If Mercurial is not already available on your machine (type hg in a shell) then install it using your distro's package manager (e.g. apt-get install mercurial).

Editor

A useful general purpose editor such as gedit should already be installed as part of your Linux distribution.

Python

Python should be installed on your machine by default, but you will need to install Python packages for the numerical part of the workshop. Download and install Anaconda full installer. Make sure you are downloading the 3.4 version not the 2.7 version.