From Lupyan Lab
Jump to: navigation, search

Welcome to Psych 711 - Programming and Automation Techniques. Our mission is to teach you how to stop relying on point-and-click experiment packages and program your own experiments, script common tasks, organize your data, and in the process, become a better scientist. In Fall, 2015 we will be meeting on Wednesdays 9:00am-11:30am in Psych 634. The class is taught by Prof. Gary Lupyan (lab page), (lupyan _at_ wisc dot edu)).

Why Program?

Simply put, knowing how to program and how to automate common tasks will make your life (or at least your academic life) better. Much better. A programmatic approach will allow you to create experiments in hours that would take days or weeks of fiddling in point-and-click packages like Eprime. Programming your experiments will give you complete control overy every aspect of the procedure. You will never again need to worry about whether you can implement your experiment in some program. If you can think it, you can program it. A globally programmatic approach to behavioral research will also mean that you will never have to shuffle lists in Excel to create the proper counterbalancing or randomize things. You will never have to copy and paste data files, or <gasp> manually code (objective) responses. Changing the size of 1000 images or measuring the onset latency of a voice response becomes as simple as executing a little program, which at the end of the class, you will be able to write from scratch.

At the end of the class you'll be comfortable with creating full-blown experiments using Python and Psychopy. You will learn how to design experiments in a programmatic way (no pointing, no clicking) and be amazed with your increase in efficiency. In addition to coding experiments, by the end of the class you'll be on your way to doing all sorts of fancy schmancy things in Python and command-line tools (e.g., data massaging of all sorts, (basic) corpus linguistics, automatic image and audio processing, and collecting some data online. The world will be your oyster. Mmm, oysters.

Class philosophy

Programming, as taught by computer scientists, emphasizes lots of theory (pointers, O-notation) and abstract problem solving (sort algorithms, recursion, etc.). Although this is likely the best way to gain a deep understanding of computer science, we are betting that it is not the best way to teach applied programming skills in a short amount of time to non computer-scientists. In this class we'll be taking a more applied approach. Every exercise we do will introduce students to a skill directly relevant to solving problems commonly encountered in behavioral research. We'll learn some theory along the way, but the focus will be on practical how-to solutions. If you've never programmed before, you're in for an initially steep learning curve, but it will flatten out quickly, and your mind will be blown. If you have programmed before, you will appreciate the simplicity and elegance of Python compared to the the high overhead of more traditional languages like C and Java, the clunkiness of Matlab.

What now?

First, make sure you've joined the shared Box folder (check your email for the invite. If you don't see it, check the spam folder.). You'll also want to download the Box Sync client for Mac or PC.

Then, follow the download and install instructions.

For those of you using this site as a tutorial: you can simply copy/paste the code from the templates in the exercises. I have taken down the posted solutions in preparation for the Fall semester, but if you need a solution (or any code that's not posted), please email me (lupyan _at_ wisc dot edu).

Personal tools
Download and Install
Notes for each class - will be updated ~week before each class.
Programming Exercises
Quick reference