Guide to childlanglab

Program a pcibex experiment

Purpose

Procedure

  1. Learn PCIbex
    • Create an account on farm.pcibex.net (for messing around/learning)
    • Complete the basic tutorial in the PCIbex docs
    • Complete the advanced tutorial in the PCIbex docs
  2. Program your experiment
    • Begin by programming your experiment in your own “regular” farm account (so you can mess around as much as you want!)
    • Use what you learned in the PCibex basic and advanced tutorials to create your experiment
    • You can also look at old experiment code in our lab’s account on the penn-specific farm for inspiration
  3. Add your ready-to-run experiment to our lab’s account on the penn-specific farm
    • Send the demo link of your experiment to yourself
    • Login to childlanglab account and then open the demo link
    • Click the “Click here to edit a copy in the PCIbex Farm” link in the orange bar at the top of the demo
  4. Add lab-required elements to ensure your experiment writes to the database
  // at the top of your PCIbex main.js, add this line to generate a unique id
  const childlanglab_id = crypto.randomUUID();
  
  // create the following trial to send results to the lab's database
  // and add it to the end of your sequence, for example:
  Sequence('trial1', 'trial2', 'sendToDB')
  
  newTrial('sendToDB',
      SendResults('https://api.childlanglab.com/v1/runs/pcibex'
          +window.location.search+'&randomid='+childlanglab_id)
  )
  1. Add your experiment to the lab’s database
    • Create a new experiment (if yours does not already exist)
    • Navigate to the Versions tab of your experiment page
    • Add this experiment as a new version (the “Data collection link” is the crucial link to add)
    • Make sure you describe the new version so you can remember what it is later (think 5 years from now!)
  2. Use the run button on your experiment’s page in the lab’s database to run your experiment
    • You must use this button in order to write to the database (it’s a security feature).

FAQs