Skip to content

Commit

Permalink
small round of edits
Browse files Browse the repository at this point in the history
  • Loading branch information
jodeleeuw committed Mar 31, 2023
1 parent 3624c00 commit 511d009
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ @article{de2015jspsych
publisher={Springer}
}

@misc{deleeuw2023datapipe,
title={DataPipe: Born-open data collection for online experiments},
url={psyarxiv.com/fv65z},
DOI={10.31234/osf.io/fv65z},
publisher={PsyArXiv},
author={{de Leeuw}, Joshua R},
year={2023},
month={Mar}
}

@article{mathot2012opensesame,
title={OpenSesame: An open-source, graphical experiment builder for the social sciences},
author={Math{\^o}t, Sebastiaan and Schreij, Daniel and Theeuwes, Jan},
Expand Down
8 changes: 4 additions & 4 deletions paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ bibliography: paper.bib

# Summary

It is common practice to conduct research on human behavior over the internet. Researchers use a variety of methodological approaches to conduct these studies. Some of this research can be done with survey instruments, for which there are many software options. However, much of the research in psychology and human behavior requires more fine-grained measures, and thus requires tasks that rely on precise measurement of stimulus presentation and response timing, randomization, dynamic procedures, and interactive content. jsPsych is a JavaScript library that allows researchers to build a wide range of the types of experiments that historically could only be run in a lab setting, and run them on any device that has a web browser, including desktop/laptop computers and mobile devices.
It is common practice to research human behavior using experiments that participants can complete online. Researchers use a variety of methodological approaches to conduct these studies. Some of this research can be done with survey instruments, for which there are many software options. However, much of the research in psychology and human behavior requires tasks that rely on precise measurement of stimulus presentation and response timing, specific kinds of randomization, procedures that adjust based on the responses that are given, and interactive content. jsPsych is a JavaScript library that allows researchers to build the types of experiments that historically could only be run in a lab setting, and run them on any device that has a web browser.

jsPsych was initially released in 2012 and the early design is described in @de2015jspsych. This paper is focused on jsPsych version 7, which contains the most substantial set of changes that have been made to the library since its initial release. The software has been widely rewritten with the goal of supporting integration with modern web development tools and improving the developer experience for researchers who want to make contributions to the library. Our hope is that this will make it easier for researchers to collaboratively develop jsPsych and tools that use jsPsych [e.g., @hartshorne2019thousand; @sochat2016experiment; @luchterhandt2023jspsychbuilder; @provenza2021honeycomb]
jsPsych was initially released in 2012 and the early design is described in @de2015jspsych. This paper is focused on jsPsych version 7, which contains the most substantial set of changes that have been made to the library since its initial release. The software has been widely rewritten with the goals of supporting integration with modern web development tools and improving the developer experience for researchers who want to make contributions to the library. Our hope is that this will make it easier for researchers to collaboratively develop jsPsych and tools that use jsPsych [e.g., @deleeuw2023datapipe; @hartshorne2019thousand; @sochat2016experiment; @luchterhandt2023jspsychbuilder; @provenza2021honeycomb]

Highlights of the changes include:

1. **JavaScript modules.** Refactoring the library to use ES6 modules allows jsPsych developers to take advantage of modern JavaScript development tools like package managers and bundlers. Researchers can now use tools like `npm` or `yarn` to integrate jsPsych with their choice of experiment building and hosting environments, and to selectively import jsPsych plugins in their experiment. Researchers can publish their own jsPsych plugins on package repositories and share them with the research community.
2. **TypeScript support.** We converted the codebase to TypeScript to provide better error checking and better integration with autocomplete and documentation tools that can use type information to assist developers.
3. **Simulation mode.** Version 7 introduced support for automatically simulating participant behavior, which can be used to robustly test code, experimental design, and analysis pipelines prior to running an experiment. We provide a detailed description of these features and their applications in @de2022simulating.
4. **Community contributions repository.** We created [a repository](https://github.com/jspsych/jspsych-contrib) to help community members share their plugins and extensions. We provide templates that are compatible with jsPsych versions 6 and 7 and CI/CD tooling to publish submitted packages to npm.
4. **Community contributions repository.** We created [a repository](https://github.com/jspsych/jspsych-contrib) to help community members share their plugins and extensions. We provide templates that are compatible with jsPsych versions 6 and 7 and CI/CD tooling to publish submitted packages to `npm`.
5. **New plugins and extensions.** We added several new plugins and extensions, including support for recording audio and video responses from participants and mouse tracking.

# Statement of need

jsPsych is one of many software options for building online experiments [e.g., @almaatouq2021empirica; @henninger2021lab; @anwyl2020gorilla; @peirce2022building; @stoet2017psytoolkit; @scott2017lookit; @harrison2020psychtestr; @balietti2017nodegame; @mathot2012opensesame; @zehr2018penncontroller]. jsPsych and these other options vary in ways such as available features, closed vs. open source, primary programming language, and syntax/style choices, but the main distinction is the particular way that jsPsych abstracts the design of an experiment. jsPsych experiments are constructed using plugins — self-contained modules that define an event and its parameters. This mode of abstraction allows developers to create both generic plugins that can be used in many different experiments (e.g., show some HTML on the screen and record a keyboard response) and plugins that implement specific experimental paradigms (e.g., display a circular visual search array with a specific number of distractors). Once a plugin is created, it is relatively easy for researchers with no previous web development experience to incorporate the plugin into their own experiments.

jsPsych’s plugin architecture lends itself to community-driven development. Researchers can develop plugins that abstract an experiment at a level that makes sense for a particular paradigm and then these plugins can be shared with other researchers who want to construct similar experiments. Over the past several years, there have been a handful of researchers who have published articles describing new jsPsych plugins [@kuroki2022jsquestplus; @kuroki2021new; @rajananda2018random; @donhauser2022audio; @gibeau2021corsi; @kinley2022jspsych; @strittmatter2022random]. As more users of jsPsych feel comfortable with developing their own plugins and publishing them in easily-accessible repositories, the development work that any individual researcher will need to do to create an experiment will decrease. We hope this will enable a robust ecosystem of open-source behavioral experiments.
jsPsych’s plugin architecture lends itself to community-driven, decentralized development. Researchers can develop plugins that abstract an experiment at a level that makes sense for a particular paradigm and then these plugins can be shared with other researchers who want to construct similar experiments. Over the past several years, there have been a handful of researchers who have published articles describing new jsPsych plugins [@kuroki2022jsquestplus; @kuroki2021new; @rajananda2018random; @donhauser2022audio; @gibeau2021corsi; @kinley2022jspsych; @strittmatter2022random]. As more users of jsPsych feel comfortable with developing their own plugins and publishing them in easily-accessible repositories, the development work that any individual researcher will need to do to create an experiment will decrease. We hope the changes introduced in version 7 of jsPsych to support this process will enable a robust ecosystem of open-source behavioral experiments.

# Acknowledgements

Expand Down

0 comments on commit 511d009

Please sign in to comment.