When you say "terminal" I think what you really mean is a "shell" which runs within the Terminal. Googling for "bash", "shell scripting", "beginner" and "hello world" are likely to lead you to more useful content.
Also, as much as it's helpful to write code, it's also helpful to read code and try to understand what it's doing. Ask lots of questions.
They're using Matlab because it's well known within the target community. Also, Psychtoolbox has been around for a long time and has been subject to studies that look specifically at precision.