Module 1: Setting Up Your Computer#

Overview#

Before we begin programming in Python, we need to understand how our computers work and how to configure them for scientific computing.

In this module, we will explore the basic architecture of a computer, the role of the operating system, and how programs interact with files, memory, and other system resources. We will compare Windows, macOS, and Linux, and learn why command-line tools and Unix-like computing environments are widely used in scientific research.

We will then configure our computers for scientific programming by installing and managing Python environments with Miniconda and using JupyterLab to create and execute notebooks. Finally, we will explore how to organize computational projects and use Git and GitHub to manage, preserve, and share our work.

By the end of this module, you should have a functioning scientific Python environment and an understanding of how its components work together.

Module Contents#

1.1 Understanding Your Computer and Operating System#

Explore the basic components of a computer, including the operating system, memory, files, programs, and processes. Compare Windows, macOS, and Linux, and learn what terminals and shells do.

Goal: Understand your computer’s architecture before making changes to its software configuration.

1.2 Setting Up a Unix-Like Computing Environment#

Establish a common command-line environment for scientific computing. Windows users will install Windows Subsystem for Linux (WSL 2) and Ubuntu, while macOS users will work with their existing Unix-based environment.

Practice basic terminal commands such as pwd, ls, cd, and mkdir, and learn to navigate directories using file paths.

Goal: Develop a common command-line workflow across operating systems.

1.3 Installing Miniconda and Managing Python Environments#

Install Miniconda and learn how Python environments and package managers work. Distinguish among the system Python installation, Conda’s base environment, and the Python installations associated with individual projects.

Goal: Understand how Python environments isolate software dependencies and determine which Python interpreter executes your code.

1.4 Installing and Using JupyterLab#

Create a dedicated JupyterLab environment (jbenv), install and launch JupyterLab, and learn to create and execute Jupyter notebooks.

Explore the relationships among the JupyterLab server, notebook files, kernels, and Python environments.

Goal: Run scientific Python code in a controlled, interactive computing environment.

1.5 Files, Directories, and Computational Reproducibility#

Learn to organize scientific computing projects using directory structures, relative and absolute file paths, and consistent file-naming conventions.

Explore how data are loaded into memory, processed, and saved, and why documenting software dependencies is essential for reproducible research.

Goal: Organize, document, and preserve computational work so it can be reproduced.

1.6 Git and GitHub#

Introduce version control and learn how Git records changes to files and how GitHub facilitates collaboration and sharing.

Explore repositories, commits, and the relationship between local files and remote repositories. Practice managing a scientific computing project with Git and GitHub.

Goal: Develop reproducible and shareable scientific computing workflows.

Getting Started#

Begin with 1.1 Understanding Your Computer and Operating System using the navigation menu on the left.

The lessons build upon one another, so you should work through them in order. By the end of the module, you will have the computing tools needed for the programming and data analysis activities in the remainder of this course.