Meeting 1: predict, run, explain
These short activities connect the slides to the full workshop. They are ungraded. Use one as a five-minute class demonstration; use the other for a warm-up or independent practice. They replace part of the existing demonstration time.
Before every run, write one prediction. Afterward, record one row or screen that supports or contradicts it. Then make one change and explain the result without reading the code aloud.
1. One trial. Three possible outcomes.
Open the editable example. The editor supplies startup and output code so you can focus on the experiment. Expand Supplied setup and run lines to see those lines; downloaded JS includes them.
Predict: What will be saved for F, an ignored key, and no response?
Change and test: Change the deadline from 2000 to 4000 ms. Run once with F, once with X then J, and once without responding.
Inspect: Look at response and rt. An ignored key produces no extra row. A timeout has two null values.
Write three short notes:
- My prediction: …
- Evidence from the run (field/value or screen): …
- What I would change or test next: …
2. Build a timeline. Count its rows.
Open the editable example. The editor supplies startup and output code so you can focus on the experiment. Expand Supplied setup and run lines to see those lines; downloaded JS includes them.
Predict: Two items, each preceded by a fixation: how many rows?
Change and test: Add “mirror” to the item list. Predict the new row count before running.
Inspect: The task column distinguishes fixation rows from decision rows. Your JavaScript loop builds the sequence before jsPsych runs it.
Write three short notes:
- My prediction: …
- Evidence from the run (field/value or screen): …
- What I would change or test next: …
Transfer to the workshop
In the lexical-decision starter, add a fixation before every item. Predict the total row count for eight decisions plus one instruction. Explain which eight rows answer the task question.
Diagnose one fault
A fixation uses NO_KEYS and has no duration.
Explain the cause and the smallest useful test. Do this before reading the check below.
Check your reasoning after an attempt
Example 1: F or J ends the trial. X is ignored, so the trial waits for F/J or the deadline. A timeout has response = null and rt = null; it is not a 2000 ms response.
Example 2: Two items produce four rows: fixation, decision, fixation, decision. Three items produce six. Only two or three rows, respectively, are word decisions.
Fault: There is no response route or timer to end it. Add a finite trial_duration and confirm that the next trial appears.
Keep a useful record
Download edited JS if you want to keep your change; a reset or refresh replaces it. For experiment examples, download JSON after the run. Source packs include HTML, the initializer, libraries, and assets: small-example source pack. These files are for learning; the workshop remains the core task.