Holding a Program in One’s Head

In my wanderings on the web I found this gem of an essay by Paul Graham, co-founder of Y Combinator and a whole lot more.

Sometimes I don’t respond instantly to email or don’t answer the phone. In fact, I do not publicize any email address or phone number as I am too busy to answer every call or email. Paul explains why in a much better way then I ever could. I thought I should share this with you and hope you will understand me a little better.

Here is the first part of his essay:

A good programmer working intensively on his own code can hold it in his mind the way a mathematician holds a problem he’s working on. Mathematicians don’t answer questions by working them out on paper the way schoolchildren are taught to. They do more in their heads: they try to understand a problem space well enough that they can walk around it the way you can walk around the memory of the house you grew up in. At its best programming is the same. You hold the whole program in your head, and you can manipulate it at will.

That’s particularly valuable at the start of a project, because initially the most important thing is to be able to change what you’re doing. Not just to solve the problem in a different way, but to change the problem you’re solving.

Your code is your understanding of the problem you’re exploring. So it’s only when you have your code in your head that you really understand the problem.

It’s not easy to get a program into your head. If you leave a project for a few months, it can take days to really understand it again when you return to it. Even when you’re actively working on a program it can take half an hour to load into your head when you start work each day. And that’s in the best case. Ordinary programmers working in typical office conditions never enter this mode. Or to put it more dramatically, ordinary programmers working in typical office conditions never really understand the problems they’re solving.

Even the best programmers don’t always have the whole program they’re working on loaded into their heads. But there are things you can do to help:

I highly recommend you read the rest of Holding a Program in One’s Head on Paul’s website.

Even more on this topic:

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *