UNIX Shell, Text Editing, Programming

UNIX Shell

The UNIX shell is going to become your best friend. You should learn how to use it effectively. The default shell on most Linux distributions is bash. The latest version of macOS (which is 10.15, Catalina, at time of writing) uses zsh, which is very similar to bash. You should poke around the internet to read about how they’re different.

Check out this tutorial to learn the basics of working in a shell. There are also many videos online to walk you through a lot of basics; this one is pretty thorough. Operating in a shell is an incredibly powerful way to use a computer. At least 95% of all HEP tasks are tackled via some kind of command line interface that requires using a UNIX shell.

If you’re on Windows it is highly suggested that you use Windows Subsystem for Linux.

Text Editor

To write software you’ll want to get comfortable with a text editor.

The short version: Learn GNU Emacs.

The long version: It’s very useful to be comfortable with either Emacs or Vim (or both!). These are very old text editors that are both very powerful and almost always installed on every UNIX machine that you’ll end up using. So when you have to ssh to another machine, it’s very useful to have some knowledge of one or both. A more “modern” (but less powerful) text editor (that has become very popular in recent years) is Visual Studio Code.

Please use your favorite search engine to learn more about your best options for text editors. People can get pretty religious about them, as you can probably tell from the “short version” :)

C++ and Python

The main programming languages used in HEP are C++ and Python. There are infinite resources online and countless books for learning these programming languages, so there is no point documenting the programming languages here. The best way to learn is to dive in and solve the problem you need to solve. Google is your friend. There are a number of people in the Duke ATLAS group who can probably answer most simple C++ and Python questions. Please do not hesitate to ask programming questions to anyone in the Duke ATLAS group.

For a good introduction to programming in C++ (put together by a high energy physicist), see these slides. Another great resource is the cppreference.com website. This is exactly what it claims to be: a reference. You won’t find any tutorials here; but you will find all of the features of the language and its standard library.

Real Python is a great resource for getting started with Python.