Wakefield's Daily Tips

Reuse your routines

If you are tempted to copy a routine in your experiment because you want another routine to do a similar thing, consider whether you can simply reuse the same routine.

Routines can be reused either by adding them again to your flow or by adding a loop to repeat them.

The advantages of this are:

  1. Your psyexp file will be smaller. Large psyexp files can become unresponsive in Builder.

  2. If you want to make a change to the routine, you only have to do it once rather than changing every copy.

  3. Your flow will be easier for you (and others) to understand.

In some cases you may need to add some code to customise the exact behaviour of the routine, but in most cases it may simply be a case of using spreadsheet variables to alter the presented stimuli/instructions.