Live data from Hacker News

Holding a program in one's head

paulgraham.com

31–40 of 136 posts

Re: Holding a program in one's head

#31
The most interesting article I read from PG the past year.

Holding as much of the program in your head gives you the power to identify what will give you the best optimization. Also this may be the short explanation why good software is written by teams of max 2-3 people!

Re: Holding a program in one's head

#32
From footnote 3 here: http://www.gigamonkeys.com/book/introduction-why-lisp.html

Psychologists have identified a state of mind called flow in which we're capable of incredible concentration and productivity. The importance of flow to programming has been recognized for nearly two decades since it was discussed in the classic book about human factors in programming Peopleware: Productive Projects and Teams by Tom DeMarco and Timothy Lister (Dorset House, 1987). The two key facts about flow are that it takes around 15 minutes to get into a state of flow and that even brief interruptions can break you right out of it, requiring another 15-minute immersion to reenter. DeMarco and Lister, like most subsequent authors, concerned themselves mostly with flow-destroying interruptions such as ringing telephones and inopportune visits from the boss. Less frequently considered but probably just as important to programmers are the interruptions caused by our tools. Languages that require, for instance, a lengthy compilation before you can try your latest code can be just as inimical to flow as a noisy phone or a nosy boss. So, one way to look at Lisp is as a language designed to keep you in a state of flow.

Re: Holding a program in one's head

#33
post #5

> Thanks to Sam Altman, David Greenspan, Aaron Iba, Jessica Livingston, Robert Morris, Peter Norvig, Lisa Randall, Emmett Shear, Sergei Tsarev, and Stephen Wolfram for reading drafts of this. PG, you got the Stephen Wolfram to read this? If so, perhaps you can have a conversation with him about making Mathematica open source :~)?

Speaking of Wolfram...

He gave a great talk on simplicity in nature's algorithms at MIT. I could see a lot of application to programming with his take on simplicity vs. complexity.

http://mitworld.mit.edu/play/147/

Also, he spoke at Startup School in 2005 - really excellent talk you should definitely check out if you get a chance.

http://feeds.feedburner.com/~r/Ycombinator-StartupSchool/~3/...

(For anyone new to the site, you can get all the available Startup School talk mp3's at this podcast: http://feeds.feedburner.com/ycombinator-startupschool )

Re: Holding a program in one's head

#34
In 1985, Peter Naur wrote a similar article presenting programming as theory building. In essence, a programmer primarily constructs a mental model of the problem, and its solution; secondarily writes code; and incidentally documents. Naur discusses how this view affects program life and modification, system development methods, and the professional status of programmers.

Naur, P. 1985. Programming as theory building. Microprocessing and Microprogramming 15, 5, 253--261. http://www.zafar.se/bkz/Articles/NaurProgrammingTheory

Re: Holding a program in one's head

#35
I agree, it's an awesome essay and dead on. Now I can finally give my friends a good answer when they ask about my computer habits. Glad to know I'm not the only person who works like this. Great job.

Re: Holding a program in one's head

#36
post #5

> Thanks to Sam Altman, David Greenspan, Aaron Iba, Jessica Livingston, Robert Morris, Peter Norvig, Lisa Randall, Emmett Shear, Sergei Tsarev, and Stephen Wolfram for reading drafts of this. PG, you got the Stephen Wolfram to read this? If so, perhaps you can have a conversation with him about making Mathematica open source :~)?

PG, you just got me wondering about feedback. When you let people you trust or respect read drafts of your essays, what kind of feedback do you expect? How does the feedback affect your essays?

Re: Holding a program in one's head

#37

> Sometimes when you return to a problem after a rest, you find your unconscious mind has left an answer waiting for you. This happens to me on so may occasions in may different areas. While programming, if I have a problem I'll sleep on it, wake up, and see the problem in a whole new light. Also, before writing an essay for class, I will read the prompt throughly. This way my brain starts form sentences without cons…

To me sleeping is the greatest problem solving technique ever invented. I have even lost count of how many times this has worked for me. If companies had any sense, they would allow employees to take cat naps.

Re: Holding a program in one's head

#38

Awesome essay, Paul. You really nailed this whole phenomenon. It's the first time I've read all these things in one place and it is so very true in my experiences. At my old company, one comment you'd always hear from team members with a new idea was "Hey, I thought of this in the shower this morning, and I think we should ..."

Management has decided the sprinkler system in the dev room will be activated and remain on until further notice.

Re: Holding a program in one's head

#39
I completely agree with this. However, I have disdain for the word "programmer" to describe what I do. I am a "software developer" which describes it much better and indicates much of what you've said here. A "programmer" is a monkey that writes x+2=y a developer has domain knowledge over the problem he is solving. Let's change the terminology to fit the job.

Re: Holding a program in one's head

#40
post #4

> Oddly enough, scheduled distractions may be worse than unscheduled ones. If you know you have a meeting in an hour, you don't even start working on something hard. God, how I wish more people understood this. It might seem like programmers overreact to even the most minor demands on their time---"What's the big deal? It's only a half-hour meeting!"---but a half-hour meeting can easily kill several hours of producti…

Just like Marc Andreessen's "don't keep a schedule": http://blog.pmarca.com/2007/06/the_pmarca_guid.html
Post reply on HN