Feb 1st, 2017
9:00 am - 12:00 pm
Instructors: Lex Nederbragt, Anne Fouilloux
Helpers: Sabry Razick, Roza Berhanu Lemma
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.
For more information on what we teach and why, please see our paper "Best Practices for Scientific Computing".
This one-day Carpentry@UiO hands-on workshop will cover the Software Carpentry lesson on automating tasks on the Unix shell using Make. Make is a tool which can run commands to read files, process these files in some way, and write out the processed files. For example, in software development, Make is used to compile source code into executable programs or libraries. But, Make can also be used to:Who: The course is aimed at graduate students and other researchers. You don't need to have any previous knowledge of the tools that will be presented at the workshop. However, some previous experience with using the shell to list directories, create, copy, remove and list files and directories, and run simple scripts is necessary.
Where: Room 1259 (Abels utsikt), Niels Henrik Abels hus, Moltke Moes vei 35, 0851 Oslo.. Get directions with OpenStreetMap or Google Maps.
Requirements: Participants must bring a laptop with a Mac, Linux, or Windows operating sytem (not a tablet, Chromebook, etc.) that they have administrative privileges on. They should have a few specific software packages installed (listed below). They are also required to abide by Software Carpentry's Code of Conduct.
Accessibility: We are committed to making this workshop accessible to everybody. The workshop organisers have checked that:
Materials will be provided in advance of the workshop and large-print handouts are available if needed by notifying the organizers in advance. If we can help making learning easier for you (e.g. sign-language interpreters, lactation facilities) please get in touch and we will attempt to provide them.
Registration: Please register using this form.
Contact: Please mail contact-us@swcarpentry.uio.no for more information.
09:00 | Automation and Make part I |
10:30 | Coffee/tea break |
10:45 | Automation and Make part II |
12:00 | Wrap-up |
Etherpad: http://pad.software-carpentry.org/2017-02-01-make.
We will use this Etherpad for chatting, taking notes, and sharing URLs and bits of code.
To participate in this workshop, you will need access to the software described below. In addition, you will need an up-to-date web browser.
We maintain a list of common issues that occur during installation as a reference for instructors that may be useful on the Configuration Problems and Solutions wiki page.
Make sure you install, or have available, a text editor that you are comfortable with using. 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.
Bash is a commonly-used shell. Using a shell gives you more power to do more tasks more quickly with your computer.
Git 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 github.com.
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 version 2.7, since it is still the most widely used. Installing all the scientific packages for Python individually can be a bit difficult, so we recommend an all-in-one installer.
Originally invented to manage compilation of programs written in languages like C, Make can be used to automatically update any set of files that depend on another set of files. This makes it a good solution for many data analysis and data management problems. While there are many build tools now in existence (e.g. ANT and CMake) they share the same fundamental concepts as Make.
nano
is the editor installed by the Software Carpentry Installer,
it is a basic editor integrated into the lesson material.
Notepad++ is a popular free code editor for Windows. Be aware that you must add its installation directory to your system path in order to launch it from the command line (or have other tools like Git launch it for you). Please ask your instructor to help you do this.
Install Git for Windows by download and running the installer. This will provide you with both Git and Bash in the Git Bash program.
This installer requires an active internet connection
After installing Python and Git Bash:
NOTE: The Software Carpentry Windows installer installs Make. When using the installer, start at the 'To test:' part below.
Once you have installed Git Bash you can install Make by:
make.exe
from here
bin
directory where you installed Git
Bash e.g. C:\Program Files (x86)\Git\bin
.
make
, and press
Enter.
make: *** No targets specified and no makefile found. Stop.This means that Make was successfully installed. Otherwise, you'll see this error message:
bash: make: command not found
We recommend
Text Wrangler or
Sublime Text.
In a pinch, you can use nano
,
which should be pre-installed.
The default shell in all versions of Mac OS X is bash,
so no need to install anything. You access bash from
the Terminal (found
in /Applications/Utilities
). You may want
to keep Terminal in your dock for this workshop.
Install Git for Mac by downloading and running the installer. For older versions of OS X (10.5-10.7) use the most recent available installer available here. Use the Leopard installer for 10.5 and the Snow Leopard installer for 10.6-10.7.
For OS X, version 10.9 (Mavericks) or above, download the Command Line Tools by doing:
xcode-select --install
For more information, see the OSX Daily blog.
If you have an older OS X version and you do not already have access tomake
from within
your shell, you will need to install XCode (which is free, but
over a gigabyte to download).
Once XCode has installed:
You will now be able to run make
within your shell.
Kate is one option for Linux users.
In a pinch, you can use nano
,
which should be pre-installed.
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.
If Git is not already available on your machine you can try
to install it via your distro's package manager
(e.g. apt-get
or yum
).
We recommend the all-in-one scientific Python installer Anaconda. (Installation requires using the shell and if you aren't comfortable doing the installation yourself just download the installer and we'll help you at the workshop.)
bash Anaconda-and then press tab. The name of the file you just downloaded should appear.
yes
and press enter to approve
the license. Press enter to approve the default
location for the files. Type yes
and
press enter to prepend Anaconda to
your PATH
(this makes the Anaconda
distribution the default Python).
Make is a standard tool on Linux systems and should already be available.