Experiment Builders & Programming Languages

lab.js

https://lab.js.org/

Python & PsychoPy

Python is incredibly easy to use, and there is a library of functions called PsychoPy that is set up to make running psychology experiments fairly easy. However, whilst PsychoPy advertise that you can put your studies online using their software, this is only true if you use the visual/graphical Builder view of their program. This severely limits the options of what you can do. For the experiment I was trying to run, it didn’t have the capabilities I needed, although I did manage it with their coding library. The reason for this is that when PsychoPy puts your experiments online, they are no longer in Python. Python can’t be interpreted by browsers - that’s what the language JavaScript is for. So, PsychoPy converts your python into JavaScript as best it can, partly using their in-house equivalent called PsychoJS, to allow it to run online. If you choose to use PsychoPy, note that it will upload your experiment to their hosting service Pavlovia, and you can run your study for the reasonable cost of 20p per participant (more on that later). The PsychoPy website has some great tutorials and you’ll need to use their reference manual if you want to code with their library. This tutorial is another fantastic place to start, and this website is great for python in general. The PsychoPy forum is also very good.

JavaScript

However, if you want the ability to create any experiment you like, and run it for free online, you’ll need to go with JavaScript. JavaScript is sort of like the programming language your browser uses to do the more interesting things with websites, it sits between the more classic HTML code websites are written in. The added benefit of learning this is that this functions as a more complete introduction to not just coding but web development as well. Whilst the main language you will need to actually learn here is JavaScript, you’ll also be touching on other languages: HTML, CSS, and maybe even Bash, and PHP - but luckily you won’t need to know much of these other languages beyond following simple tutorials and googling for some forum answers.

JsPsych

Fortunately, there is a free library of JavaScript tools designed for allowing psychologists easy and effective methods of making experiments, called jsPsych. A great introduction to both JavaScript and jsPsych, can be found in the tutorials on the jsPsych website . This is where you’ll also find all the documentation you need, and some useful worked examples. w3schools.com is another great resource for tutorials and information on web development languages (like those listed above). You can get help with jsPsych on the official github forum, and the learn JavaScript subreddit . The go-to forum for asking any coding related questions is Stack Overflow.

PsychoJS

https://github.com/psychopy/psychojs/

R Shiny

https://shiny.rstudio.com/
https://pmcharrison.github.io/psychTestR/

Harrison, P. M., (2020). psychTestR: An R package for designing and conducting behavioural psychological experiments. Journal of Open Source Software, 5(49), 2088. [OPEN ACCESS] https://doi.org/10.21105/joss.02088

MATLAB

https://uk.mathworks.com/help/webappserver/

IDEs

The only thing some of the tutorials above are missing is that you need an IDE (an Integrated Development Environment - basically a word-processor for writing code into so you can run it). I use Sublime, which comes highly recommended. If you wanted to start coding in PsychoPy, you can use their program as your IDE - I am on a Mac and downloading the packages for use in my IDE causes issues - let me know if any of you manage to get it working.