CODING TUTORIALS

 

command line

What is the Command Line? A way of doing things on your computer (moving and manipulating files, running scripts, etc) by giving your computer typed commands rather than pointing and clicking. Here is a tutorial to help you get started. If you're using the command line to connect with the Cluster, this tutorial goes over useful commands you might need.

 

sublime text

What is Sublime Text? A sweet text editor favored by many programmers. If you have a Mac, your default text editor is TextEdit; on Windows, Notepad. These basic text editors aren't as functional or intuitive, as you can see visually below:

 

A snippet of code in TextEdit

The same snippet of code in Sublime

 

You can download Sublime Text here. Here's a short intro video that goes over the basics of Sublime, including some helpful keyboard shortcuts. Pro tip: CMD+CTRL+G highlights all instances of a selected region and edit them simultaneously - a huge time saver! (Just be careful to manually go through and make sure you WANT to change all instances, first!)

 

matlab

What is MATLAB? A programming language used most often in psychology to code task stimuli, like presenting images to participants and recording their responses. You can find an intro to MATLAB basics here

To code task stimuli, you'll need the package Psychtoolbox. Here's a great tutorial for learning Psychtoolbox.

 

R

What is R? A programming language often used for data analysis. R has many packages that streamline the process of data manipulation and visualization. If you're using R, you should also download RStudio, an integrated development environment (IDE) that makes it easy to write scripts, create markdown files and knit them to HTML, and generate graphs. This tutorial will walk you through the basics.

 

python

What is Python? A highly versatile programming language, used for many purposes from data collection to data analysis to stimulus optimization. A handy aspect of Python is that it can read code in MATLAB, R, and other languages. This tutorial will take you through Python basics.