The story behind this piece
Codice is a program you can run. In 130 lines of Python and numpy it builds a neural network from nothing: two interleaved spirals as data, He initialisation, a ReLU network of shape 2-64-64-2, softmax cross-entropy, backpropagation by the chain rule, a finite-difference gradient check, and gradient descent with momentum. The glowing line is the heart of backpropagation, the error passed back through a layer and gated by ReLU. The last column is the program's actual output: the gradient check agrees to within 7 × 10⁻⁷, accuracy climbs to 100%, and the learned decision regions are drawn in text, the two spiral arms picked out in gold. It is set in JetBrains Mono with syntax colours tuned for a dark room.


