Why I read Karpathy code line by line
There is a particular discipline in reading code the way you read poetry — slow, with your whole attention, asking why each line is there.
When I work through a Karpathy implementation, I don’t try to understand the whole thing first. I read one function. I write it out. I delete it and re-write it from memory. Then I keep going. The point is not memorization; it’s making the implicit explicit. You don’t really know a piece of code until you’ve felt the temptation to write it differently and resisted, or written it differently and learned why the original choice was correct.
This is not how most engineers read code in their day jobs. We skim for the part we need. We do this because we’re busy and the codebase is large and life is short. But the small set of repos that taught me how to think — those I read like scripture.
thanks for reading —j.