Why every (psychology) student should learn to code

Why should you, as a psychology student, or indeed any other kind of student, need to learn computer programming? My position on this is that the basics of computer programming should be taught to everyone, preferably in schools, at a young age. I think the benefits of this could be enormous – programming (just like learning any other language) expands the mind, and teaches you to think in new ways. In particular programming languages force the user to think algorithmically, and by their very nature instantiate the basics of formal logic. Unfortunately, a recent report by the Royal Society (Guardian write-up here) has highlighted the deficiencies in the UK’s teaching of IT in schools; despite the best computer:student ratio in primary schools in Europe, there is a massive lack of well-qualified and competent teachers. This is somewhat understandable; a competent programmer can easily make much more money actually being a programmer than teaching kids. It’s difficult to know how to effectively address this issue, but it would definitely be a shame if the UK starts to fall behind in its computer industry because of a lack of quality teaching staff.

So, assuming you didn’t learn to program at school, and you’re now a university student, why should you learn now? Wouldn’t it be better to spend your time learning the material you need to know for whatever course you’re doing, than learning some kind of esoteric skill that you might not ever need? The answer, is, emphatically, no. Programming is about as essential a skill as it’s possible to conceive of. As the world moves towards a knowledge and tech-based economy a lot of traditional skills are becoming more and more automated. Vast industries have been created in the last 20 years, focussed around building the systems which make this transition possible – and that means coding.

I’m a psychologist (kind of) and so I naturally come at this issue from that angle, but I’m convinced that what I’m saying here applies to pretty much any discipline – even the more liberal-arts end of the spectrum. In psychology research though, almost everyone I know has at least some programming knowledge. Of course it ranges from the relatively simple (using SPSS psuedo-code to perform automated analyses) up to full-scale application development, but everyone needs to know something.

Students that are graduating now are having a really hard time finding graduate-level jobs, or even any job at all. Anything extra you can put on your CV will help, and will help to distinguish you from the faceless hordes of other recent graduates. Specifically:

1. If you want to carry on in universities as a graduate student (i.e. do a Masters or a PhD) in psychology or some related discipline then coding is damn-near essential. Just like the job market, the  number of PhD positions available has dwindled in recent years, and potential PhD supervisors are looking primarily for students who can come in, and get started right away doing some good-quality research. If I was looking for a PhD student, then excellent computer skills and some experience of programming would be top of my list of criteria. Almost all research is computer-based in some way these days, and I wouldn’t want to spend my time as a supervisor teaching somebody the very basics. This might seem strange to undergraduates who spend their time learning the details of theories and past empirical research in order to pass their exams, but research skills are so much more important than knowledge of a particular subject area. I see so many PhD students in psychology departments who aren’t that computer literate, and who have to depend on others (often over-worked support staff) to program their experiments for them. This wastes time (sometimes months) while you’re waiting for the code to be written, and you also perhaps end up with something that’s not quite exactly what you wanted – if you learn to do it yourself you can be more efficient and do higher-quality research as well. All this is doubly true if you’re focussed on doing research in the more neuroscience/biological psychology fields – a prospective neuroscience researcher who’s not comfortable with getting their hands dirty with coding will fail. Simple as that.

2. If you want some other kind of white-collar (for want of a better term) job, then I would argue that learning to program will give you a huge advantage as well. I don’t mean you should (necessarily) try and get a job as ‘a programmer’ but even learning simple stuff like the basics of using Excel Macros and a bit of VBA could prove a real advantage in almost any industry. It goes without saying that the more advanced skills you have the greater your opportunities will be, even once you’ve managed to secure that coveted starter-job. Once word gets around that you’re ‘good with computers’ you might be handed more challenging things to do, or asked to administer the office intranet – things that can raise your profile and get you good experience when it comes to applying for promotions or your next job.

So, how can you learn to be a programmer? There are a huge number of resources out there to help. My first ‘real’ programming experience was on a three-day intensives course on C/C++ run by my university when I was a PhD student, and a lot of colleges will have this kind of course available, for only a minimal cost, or even for free – check with your computer centre. Of course, there are a million, billion resources available online, for people of all levels. One that seems really excellent for beginners is the Code Academy. This is an interactive website which teaches the basics of Javascript. In fact, Code Academy have just launched an initiative called ‘CodeYear‘ which aims to make 2012 the year when more people learn to program than ever before. Go to their website, sign up, and get started on the interactive lessons.

I’m not going to lie to you – learning to program computers is not easy, and at times even professionals who’ve been writing their own software for years want to defenestrate their laptop when stuck with a particularly difficult bug. There are really good resources available now though, and I’m convinced that pretty much anyone can learn the basics, if it’s taught in the right way. I’ve always found it incredibly rewarding, both intrinsically (when you solve a difficult problem and get something to work you are suddenly an unstoppable programming-ninja) and for the opportunities it’s brought me in terms of getting involved in research projects and jobs that I never would have had the chance to do otherwise. In fact, I was hired for my first post-doctoral position pretty much purely because I had some programming skills.

Take home message – learning to program is (in my opinion) the number one most effective thing a student can do to enhance their career prospects, whether those plans include further academic study or a more standard career path. Get to it people – make 2012 the year you learn to code.

TTFN.

Advertisements

About Matt Wall

I do brains. BRAINZZZZ.

Posted on January 13, 2012, in Experimental techniques, Internet, Programming, Software, Study Skills and tagged , , , . Bookmark the permalink. 41 Comments.

  1. Hey, I really enjoy reading your blog.

    I am fourth year student, studying human biology and psychology at the University of Toronto. I’m strongly considering graduate school for cognitive psychology (in the area of metacognition). I was also informed that computer programming is very important for a psychologist in my third year. Hence, I am taking a intro computer science course that teaches basic programming using Python.

    What programming language do you typically use as a psychologist?

    • Hi T.

      Thanks for the comment! And outstanding work on taking the comp sci course – I wish all psychology students were so proactive!

      I was deliberately non-specific about languages in the blog post, as I didn’t want to get too bogged down in details, plus, everyone has their favourite language or way of doing things, and you can achieve the same result through many different methods.

      Having said that, the language I tend to use the most these days is Matlab – it’s powerful, fairly human-readable, has a massive number of built-in functions, and has a big user base in psychology/neuroscience, which means there’s lots of freely-available code for doing things like presenting stimuli. I’ve also used C/C++ with OpenGL in the past for coding stimuli, but I wouldn’t necessarily recommend starting with C as a beginner!

      Ultimately, it’s not that important which one you learn, as (to a large extent) the logic and concepts are almost exactly the same no matter what language you’re using. Once you’re comfortable with one, it’s then much easier to switch to another – all that differs is the syntax used. I would say Python would be an excellent one to start with. Best of luck with it!

  2. Python also has the advantage that PsychoPy (think E-prime, but free) is a) written in it and b) can be used to script it in the same way that a version of Basic (I think) can be used for e-prime.
    I’d say what you start with will depend on what you’re wanting to do/what tools you’ll be using, so for example if you use SPSS, learn some of the pseudo code (and maybe some VBA for excel), PsychoPy – use a bit of Python, etc.
    Something I wish I could do more of too. I’m glad you highlight the link to formal logic, as I think some of the motivations for ‘philosophy for children’ are also present in the ‘coding in schools’ shift.

  3. Thank you! This post has given me the kick up the backside I have been needing for a while – plus the information I need to get started. It has been on my mind for ages that I really need to learn how to code because I agree with yout it is an important skill. I did a course on using matlab during my masters but its been 4 years and I haven’t needed it since – so I doubt I remember any of it. My excuse is that I’ve been busy doing lots of qualitative research since then (a whole different coding story).

  4. Found this post on the net. Really valid concepts that you make. Thanks.

  5. Couldn’t agree more. The technical support staff at St Andrews spend a lot of their time coding experiments for PhD students and even postdocs to run – something I find unforgivable. It leads to the absolutely absurd potential for promising psychologists getting jobs as postdocs/PIs and being unable run new experiments because they no longer have access to the coders who have enabled their research so far. The solution to this problem? Mentors, help your students and staff learn how to code!

  6. Thanks for liking my post 🙂 I thought about taking computer classes before, but I didn’t think how it would apply to my major- I want to get a B.A. in Neurobiology, and later go to graduate school for Neuroscience. This is really good information. I’ll enjoy reading your blog 🙂

  7. Hear, hear!

    I cannot disclose my employer. However, I spend some of my employed hours working with shrink-wrapped software targeted at psychologists.

    The irony of most (all?) of this shrink-wrapped software is that it is near impossible to become a competent user of such software without learning significant ‘programming skills’ yourself. But once you have learnt those skills, you no longer need the shrink-wrapped product and will probably do better with something like matlab or Psychopy.

    Program or be programmed! Douglas Rushkoff argues very convincingly that learning to program is basically the new literacy of the world. Just as reading and writing was originally ‘not for everyone’ but later became for everyone — so, too, will programming. I firmly believe this.

    • Ooh – intriguing Kath! Now I’m curious…. ;o)

      >Program or be programmed! Douglas Rushkoff argues very convincingly that learning t
      >to program is basically the new literacy of the world. Just as reading and writing was >originally ‘not for everyone’ but later became for everyone — so, too, will >
      >programming. I firmly believe this.

      Very nice way of looking at it!

  8. Hi Matt, thanks for liking my Love post. This is a completely new world to me and I find it pretty fascinating simply to consider The Code as a skill to add to my toolbox. Bends my mind actually – in a good way – this post of yours. Thank you!

  9. Matt, another good post ! How to fit it into a busy programme is an issue but i keep plugging away. I also think Python is probably the way to go (for many reasons!) but actually Excel macros (and even conditional formatting) and their ilk provide a cute easy taster and way into the ‘mindset’ in a familiar comfortable, non threating manner, before releasing the full power of Python. And PsychoPy is a really cute (not perfect …) way of engaging and making pretty stuff happen simply and quickly as it harness all the power and provides such good libraries for complex stuff.

    Blimey that was only meant to be a one line ‘like’

  10. I think this is an excellent post. As an undergrad Psychology student on a research placement, I have been fortunate enough to learn to code this year- but there is nowhere near enough emphasis on learning programming (nor the opportunity) on the BPS accredited course I am enrolled on. I applaud you for highlighting this issue. More academic staff should do the same.

    • Many thanks for the comment – and I’m glad you’ve got the opportunity to learn some coding! The BPS seems to be a bit behind-the-times when it comes to integrating modern research-relevant skills into the accreditation program – hopefully if enough of us highlight the issue this can change though…

  11. Reblogged this on The Psych Grad and commented:
    Interesting

  12. Offshore Company

    Hey there.
    Someone in my Myspace group shared this site with us so I came to take a
    look. I’m enjoying the content! Wonderful blog

  13. Thanks for sharing your thoughts. I really appreciate your efforts and I will be waiting for your next write ups thank you once again.

  14. Hi–

    Just a quick question. I’m just now starting my undergraduate in Psychology (I’ll be a sophomore in the Fall). I wanted to at least take a couple computer coding classes while in school, I just wasn’t sure which type of class you’d recommend or if it’s better to wait until getting a Master’s, etc.? (Since I am double majoring in Communication, I’m not sure if I will be continuing on to get a Master’s, however.) They have an Intro to C and an Intro to Java class at my school, which I am interested in because of the actual coding in there–not as interested in computer science theory, etc. However, I could also take Computer Science I or Computer Science II, and eventually a Intro to Systems Programming. How far do you recommend going, at least in the undergraduate level? Is it okay to only take the “pure” coding classes–like the Intro to C and Intro to Java? Because that’s really what I’m interested in.

    • Hi Bella,

      Thanks for the question – apologies it took me a few days to reply. I’d say that the pure coding courses will probably be more useful than the computer science theory classes. Either intro to Java or C will cover a lot of useful stuff, but my opinion is probably that C will be more useful – I don’t see Java being used that much for scientific applications. Just my opinion though!

  15. Thanks for that article. I’m only in my second year as a psych undergraduate, but I’d kind of guessed that IT would be invaluable, perhaps especially as a mature student. I’ve been teaching myself html5/css3 and Javascript, and me and the kids are all learning python together! I’ve got the bug (pun intended), and reading your article has given me some much valued affirmation that I’m on the right track.
    All the best to you in your research. Damien.

  16. Hey! Hi, your blog is awesome. I wanted a little guidance. I am an MCA (Masters in Computer Applications) and currently started with Masters in Psychology. I wish to research on some area that combines both. So how should I proceed.
    I want to utilise both of my degrees well.

  1. Pingback: Student Engagement | Pearltrees

  2. Pingback: Computing for psychologists « the neuron club

  3. Pingback: Raspberry Pi and the lab of the future « O'Connor Memory Judgements Lab

  4. Pingback: The future of computing will be mobile « Computing for Psychologists

  5. Pingback: Neuropolarbear on coding « Computing for Psychologists

  6. Pingback: Reader Appreciation Award « Pavlov's Couch

  7. Pingback: Guest post by Hayley Thair: A student’s perspective on learning to program « Computing for Psychologists

  8. Pingback: Start coding. Do it. | inference Lab

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: