Scientific Computing ‐ Step 1: Learning to Program - cogcommscience-lab/lab-docs GitHub Wiki
Step 1: Preparation (1 Hour):
Before starting the training, you’ll need to set up your computer. Follow the instructions that match your operating system:
- Mac Users:
- Change your default terminal language to Bash
- How to Change the Default Shell to Bash on macOS
- Why? Bash is the shell we’ll use to run commands in the terminal. This ensures everything works as expected.
- Windows Users:
- Install Windows Subsystem for Linux (WSL), keeping the default Ubuntu settings
- How to install Linux on Windows with WSL
- Why? This creates a Linux-like environment where you can run Bash commands, just like on a Mac
- Everyone:
- Install Anaconda
- Anaconda Installation Instructions
- Follow all steps, including verifying the installation with
shasum
. If you get stuck, this page has helpful videos: - Why? Anaconda makes it easy to manage Python and install the tools we’ll use
- Once these steps are done, bookmark this resource for later:
- Install Anaconda
Step 2: Training (~18 hours total):
Now for the fun part! These self-paced lessons will introduce you to the basics of Bash and Python programming. Please complete these trainings in the order listed below, remembering that each training is self-paced and has multiple spots where you can pause and return later.
- The Unix Shell (~2 hours):
- The Unix Shell Training
- Why? This will teach you how to navigate and manage files using the command line—a key skill for working with fMRI data
- Programming with Python (~8 hours):
- Programming with Python Training
- Why? Python is the primary language we’ll use for data analysis. Focus on running the examples in Jupyter Notebook, learning to open it from the terminal
- Plotting and Programming in Python (~8 hours):
- Plotting and Programming in Python
- Why? This builds on the Python basics and introduces data visualization, which is essential for analyzing and presenting fMRI data
- File Permissions in Uni (~15 minutes):
- Linux file permissions explained
- Why? File permissions are core to the security model used by Linux systems. They determine who can access files and directories on a system and how. If you don't know how they work, you will not be able to work with files in a scientific computing environment.
Helpful Tips:
- Take Your Time: The time estimates are just guides—don’t worry if it takes longer. This isn’t about getting it perfect, just building a solid starting foundation.
- Feel Stuck? That’s completely normal when learning to program! If you run into issues, email me, or try Googling—it’s a skill you’ll use often. You can also ask ChatGPT to explain how code works. It's really good at that!
- What’s Next? Start with the preparation steps in the order listed. Once those are done, move on to ''The Unix Shell'' training.
Why this Matters:
This training will set you up for success in many aspects of the lab where we work on neuroimaging and/or behavioral data. Learning Bash and Python will help you access and analyze data effectively. These skills will also be a huge asset for your ongoing future projects.