The Programmer's Brain

alex25th February 2025 at 3:01pm

I remember the book coming out back when I was at 42 — and spending my days with code, wondering how I could make the process less fallible. Turns out, the brain is quite unreliable hardware. A few years later, I found the book on the university's loan catalogue, and had a go at it.

It is broken into four parts — on Reading Code Better, on Thinking About Code, on Writing Better Code, on Collaborating on Code.

Very early on, Felienne establishes a conceptual base to examine cognition — one that I've come across recently, too, but can't recall exactly where (how ironic!) — and thus, a separation between working memory, short-term memory, and long-term memory arises. The distinction between the three seems intuitive, and maybe even more so when the problem of reading code is defined as such:

problemtype of memory
lack of knowledgelong-term memory
lack of informationshort-term memory
lack of processing powerworking memory

This is an interesting perspective. When reading a new codebase, for example, we'd find the language syntax and programming patterns on the long-term memory; the specific codebase architecture (what one arguably struggles the most with) is first parsed through the working memory, later chunking the contents into the short-term memory — and ideally, with time, passing through to the long-term memory. I suppose I'm trying to be a bit more conscious about the nature of my struggles when parsing new codebases.

The book has some interesting ideas, and there's an intention in backing it up with research. For example, chapter 5 — Reaching a deeper understanding of Code, argues that reading text is similar to reading code; thus, that programming and reading skills are not necessarily so far apart as one would imagine. This point of view is also touched upon at one interview in Coders at Work — he'd rather hire someone who's an avid reader than necessarily a math wiz.

Tools for learning? Flashcards. Spaced-repetition system really are becoming more broadly known, and Felienne vows for its usefulness in the field of learning programming, too. There's also a mention to Fowler's code smells, and how to properly structure a codebase — but I'd have enjoyed more indepth code examples.

It's an interesting book, but it felt rather incomplete — the exercises are very open ended ("apply X and Y to a given codebase"), but maybe it works for some people — or maybe I'd just prefer to have more tangible examples and references to follow-up on.

TitleThe Programmer's Brain
AuthorFelienne Hermans
PublisherManning