
Why Programming Is a Good Medium for Expressing Poorly Understood Ideas (1967) - kick
http://web.media.mit.edu/~minsky/papers/Why%20programming%20is--.html
======
gpuhacker
My PhD supervisor used to say: "one week of programming easily saves an hour
of thinking"

~~~
CyberFonic
That is the core difference between academia and business. Any engineer who
sits back and stares out the window thinking is reprimanded or even fired by
the managers for not working.

~~~
LifeIsBio
Hmm... as an engineer in industry, if I decide I want to take a walk in the
middle of the day, I make sure I don’t have any meetings, then I get up and
leave. There are a lot of differences between academia and industry, but this
isn’t one of them. I can’t imagine working for a company where I was worried
about something like looking out a window, or not appearing to be working.

~~~
arvinsim
You would be surprised of the number of companies who still has a “butt-in-
seat” mindset.

~~~
WrtCdEvrydy
They probably have legacy software and turnover problems... those are usually
required before getting a "butt-in-seat" mindset.

------
mcprwklzpq
Programming does definetly helps me when i do not understand an idea. For
exmaple:

I did not understood why in the Monty Hall problem [1] do i have 2/3 chance of
winning if i do change the door instead of 1/2 that my intuition tells me
until i wrote it as two functions.

function change() {return random(3) != random(3);} // 2/3 chance

function not_change() {return random(3) == random(3);} // 1/3 chance

Then i also saw that i do get that 1/2 chance of winning if i choose between
changing the door and not at random.

function random_change() {if (random(2) == 1) {return change();} else {return
not_change();}} // (1/3)/2 + (2/3)/2 = 1/2 chance

This was so much more convincing than math and theory and even explanations
with cards and drawings because i could run it in a loop a 1000 times and see
the results be close to the prediction.

1 -
[https://en.wikipedia.org/wiki/Monty_Hall_problem](https://en.wikipedia.org/wiki/Monty_Hall_problem)

~~~
andrepd
Maths is not experimental. This roundabout, handwavy, vague way to deal with
things causes more harm than good, in my opinion. Try to understand a proper
mathematical proof instead.

~~~
lioeters
Here's a glimpse that may change your mind about mathematics as an
experimental science:

Mathematics: An Experimental Science -
[https://www.math.upenn.edu/~wilf/website/Mathematics_AnExper...](https://www.math.upenn.edu/~wilf/website/Mathematics_AnExperimentalScience.pdf)
(PDF)

> A computer is used by a pure mathematician in much the same way that a
> telescope is used by a theoretical astronomer. It shows us "what’s out
> there."

> From such explorations there can grow understanding, and conjectures, and
> roads to proofs, and phenomena that would not have been imaginable in the
> pre-computer era. This role of computation within pure mathematics seems
> destined only to expand over the near future and to be imbued into our
> students along with Euclid’s axioms and other staples of mathematical
> education.

Also:

Turtle Geometry: The Computer as a Medium for Exploring Mathematics -
[https://mitpress.mit.edu/books/turtle-
geometry](https://mitpress.mit.edu/books/turtle-geometry)

~~~
andrepd
>Mathematics: An Experimental Science

That was an amazing read. It certainly made me rethink my position. Thanks!

------
sn41
I know this is a favorite idea that is often quoted. But as a plodding person
doing research in CS, I don't find that programming enhances big-level
understanding. It may refine some of the nuances one does not notice in the
first pass, but after a tiring debugging session, I don't usually find any
flashes of insight about the overall problem.

An example: rotation and balancing of binary trees - does battling the
inevitable core dumps during implementation really enhance any understanding
of the principle of the algorithm?

~~~
lgas
If your goal in implementing rotation and balancing of binary trees is to
better understand a poorly understood idea then you're probably better off
using a language like Haskell that is garbaged collected and doesn't have
nulls so you can both avoid having any core dumps and also have a smart
compiler to help guide you to the solution and the understanding.

~~~
theelous3
This is the right mindset. Language and idioms are important to teaching and
learning.

I see people using python to teach/learn something like array iteration and do

    
    
      for i in range(len(my_list)):
       print(my_list[i])
    

What they have done, is conflated the implementation they think is computer
sciencey from learning C, and the essence of list iteration.

Python is a great language for learning about iteration:

    
    
      for item in my_list:
       print(item)
    

Here it's much closer to the essence of the lesson.

C is good for teaching about array indexing in the loop and exposing how the
loop variable is reused:

    
    
      for ( int i = 0; i < myArraySize; i += 1 ) {
       printf("%d\n", myArray[i]);
      }
    

If you're trying to understand something in programming or through
programming, there are right languages for the job, and it's a tricky affair.

------
js8
According to Curry-Howard correspondence, writing programs is like writing
proofs. So a working (or at least type-checked) program is like a proof that
was verified by the computer.

In that sense, the poorly understood ideas have to be expressed more
precisely, when writing a program. The program itself, however, is not
necessarily a good medium to express the most interesting ideas, because they
can drown in technical details.

~~~
ulrikrasmussen
The "propositions" that are proved in anything but dependently typed languages
are trivial though, so Curry-Howard is not that relevant in this context. E.g.
a program of type "Int" merely proves that the set of integers is non-empty,
and it doesn't even prove that for languages that are Turing complete (as the
"proof" may crash)

~~~
js8
That's why I used phrase "working program" and "verified" in my comment. ;-)

If you have a working (tested) program, you might not have a mathematical
proof that it works, but you have certain sense that what you're doing is not
entirely logically implausible. It is a form of verification (although without
complete guarantee of correctness).

(Another way to look at it is that the testing you did determines what kind of
sentence you proved to be true. So instead of assigning the type to the
program in advance, you deduce it the other way around - we observe how the
program works and that gives us its type.)

------
itronitron
Why Medium is Good for Poorly Expressing Understood Programming Ideas

~~~
launch_queue
funny

------
elbear
This is how I'm modelling things that I'm learning. I'm defining types (in
Haskell) and functions that map those types to other types. Even if I don't
write the implementation of the functions, that still gives me a clearer idea
of the domain.

------
WalterBright
I once attended a fascinating presentation where the presenter had realized
that since laws were written in a specialized legal language, that this could
be used to write proofs and discover inconsistencies and errors in the law.

------
hcarvalhoalves
Also see "Programming as theory building" by Peter Naur

[http://pages.cs.wisc.edu/~remzi/Naur.pdf](http://pages.cs.wisc.edu/~remzi/Naur.pdf)

