How I think, as a programmer.

Paul Graham wrote a brilliant essay about how programmers think recently, and I’ve been telling people about it for days. It’s the best description of how I work (and think) that I’ve ever read. The crux of it is that, if I’m working on a 1,000 line program, I have to hold the logic of all 1,000 lines in my head at once before I can do any substantive work. If I’m distracted, or tired, or otherwise not firing on all cylinders, either I can’t code or, if I do, I’m going to make mistakes.

Published by Waldo Jaquith

Waldo Jaquith (JAKE-with) is an open government technologist who lives near Char­lottes­­ville, VA, USA. more »

2 replies on “How I think, as a programmer.”

  1. I just read the Graham essay, and find that there are astonishing (to me, anyway) parallels between writing a program and writing a novel. As I read the essay, I mentally replaced “programmer” with “writer,” and “code/program” with “novel.”

    Holding the plot and subplots for a novel in your head (even though it’s on paper, it has to be in your head in order “walk around in it”) is one of the most difficult aspects of novel-writing. A sculptor or poet can see the entire piece of work in front of his or her eyes.

    I know of one novelist (MJ Rose) who transcribes plot points onto note cards, and tapes the cards to a wall so she can perceive the whole novel at once. That way, she can prune redundancies, fill in holes, etc. Not a bad idea (said the novelist, her eyes scanning the walls around her computer for sufficient space).

  2. When I was a programmer (33 years ago), I found that if I had an unsolvable problem with a program, I would put on some record albums (they had them then). No matter how many albums I was listening to, it always seemed that I figured out the problem when the needle dropped on a Linda Ronstadt album — “Don’t Cry Now”. By the time it got to “Desperado” — the fourth track on the first side — I would have figured out the core problem and how to solve it.

    I was kind of hoping that the article you linked to would explain the Linda Ronstadt effect. Oh, well.

Comments are closed.