Students in cognitive/neuro science need to learn programming in order to:
have a basic understanding of how computers work because of the importance of the Computational Theory of Mind in Cognitive Science.
prepare and run experiments on humans or animals, analyze data, run computational simulations, …
automate the boring stuff such as, repetitive work on files, web scraping, …
This book gathers various lectures given at the Master in Cognitive Science in Paris (“Cogmaster”) over the last 15 years.  (Students enrolled in the current course, Programming for Cognitive and Brain Sciences, will find more information about it in the chapter Cogmaster Lectures).
This book can also be used as a self-teaching tool. Depending on the Reader’s prior programming experience and interests, different sections are relevant. I have tried to keep the sections as independent as possible to facilitate the study, but you will find some cross referencing when needed. Although we cover many topics, some are only touched superficially; the reader should definitely check the Resources section to go further.
Christophe Pallier <http://www.pallier.org>