psychologyblog
Matthias Mittner
More in social sciences and law
- Thomas D. Grantlaw, 20 Nov 2026
- Chris Blattmaneconomics, Oct 2026
- William Baudelaw, 25 Sep 2026
- Checking an R port against Stataeconomics, 21 Jul 2026
- Pedro H. C. Sant'Annaeconomics, 24 Jun 2026
What they did
Mittner documents a 60-90 minute session in which Claude Opus 4.5 in Cursor produced a 646-line PsychoPy N-back experiment with EyeLink eye-tracker integration for pupillometry. His workflow had four phases: Plan Mode report, careful plan review with follow-up prompts, implementation, and line-by-line code review. He provided a reference script from a previous experiment and a rough specifications file, and warns the script has had only cursory testing before going to the lab.
In their words
"It is still crucial to be fluent in the programming language as I would not have been able to spot some of the issues without intimate knowledge of both PsychoPy and Python."
"AI can help you be more productive in areas where you are already an expert but that it can lead you to superficial solutions and grave mistakes where you are not."
"Do not use the script as is!"
Lessons they draw
- Supply a reference script with lab conventions; it was crucial for eye-tracker setup, logging and structure (Mittner).
- Interventions he needed: multi-session counterbalancing the AI missed, trigger timing (waitKeys instead of polling would add timing error for pupillometry) and data-format conventions (Mittner).
- Ask for a dummy mode and a short debug version so the agent can test itself (Mittner).
- New researchers still need to learn the language and instruments, or they cannot spot the errors (Mittner).
Limits of this account
One experiment script, not yet validated on hardware; the post lists Claude as co-author, and the publication date is given only as "2026".