UPDATE! The tutorial is live - you can follow the series of blog posts, or head directly to the GitHub repo!
I'm making that tutorial I promised. A series of them, actually.
I'll be writing the tutorial on a Linux system. The process should not be very different on a Mac OS, but if you're on Windows, you will have to find out how to install and manage the tools on your own system. I'd recommend installing a virtual machine, which will allow you to run a Linux system inside your Windows OS. Explained in very simple words, a virtual machine used for this purpose is a program that simulates an operating system in its own window - this approach allows you to follow the tutorial step-by-step, word to word, without having to find out how to adjust the installation to a Windows environment. If you want to save yourself from a head ache, get a virtual machine here, or go here to experiment - and to fall in love - with Linux!
What's the deal with having a back end tutorial?
The challenge with jsPsych is that it provides you with client side functionality - what happens on the server is up to you. There is a large number of different solutions and their combinations for deploying your experiment, and this is simply one of them. But for smaller scale experiments, this solution will make deploying very easy, and since it only uses free tiers of cloud hosting and storage services, it will cost you no money.
I'll shortly introduce the technologies we use for this tutorial. If you don't understand the descriptions, don't worry - you'll get an idea of how things work while we're working on the application. You'll need the following ingredients for your secret sauce (I'll tell you where to install them throughout the tutorial):
The Node.js runtime environment and its awesome package manager, NPM
MongoDB is a cross-platform document-oriented NoSQL database. It will work as the storage for the data we get out of jsPsych. If you're interested, you could learn more about NoSQL databases, relational databases or JSON, since that's the format we're getting out of jsPsych. Or you could also not learn about any of those and still be able to complete this tutorial, but you will be none the smarter.
For more advanced readers - I personally recommend using an ORM between jsPsych and a relational database, as your experimental data can be aggregated in a way that is well suited for a relational DB. I like to make a table for each experiment, passing an identifier I use as a foreign key for the participant every time I make a request for a new page. If you use the relational approach and/or store data between tasks, you'll need to take care of some validation (making sure the participant doesn't repeat the same task several times, that there aren't several entries for the same ID etc), but the partial data gained from storing between the tasks affords you some valuable insight into performance and characteristics of participants who dropped out.
Heroku is a platform as a service (PaaS) that enables developers to build and run applications in the cloud. Heroku has a free tier that suits our needs and offers support for Node.js, so we are going to deploy our application to Heroku - this way, the entire experiment will be contained on the cloud and we do not need to worry about a web server - huzzah!
Git is a version control tool. In my opinion it's easiest to get started with Git by going to GitHub and doing their Git bootcamp. It might not feel very intuitive at first, but you quickly grow into it, and you won't need to use it very much - the only reason you really need to set it up for this tutorial is that we will need it to deploy the experiment to Heroku.
If you feel inspired and don't have one yet, you should go make a GitHub account right now and learn the basics of Git. It's best to store your experiment in a remote repository and version control has some powerful features that will come in very handy in your development process.