A12 Configuring Windows for scientific work

Description Get your Windows computer set up for scientific computing tasks.
Video intro >Software Carpentry Git Bash tutorial for Windows.
Reading >Software Carpentry set up material
Questions
Aalto

About Windows

Windows is perhaps the most common operating system for desktop computers, but historically hasn’t been that common or good for scientific work. However, this is changing and these days you can do a lot of good stuff with Windows if you set it up right. We’ll walk through it here.

Shell tools

The shell provides an interface to efficiently access the true power of a computer. Now we use it to install tools but it can be used for many other tasks too.

Windows comes with CMD (cmd.exe) known as command prompt. You can find CMD by typing cmd in your start menu search bar. A slightly better alternative would be a Git bash command line because Windows command prompt does not support many UNIX commands. Git Bash emulates a bash environment and lets you use all git features plus most of standard unix commands - so you are immediately compatible with Mac and Linux.

See the next section for installation instructions.

Version control (git)

Using version control is like an insurance for your projects. It is not only about tracking changes but also to improve your project visibility and make it easier to collaborate.

To install Git Bash, follow this tutorial made by Software Carpentry. You only need to follow the video instructions for Git Bash (until 2:50) because the newest versions of Git Bash should install the needed *nix environment tools automatically.

Please note that the Git setup window will ask you to choose your default text editor and it will first suggest vi/vim. However, we do not recommend vi/vim for your first command line editor but rather to change it to nano text editor, which is more easier for a beginner to use.

After you are all set up, open your Git Bash and try it out by typing for example: nano and git --version

Links:

Your organization might provide you access to some other repository manager than GitHub but since GitHub is a higher availablity solution, it does not hurt to create an account there. You can sign up for Github here

Anaconda (Python)

In software development there are some standard packages that are useful to have without the trouble of installing them separately with their dependencies.

There are very many programming languages, and you probably won’t only use Python. But, it is quite common so we mention it here. We install the Anaconda distribution of Python: it gets you all the basic things you need, and can also install R and other programming languages, too. Anaconda is large and has all the most common tools people need - if you want to save space, install Miniconda instead (then you have to decide what extra packages you want).

Copy other information from https://coderefinery.github.io/installation/python/

Anaconda allows you to manage your development environment which is good since you can have different environments dedicated to their designated purposes.

Todo

We need to give details about how to use it.

Editor

For IDE (Integrated development environment): Visual Studio Code by Microsoft is a free source code editor. It offers customizable functionalities for a more advanced user but is simple enough for a beginner to start with. Install and learn more here.

Other good alternative for Windows is Notepad++ source code and text editor. Notepad++ is not exactly an IDE as it lacks features that IDEs have but plugins are available to add functionalities. Download and read more here.

Jupyter

Jupyter is an interactive way to explore data. It can be used to add code, output, titles, text and visualisations into one document. It’s already installed along with Anaconda. To start it in a certain directory, go to that directory in the shell and run:

$ jupyter notebook       # older notebook interface
$ jupyter lab            # newer JupyterLab interface

Follow this to install useful extensions to your environment. Especially ipywidgets are needed if you continue to do exercises.

Other programming tools

For remote network tools: MobaXterm

If you wish to obtain credits from the course, you might need

  • NumPy
  • Matplotlib

to complete exercises. These libraries are pre-installed with Anaconda installation. Further information about installations can be found here: NumPy and Matplotlib