This class is designed to teach you the joys and the fundamentals of computer programming. Programming is more than learning a particular language, it is about problem solving, and problem solving is a universal skill . There is a misconception in Psychology that you don’t need to know how to program– programming is for computer science kids, or the other “hard sciences” (whatever that means). The sad truth is that most Psychology students who go on to grad school (and other careers) realize too late that programming is a necessary part of their day-to-day work. The result is that most Psychology graduate students spend at least their first year teaching themselves to program (go ahead, ask your GTFs!). This class will help you avoid this trap, and will give you an edge when applying to graduate school or virtually any other career path. It turns out that computers are pretty important, you can find them everywhere. This means that wherever you go, the ability to automate your work on a computer is a valuable skill–  if you’re competing against other people who don’t have that skill, that will be to your advantage.

Besides these practical reasons, programming is fun (I promise!).  There is a special satisfaction you get from taking a problem that was once tedious, time-consuming, or impossible, and finding a solution that solves it quickly and effortlessly. My hope is that you experience this by the end of the term.

xkcd_pythonThe emphasis will be on teaching you the principles of programming, and these principles will be common to most languages. However,it helps to start with just one language to get your feet wet. We will be using the Python programming language (www.python.org) for several reasons. First, it is rapidly becoming the de facto official programming language across the sciences. Also, it is completely free– this is very different from other languages like Matlab, where universities have to fork over piles of money in licensing fees. Lastly, Python has a very clean syntax, and it actually forces you to write clean, elegant code in a way that other languages do not. Python is a vast and flexible language, and you will not necessarily walk away from this class a Python master. The intention is that you know enough fundamentals to teach yourself the rest. Or, you may end up somewhere that requires you to learn a different language. Don’t fret, the skills you learn here will easily transfer to other languages like Matlab, R, javascript, PHP, and many others.

This class is catered towards students in Psychology and (Cognitive) Neuroscience, and the problems we encounter will be geared towards the ones encountered in these fields. This includes cleaning, analyzing, and visualizing the types of data we encounter, like reaction times, questionnaires, videos, fMRI, brainwaves (EEG), and eyetracking. We will also learn a bit about building experiments for collecting the data to begin with (using PsychoPy), as well as pulling data from the internet (e.g., Twitter).

Everything will be taught in the SSIL computer lab in 442 McKenzie Hall, but those who want to set up their own laptops are encouraged to bring them. I will not assume that you have any programming experience, but basic computing skills will be helpful. The class should be beneficial both to complete newcomers and those with some experience who just want to learn Python. So, whether you just want to make some nice plots, or hack into the mainframe you should get something out of this class.