Socratizer.

Read

Meeting 4: predict, run, explain

Meeting 4: 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. Load the image before the trial.

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: If the image cannot load, should a response trial still run?

Change and test: Change circle.svg to missing.svg in the file variable. Run, inspect the stop message, then restore the correct path.

Inspect: Successful preload produces a row. On a missing file, the plugin stays on the error screen: no completed preload row and no image_decision row.

Write three short notes:

  • My prediction: …
  • Evidence from the run (field/value or screen): …
  • What I would change or test next: …

2. What does 160 pixels specify?

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: Does doubling stimulus_height guarantee twice the visual angle?

Change and test: Change the height from 160 to 240. Inspect the rendered image and the saved height. Then resize the preview window.

Inspect: The code controls a CSS-pixel dimension. Physical size also depends on the display; visual angle depends on viewing distance.

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

Give a partner a fresh extracted shape task. Ask them to run it using only its instructions. Record one path or instruction problem, its fix, and evidence from the retest. Use the full task for the browser-size check.

Diagnose one fault

The task runs in its original folder but the image disappears from a copied folder.

Explain the cause and the smallest useful test. Do this before reading the check below.

Check your reasoning after an attempt

Example 1: With continue_after_error false, the failed preload holds on its error screen and does not finish a data row. No response to an absent image is recorded. Restore the path and retest the normal route.

Example 2: The requested height changes from 160 to 240 CSS pixels. This is not a guarantee about centimeters or degrees of visual angle. Layout constraints may also limit a rendered image.

Fault: The copied package may omit an asset or depend on its old relative path. Test a complete fresh extraction; compare the requested path with the actual filename and case.

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.

Remove this file?

The file will be removed from this assignment.