Meeting 5: live coding
Work in materials/live-starter/ using the root launch
page. The starter runs at its first checkpoint. Keep one browser tab and
the Console open; save and refresh after each change. Your instructor
will release the reference solution after an attempt.
L1. Enable tracking (15 min)
Register the extension globally and attach it to the decision trial with the supplied target IDs and explicit event types.
Success: The one-word live demo includes a nested trajectory and three target rectangles.
Hint (after an attempt): The button_html parameter is a function in v8. Copying a v7 array will fail.
L2. Inspect a trajectory (10 min)
Move the pointer before responding, finish, and inspect the decision row in JSON.
Success: Identify x/y/t/event and target bounds; distinguish start and decision rows.
Hint (after an attempt): 16 ms is a minimum interval, not a guaranteed sample frequency.
L3. Runner-aware completion (10 min)
Open the supplied platform copy. Identify Cognition’s automatic saving or the two JATOS integration lines. Complete one pilot and retrieve its results; local JSON download is the fallback.
Success: The final summary row is included and the actual save destination is known.
Hint (after an attempt): JATOS starts inside onLoad and sends results with startNextComponent in on_finish. Cognition uses its own saving workflow.
Before moving on
Explain one changed line to a partner and inspect the relevant saved row. Record the first unresolved error rather than copying an entire replacement script.
Download this meeting’s starter files, or use the matching folder in the whole student course download.
A small example before the full task
Use the predict–run–explain practice sheet and the editable examples in the browser slides. Each isolates one idea, shows the resulting data, and includes an independent transfer question.