Live data from Hacker News

Why programming is a good medium for expressing poorly understood ideas (1967)

web.media.mit.edu

31–40 of 70 posts

Re: Why programming is a good medium for expressing poorly understood ideas (1967)

#31

I'd love if all the formulas on Wikipedia were written as pseudo code with meaningful variable names. I'd understand them so much faster.

I don't think that's possible for most of them. Quite a few formulas aren't equivalent to any one program, and most variables don't have a fixed meaning. Can't really think of one that could be improved by writing it as pseudo code.

> I don't think that's possible for most of them. Quite a few formulas aren't equivalent to any one program,

Even every proof can be expressed as a program, see Curry–Howard correspondence [1].

> and most variables don't have a fixed meaning.

I think this is kind of the point of the original comment. For a physicist PV=nRT is concise and clear but for everyone else? The letters P, V, n, R, T can have many meanings but in the context of this formula their meaning is fixed. Why not write:

    pressure * volume = AVOGADRO * BOLTZMAN * temperature
> Can't really think of one that could be improved by writing it as pseudo code.

See example above, but I think it strongly depends on what one is familiar with.

[1] https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspon...

Re: Why programming is a good medium for expressing poorly understood ideas (1967)

#32
post #30

Earlier quoted context omitted.

Seriously! Any programmer would get pilloried for working solely in single letter variable names. It's so tedious that this is the norm in math.

And then they run out of Latin letters so they switch to Greek. Then they run out of Greek letters so they switch to Hebrew... You have to remember that math is written for the sake of mathematicians' brains, not for the sake of dumb machines which accept only linear strings of a limited character set through a teletype. A mathematician can look at a formula and subconsciously break it down into constituent parts bas…

I think I've never seen Hebrew. Or maybe I've seen it and didn't recognize it as Hebrew. Do you have an example?

Re: Why programming is a good medium for expressing poorly understood ideas (1967)

#33

Earlier quoted context omitted.

I don't think that's possible for most of them. Quite a few formulas aren't equivalent to any one program, and most variables don't have a fixed meaning. Can't really think of one that could be improved by writing it as pseudo code.

> I don't think that's possible for most of them. Quite a few formulas aren't equivalent to any one program, Even every proof can be expressed as a program, see Curry–Howard correspondence [1]. > and most variables don't have a fixed meaning. I think this is kind of the point of the original comment. For a physicist PV=nRT is concise and clear but for everyone else? The letters P, V, n, R, T can have many meanings bu…

There are a lot of conventions in physics and math and they come to the rescue. In the CONTEXT of gases, it's easy to realize that V must be volume, T must be temperature, etc. The formula PV = nRT is for physicists, not for "anyone else".

Re: Why programming is a good medium for expressing poorly understood ideas (1967)

#34
post #28

My programming lecturer used to say "programming is the process of breaking a problem down so a high speed idiot can understand it, if you don't understand the problem then you can't explain it". He also said that a programmers most useful tool was a pencil and a 5mm square A4 pad. After years of solving thorny problems by getting away from the screen and scribbling in a pad I can't say he was wrong.

This might be a strange question, but what does 'scribbling on a pad' actually entail? Do you write the actual code, or is it usually more about drawing out the flow of program?

For me it's both. You're trying to visualize the problem, its parts and how they interact, and you may write down some code for specific sub problems because it just popped into your head and you don't want to context switch.

There's a limited amount of things you can keep in your head at once, and the paper is somewhat of a navigational aid and rapid access memory. Paper also offers you a lot of flexibility in regards to laying out things fast and sketching things, which computers still don't have quite down yet. If I try to layout my thoughts in emacs or photoshop a lot of my processing power is taken up by the act of using the tool ("ugh, was it M-x rect or M-x rectangular-region"/"Let me get the pen tool, and the rectangle tool, and where did the tool tray go?").

Scribbling on a pad doesn't just apply to coding though, it's a useful technique for a lot of areas that have thorny problems that exceed your local memory capacity.

Just my take on the technique.

Re: Why programming is a good medium for expressing poorly understood ideas (1967)

#35

I'd love if all the formulas on Wikipedia were written as pseudo code with meaningful variable names. I'd understand them so much faster.

Seriously! Any programmer would get pilloried for working solely in single letter variable names. It's so tedious that this is the norm in math.

The purpose is completely different! Here's one of several important reasons.

You wouldn't survive doing math with longer variable names. Imagine yourself writing "time" every time you need to write it in a formula in the course of a working on a problem. Just expand the following expression (time + 2)(2time - 3)(4time + 5) by hand, writing "time" every time. Or imagine studying vector calculus and writing out the formulas with the long names like "grad", "curl", etc. That kind of notation was replaces with the nabla symbol and overloaded notation for a very good reason.

Also, most derivations, for simple formulas even, go through larger complexities before they converge to something slick. Take a look at the derivation of the Navier-Stokes equations [1] and see if you could have done the same thing with longer variable, function and operator names.

So yea, it all boils down to repetition and quantity.

[1]: https://en.wikipedia.org/wiki/Derivation_of_the_Navier%E2%80...

Re: Why programming is a good medium for expressing poorly understood ideas (1967)

#36
post #30

Earlier quoted context omitted.

And then they run out of Latin letters so they switch to Greek. Then they run out of Greek letters so they switch to Hebrew... You have to remember that math is written for the sake of mathematicians' brains, not for the sake of dumb machines which accept only linear strings of a limited character set through a teletype. A mathematician can look at a formula and subconsciously break it down into constituent parts bas…

I think I've never seen Hebrew. Or maybe I've seen it and didn't recognize it as Hebrew. Do you have an example?

Quick one: https://en.wikipedia.org/wiki/Aleph_number

Re: Why programming is a good medium for expressing poorly understood ideas (1967)

#37
post #30

Earlier quoted context omitted.

Seriously! Any programmer would get pilloried for working solely in single letter variable names. It's so tedious that this is the norm in math.

And then they run out of Latin letters so they switch to Greek. Then they run out of Greek letters so they switch to Hebrew... You have to remember that math is written for the sake of mathematicians' brains, not for the sake of dumb machines which accept only linear strings of a limited character set through a teletype. A mathematician can look at a formula and subconsciously break it down into constituent parts bas…

Also, mathematics' naming conventions are quite strict.

The nabla symbol is almost-exclusively used for vector-calculus operations. The letters t, s, u, v are almost-always used for parametrizations. The letters i, j, k, n, m are usually used as indices of summations. We can go on.

Re: Why programming is a good medium for expressing poorly understood ideas (1967)

#38
post #8
post #3

It is a little tough to slog through now, though I'm sure it would've been pretty enthralling in '67. I liked this from the conclusion quite a bit, though: A computer is like a violin. You can imagine a novice trying first a phonograph and then a violin. The latter, he says, sounds terrible. That is the argument we have heard from our humanists and most of our computer scientists. Computer programs are good, they say…

Tacit knowledge is a useful concept not mentioned by Minsky. I don't think programming is really a good way of expressing a "poorly understood and sloppily formulated idea" of this type: a third party's visual experience and verbal description of a skillful but complex human action such as shearing a sheep. The old philosophical distinction between the discursive and the intuitive is key here. Can you systematically…

Maybe you're familiar with Dreyfus's critique of "cognitivism" in AI, as explained in his book What Computers Can't Do. His recent article "Why Heideggerian AI Failed" is also relevant... and his book on Heidegger, Being-in-the-World, which has some philosophical background for his anti-cognitivism.

Re: Why programming is a good medium for expressing poorly understood ideas (1967)

#39
post #34
post #28

Earlier quoted context omitted.

This might be a strange question, but what does 'scribbling on a pad' actually entail? Do you write the actual code, or is it usually more about drawing out the flow of program?

For me it's both. You're trying to visualize the problem, its parts and how they interact, and you may write down some code for specific sub problems because it just popped into your head and you don't want to context switch. There's a limited amount of things you can keep in your head at once, and the paper is somewhat of a navigational aid and rapid access memory. Paper also offers you a lot of flexibility in regar…

This is good encouragement for me to try using pen and paper again. The problem is that every time I do, I get frustrated by how slow it is for me, my hands get cramped, and I miss the backspace key. But perhaps I just need to keep at it for a bit, because I do see (and have experienced, back in college) the advantages.

Re: Why programming is a good medium for expressing poorly understood ideas (1967)

#40
post #11
post #5

Earlier quoted context omitted.

He was very wise on this matter. The best code I've written was thanks to first designing it on paper.

I don't write on paper anymore, but I still write all my comments first, then fill in the code.

Haskell has a mode, where you everything is a comment by default, and lines of code have to be marked as such.
Post reply on HN