What's next?
Recommended learning paths based on research interests:
No matter what your area of research is (Cognitive Neuroscience, Experimental, Social, Clinical, Educational, or Biological Psychology) if your goal is to understand humans (cognition, behavior, the mind, and the brain), learning to program will streamline your research. Programming is not just a technical skill; it’s a way to think more clearly, work more reproducibly, and engage more deeply with your data.
The tools and skills you need will depend on your research focus and background, and this manual is primarily targeted to students in cognitive neuroscience and experimental psychology. However, below is a suggestion for programming learning paths aligned with major subfields of psychological science.
Experimental and Cognitive Psychology
If your research involves designing behavioral experiments to study cognition (perception, attention, memory, etc.), programming will help you build precise experimental protocols and analyze data with flexibility and transparency.
- Begin with Python using beginner-friendly courses.
- Learn to build experiments using PsychoPy tutorials or OpenSesame documentation.
- Explore online experimentation with jsPsych.
- Learn R for data analysis.
- Use R Markdown or Jupyter Notebooks to document and share your analyses.
- Follow open science practices: preregister your experiments, share your code, materials, and results, and publish reproducible reports.
Cognitive Neuroscience
If your research focuses on understanding brain activity data, programming is essential for processing complex datasets and building reproducible pipelines. The specific programming skills and tools you’ll need will depend on your chosen research technique, as each modality comes with its own data structures, analysis techniques, and software ecosystems.
- Learn Python and MATLAB basics using online courses and tutorials.
- Study EEG/MEG analysis with MNE-Python or FieldTrip.
- Learn fMRI preprocessing and modeling with FSL or SPM.
- Follow open science practices: organize data using BIDS, share preprocessing pipelines and analysis scripts, and publish datasets on platforms like OpenNeuro.
Computational Psychology/Neuroscience
If your research involves modeling cognition, simulating behavior, or applying machine learning to psychological data, programming allows you to formalize theories, test predictions, and work with large datasets.
- Master Python for scientific computing with NumPy and pandas.
- Delve into the theory of cognitive modeling.
- Learn machine learning with scikit-learn or fast.ai.
- Explore Bayesian modeling with PyMC or Stan.
- Use GitHub and Jupyter Notebooks for documentation and reproducibility.
- Follow open science practices: share models and simulation code, publish preprints, and document assumptions and parameters transparently.
Clinical, Social, Educational, or Biological Psychology
(The authors of this manual do not specialize in these subfields, so the following are general recommendations based on widely accepted practices of programming in psychological sciences)
If your research focuses on applied areas of psychology (mental health, social behavior, learning and instruction, or biological mechanisms) programming can help you manage and analyze complex datasets, automate repetitive tasks, and improve the transparency and reproducibility of your work.
- Learn R or Python for data analysis, depending on the type of data you work with.
- Explore domain-relevant packages and libraries.
- Use reproducible workflows with R Markdown or Jupyter Notebooks to combine code, results, and interpretation in a single document.
- Automate data cleaning, scoring, and visualization tasks to reduce manual errors and save time.
- Follow open science practices: preregister your hypotheses and analysis plans, share anonymized datasets and code when possible, and use platforms like the Open Science Framework (OSF) to host your materials and collaborate transparently.
Resources: books, courses, online communities:
Books & papers
- Navarro, D. J. Learning statistics with R: A tutorial for psychology students and other beginners. https://psyr.djnavarro.net/index.html
- Farrell, S., & Lewandowsky, S. Computational modeling of cognition and behavior. Cambridge University Press. https://www.cambridge.org/core/books/computational-modeling-of-cognition-and-behavior/A4A90098E7CB9A58E5D030F408639D04
- Kruschke, J. K. Doing Bayesian data analysis: A tutorial with R, JAGS, and Stan (2nd ed.). Academic Press. https://nyu-cdsc.github.io/learningr/assets/kruschke_bayesian_in_R.pdf
- Lakens, D. (2024). When and how to deviate from a preregistration. Collabra: Psychology, 10(1). https://doi.org/10.1525/collabra.117094
- Matloff, N. The art of R programming: A tour of statistical software design. No Starch Press. https://diytranscriptomics.com/Reading/files/The%20Art%20of%20R%20Programming.pdf
- McKinney, W. Python for data analysis: Data wrangling with pandas, NumPy, and Jupyter (3rd ed.). https://wesmckinney.com/book/
- Nosek, B. A., Beck, E. D., Campbell, L., Flake, J. K., Hardwicke, T. E., Mellor, D. T., van 't Veer, A. E., & Vazire, S. (2019). Preregistration Is Hard, And Worthwhile. Trends in cognitive sciences, 23(10), 815–818. https://doi.org/10.1016/j.tics.2019.07.009
- Roth, J., Duan, Y., Mahner, F. P., Kaniuth, P., Wallis, T. S., & Hebart, M. N. (2025). Ten principles for reliable, efficient, and adaptable coding in psychology and cognitive neuroscience. Communications Psychology, 3(1), 62. https://doi.org/10.1038/s44271-025-00236-3
- Willroth, E. C., & Atherton, O. E. (2024). Best laid plans: A guide to reporting preregistration deviations. Advances in Methods and Practices in Psychological Science, 7(1), 25152459231213802. https://doi.org/10.1177/25152459231213802
Courses
- CIMCYC Workshop on computational modelling of behavioral data: https://wobc.github.io/cmb_website/
- BAMB! Barcelona Summer School for Advanced Modeling of Behavior: https://www.bambschool.org/
- Computational Social Cognition Birmingham-Leiden Summer School: https://www.compsoccog.com/
- Data analysis for life sciences. HarvardX: https://www.edx.org/certificates/professional-certificate/harvardx-data-analysis-for-life-sciences
- MATLAB Onramp: https://matlabacademy.mathworks.com/
- Model-Based Neuroscience and Cognition Summer School: https://modelbasedneurosci.com/
- NeuroHackademy: Summer school in neuroimaging and data science: https://neurohackademy.org/
- NeuroMatch Academy: https://neuromatch.io/open-education-resources/
- Python for everybody. Coursera: https://www.coursera.org/specializations/python
- Practical deep learning for coders: https://www.fast.ai/
Online communities
- BIDS. The Brain Imaging Data Structure: https://bids.neuroimaging.io/index.html
- GitHub: https://github.com/
- NeuroStars: https://neurostars.org/
- Open Science Framework (OSF): https://osf.io/
- PsychoPy Discourse Forum: https://discourse.psychopy.org/
- RStudio Community: https://community.rstudio.com/
- Stack Overflow: https://stackoverflow.com/
How to integrate coding into your daily workflow:
Incorporating programming into your research doesn’t require a complete overhaul of your habits. Instead, it’s about gradually embedding code into the tasks you already do ranging from research planning data, collection, analysis, and reporting. Here are practical strategies to help you make coding a natural part of your scientific routine:
Start small and build consistency
- Dedicate short, regular time blocks (e.g., 20–30 minutes a day) to coding aiming to build fluency without overwhelming your schedule.
- Use real research problems as learning opportunities (e.g., make use of the examples of this manual). Instead of following abstract tutorials, apply new skills to your own data or experimental design.
Automate repetitive tasks
- Write scripts to clean, merge, and preprocess datasets.
- Automate figure generation, statistical summaries, and report formatting.
- Use loops or functions to avoid copying and pasting code for similar analyses.
Document everything
- Use R Markdown or Jupyter Notebooks to combine code, results, and interpretation in one place.
- Comment your code clearly and consistently to make it understandable to your future self and collaborators.
Version control, collaboration & transparency
- Use Git and GitHub to track changes, collaborate, and back up your work.
- Create a repository for each project and update it regularly.
- Organize folders clearly: data/, scripts/, results/, docs/.
- Use relative paths and environment files (.env, requirements.txt, renv) for portability.
- Document your workflow with a README.md and clear comments.
- Review and refactor code after each project to improve clarity and efficiency.
- Save reusable functions and templates for future use.
- Share code and data when possible to support open and reproducible science.