Goodman and Brette The Brian simulator Figure 1 | Implementing spike-timing-dependent plasticity with Brian. The source code in panel (C) shows the complete implementation of the network shown in panel (D), adapted from Song et al. (2000). A set of N = 1000 neurons (the object named input in the code) ﬁring spikes at random times with Poisson statistics are connected via excitatory synapses (the object synapses) to a leaky integrate-and-ﬁre neuron (the object neuron evolving according to the differential equations in the string eqs_neuron).The initially random synaptic weights are modiﬁed according to the STDP rule (the object stdp) in panel (E): for all pairs of pre- and post-synaptic ﬁring times tpre, tpost, the weight of the synapse is modiﬁed by an amount Δw depending on the difference in spike times Δt = tpost − tpre.The equation for Δw is when Δt > 0 or when Δt < 0.This is equivalent to the following system of equations. Each synapse has two variables Apre, Apost evolving according to the equations τpredApre/dt = −Apre and τpostdApost/dt = −Apost (the eqs string in the STDP declaration). A presynaptic spike causes Apre to increase by Δpre and the weight w to jump by Apost (the pre string), and a postsynaptic spikes causes Apost to increase by Δpost and w by Apre (the post string).The STDP rule causes the population ﬁring rate shown in panel (A) to adapt, and the ﬁnal distribution of synaptic weights shown in panel (B) to tend towards a bimodal distribution. the authors ﬁnd their code less informative and usable for readers than the article describing it. Code readability has several beneﬁts: ﬁrstly, the code can be provided to the reviewers, who can run it or at least understand precisely how the authors produced the ﬁgures; secondly, the code can be published along with the article and provide information to readers even though they might not be familiar with the simulator; and thirdly, readers can work from the authors’ code without rewriting everything from scratch. TEACHING We end this section with the experience of one of the authors (Romain Brette) on teaching a computational neuroscience course which included a weekly two hour tutorial on comput- ers (http://www.di.ens.fr/∼brette/coursneurones/ coursneurones.html). A single tutorial was dedicated to learning Python and Brian, while every subsequent one illustrated the lecture which preceded it. For example, in one tutorial the students implemented a spiking version of the sound source localisation model of Jeffress (1948) and another sound localisation model that was recently proposed for small mammals (McAlpine et al., 2001). In another tutorial, the students implemented the synﬁre chain model described in Diesmann et al. (1999). The year before, when students used Scilab for simula- Frontiers in Neuroscience www.frontiersin.org September 2009 | Volume 3 | Issue 2 | 195