Learn to program by understanding the brain
A free, hands-on path from your first line of Python to building brain-computer interfaces and models of neurons. Real neural data from day one. No programming or neuroscience background required.
New to all this? How a brain works, how a language model works, and where they meet
A beginner’s guide with animated figures: a neuron next to an artificial unit, a patch of cortex next to a language model predicting the next word. No code, no equations, fifteen minutes.
Why this exists
Modern AI was born from ideas about the brain, yet most machine learning engineers have never looked at a spike train, and most neuroscientists cannot write the code to analyse their own data. This site sits in that gap. It teaches neuroscience through code and code through neuroscience, and it starts from zero.
The path
Seven tracks, each building on the last. Work through them in order, or jump in where your background puts you. The tiles show what is published so far; the rest is being written in order.
flowchart TB F[1. Foundations] --> S[2. Signals] S --> D[3. Data] D --> M[4. Models] S --> B[5. Decoding and BCI] M --> B M --> N[6. Neuro meets AI] B --> P[7. Precision medicine] N --> P
Lessons use real recordings from published experiments, downloaded with one link, and every lesson is a script you build line by line with its actual output shown. If you are not sure where to begin, read why every neuroscientist should learn to code and then lesson 1.
About the author
I am Santosh Srinivasaiah, a Senior Lead Scientist working on precision medicine, brain-computer interfaces and semantic search. I spend my days translating between the people who study brains and the people who build software, and this site is the guide I wish had existed when I started. More about me and this site.
Latest writing
Notes at the intersection of software engineering and neuroscience.
How a neural network learns: a playground
A complete neural network running in your browser: pick a dataset, choose the hidden units, press train, and watch the boundary bend,…
How a brain works, how a language model works, and where they meet
A beginner's guide with animated figures: what a neuron does and what an artificial unit does, how a brain uses billions of…
Detecting a seizure: from scalp EEG to a Raspberry Pi monitor
Precision medicine, project 1. Detect focal seizures in real scalp EEG from the CHB-MIT database with five features and logistic regression, evaluate…
The brain getting ready to move: motor imagery and your first BCI signal
Signals, lesson 7. Align 64-channel EEG to movement cues, measure event-related desynchronisation over motor cortex, map it, find the visual-alpha trap, and…
What the filter threw away: EEG, LFP and the Fourier transform
Signals, lesson 6. Build the Fourier transform from a dot product, write a power spectrum and a spectrogram in ten lines each,…
Primer: Bayesian inference
An introductory primer on Bayesian inference with real neural data: prior, likelihood and posterior on a grid, watching a belief about a…