Getting started#

This first tutorial builds on three key tools

  1. terminal

  2. text editor

  3. version control software (here, git)

Nowadays, they often come integrated into a single piece of software, but in the following I will consider them as individual entities.

At the end of the tutorial, you should be able to write collaboratively a research document with a colleague of yours using =git=. The research document will be built using this Sphinx template, which renders reStructuredText or markdown documents as a nice web page.

Terminal#

Interaction:

  • Tab is your best friend!

  • Type commands at the speed of thought with ctrl+R

  • Chain commands with &&

  • Use emacs shortcuts:

    • ctrl-K to cut, ctrl-Y to paste

    • ctrl-A to jump at beginning, ctrl-E to jump at the end

Goodies:

  • Jump to the previous directory with cd -

  • Select texts in a rectangle

    • Linux: Ctrl and mouse select

    • WSL: Alt and mouse select

    • MacOS: Option and mouse select

Environment:

  • Get control of your environment with ~/.bashrc

  • Customize your prompt

Editors#

  • Goals:

    1. note taking / todo lists

    2. writing research documents, scientific articles (cf. collaborative editors)

    3. code development (cf. IDEs)

    4. handle projects’ workflow (cf. notebooks)

  • General purpose editors: emacs (since 1976), vim (since 1976, through 1991), …

  • Code editors (IDEs): VS code (since 2015), atom (2014-2022), sublime (since 2008), Xcode (since 2003), …

  • Notebooks and literate programming: Jupyter (since 2015), org-mode (since 2003), …

  • Collaborative editing: gxxgle docs, etherpad (since 2008), sharelatex (2013-2017), overleaf (since 2014) …

Before we start…#

  • What kind of computational science project are you working on?

  • Have you used git before?

Name

Project

git

Giuseppe

Astrophysics, simulations

yes

Riccardo

Experimental ultracold atoms, data analysis

no

Nicolas

Condensed matter physics simulations

yes

Marco

Computational chemistry

yes

Sebastiano

Astrophysics, simulations

~no

Mitra

Condensed matter physics simulations

no

Walter

Condensed matter physics, DFT

no

Tommaso

Quantum technologies, data analysis

no