Live data from Hacker News

Holding a Program in One's Head (2007)

paulgraham.com

61–70 of 104 posts

Re: Holding a Program in One's Head (2007)

#61
Are there any applications (mobile, web or whatever) whose sole purpose is to help a programmer capture the program that is in his/her head?

The first thing that comes to mind is UML based applications like Rational Rose. But those seem to have such high barriers of entry and are more geared towards communicating the program to other developers or different stakeholders.

Re: Holding a Program in One's Head (2007)

#62
post #10

It's actually an indictment of our programming tools that they require one to hold so much of the design context in one's head. If they were better (more expressive, easier to interact with) they would help to solve the problems rather than require superhuman feats of endurance. pg does mention that succinct programming languages help, which is true, but they don't go nearly as far as they could. Like him, I use Lisp…

> Common Lisp is 30 years old -- why hasn't the state of the art advanced since then? It's really quite shameful.

I don't think it's shameful. APL is close to 50 years old now, and it's most recent incarnations (J and K) are 20 years old - and they're still avant-garde, even though the world is slowly catching up to them (with LINQ and friends), although not as elegantly or cleanly.

What exactly are you missing about the "state of the art"? Entire K modules usually fit on one screen; Reportedly, kOS http://kparc.com/ is an operating system in 5 screenfuls of text.

Re: Holding a Program in One's Head (2007)

#63
post #42
post #6

I agree with the power of holding a program in one's head, but I also consider this a (the?) serious bottleneck in the software engineering. I hope we discover a scalable alternative to holding a program in one's head. It doesn't need to be as good as holding a program in one's head, it just needs to approximate it. (Edit: see also Design Beyond Human Abilities by Richard P. Gabriel.)

I would argue TDD is a workaround which allows you to do meaningful work in a team context without holding a complete program in one's head. It gets everyone to put their thoughts about what the program should do in one place. Every time you run the test suite, you are outsourcing to the test suite the task of running through your mental model of the program and thinking "what did I break". The limitation of TDD is t…

>>> "The limitation of TDD is that it blocks rapid iteration in what the program should do. When you load the entire model of the program into your head, requirements change at the speed of thought. With TDD, they change at the speed of a lot of reading and typing."

I agree 1000% percent with that. You articulated very well what I see as the single biggest drawback of TDD.

It's as if you're still working with clay, but you put metal around it every 2 seconds, so you lose the benefit of working with clay.

Re: Holding a Program in One's Head (2007)

#64
This is totally misleading, and may make people feel they are not good at programming.

To quote one of the masters of CS:

The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.

    Dijkstra (1972) The Humble Programmer (EWD340)

Re: Holding a Program in One's Head (2007)

#65

For years now I have been arguing with other programmers on the merits of IDE features such as intellisense. My position has always been that they are completely unnecessary. Autocomplete is useful, sure, since it saves some typing, but that is it's primary goal - to save keystrokes, not to help you remember what a class is capable of doing. Many programmers appear to get caught up in the small picture way of thinkin…

>>>> "The answer is diet, nootropics, meditation, exercise and knowledge of techniques (e.g. how to memorise facts rapidly). I won't go into specifics but suffice it to say that most people are undernourished and are mentally impaired because of it."

Dude, if you have some concrete insights in these areas, you definitely should go into specifics. A lot of us would be very interested.

Re: Holding a Program in One's Head (2007)

#66
post #10

It's actually an indictment of our programming tools that they require one to hold so much of the design context in one's head. If they were better (more expressive, easier to interact with) they would help to solve the problems rather than require superhuman feats of endurance. pg does mention that succinct programming languages help, which is true, but they don't go nearly as far as they could. Like him, I use Lisp…

> It's actually an indictment of our programming tools that they require one to hold so much of the design context in one's head. No, it's not, because we will keep looking for the limits. Once a programming tool allows you to do alone what you need 10 engineers for now, some genius will use those tools to do what you need 10 engineers for then , and then teams of 10 engineers will try to copy that. We'll always be d…

Agree. This evolution will inevitably play out according to a version of Jevons Paradox. :-)

Re: Holding a Program in One's Head (2007)

#67

I'm not so sure about the "don't touch other people's code, and don't allow them to touch yours" bit. What if someone gets hit by a truck? Or leaves the company? Or shrug makes a promotion? I've been pretty comfortable about the "collective code ownership" approach, within small enough teams, in the last 4 years. You can talk issues over with a colleague and he knows what you're on about, code reviews become effectiv…

Exactly what I thought - I only 'own' the code if it's a topic branch, once my peers reviewed it, they should know it as much as I do.

Re: Holding a Program in One's Head (2007)

#68
post #22
post #12

Earlier quoted context omitted.

Sounds like you have a number of tangible, palpable, feasible ideas for such super-smarter next-gen programming tools -- care to share? (Just hoping what you have in mind isn't UML + SOAP + some unintelligable über-abstracted-meta-code-gen...)

I have one: natural language programming. I have some ideas about how it would work, and have looked a little into how it might be implemented and have some seemingly feasible ideas there too. But I'm not an expert in either NLP or programming language development, so what do I know. A good first step in this direction is the natural programming language for creating interactive fiction, Inform 7. The problem is that…

Hm, I have never really thought about NLP, but I guess maintaining an NLP program somebody else has written must be even more of a nightmare than what we have now...

Re: Holding a Program in One's Head (2007)

#69
post #10

It's actually an indictment of our programming tools that they require one to hold so much of the design context in one's head. If they were better (more expressive, easier to interact with) they would help to solve the problems rather than require superhuman feats of endurance. pg does mention that succinct programming languages help, which is true, but they don't go nearly as far as they could. Like him, I use Lisp…

I think programming tools and technology have become much better over the decades (more expressive and easier to interact with). Programmers today are building far larger and more complex software than ever before. Programmers will always be working at the limit of their abilities -- if the tools make anything easier then we'll just start tackling harder problems.

That sounds like a great reason to improve the tools.

Re: Holding a Program in One's Head (2007)

#70
post #22

Earlier quoted context omitted.

I have one: natural language programming. I have some ideas about how it would work, and have looked a little into how it might be implemented and have some seemingly feasible ideas there too. But I'm not an expert in either NLP or programming language development, so what do I know. A good first step in this direction is the natural programming language for creating interactive fiction, Inform 7. The problem is that…

I have one: natural language programming. This exists. It's "Write each step of an algorithm in comments before writing any code, and (only when you're finished writing each step in English in comments) fill in the code each comment represents". But it's impossible to convince anyone to try that, though, even though it gives all the benefits you are imagining NLP would give. The mentality "Don't repeat yourself under…

Literate Programming - another 30 years old "technology". And it's good. As you say, the problem is not the tools, but rather mentality of rediscovering the wheel at best, and staying ignorant to the history of our field at worst.
Post reply on HN