Live data from Hacker News

Conversations with a six-year-old on functional programming

byorgey.wordpress.com

251–260 of 319 posts

Re: Conversations with a six-year-old on functional programming

#251

Earlier quoted context omitted.

And, kids are fascinating conversationalists

My wife recently put up a small message board in our kitchen, where you can press letters into fabric to say what you want. My daughter (5 years old), suggested, "Candy inside your heart." I find the sentiment very sweet. We have not broached free monads yet.

Monadic candy machine: https://gist.github.com/hakuch/484ea9c4e4baaf7b3ab6

Re: Conversations with a six-year-old on functional programming

#252

Earlier quoted context omitted.

Related, "Math from Three to Seven" by Alexander Zvonkin[1] is an excellent book on discussing math with young kids. [1] https://bookstore.ams.org/mcl-5/

https://www.amazon.com/My-Little-Big-Math-Book/dp/9198282603 I have not read this, but it's from the same person who helped create "anchor modeling" and I find that quite interesting.

From the "Look Inside", it strangely pairs very "childish" pictures with small-font densely-packed pages high-school or college-level mathematical prose.

Re: Conversations with a six-year-old on functional programming

#253

Earlier quoted context omitted.

And, kids are fascinating conversationalists

My wife recently put up a small message board in our kitchen, where you can press letters into fabric to say what you want. My daughter (5 years old), suggested, "Candy inside your heart." I find the sentiment very sweet. We have not broached free monads yet.

Honestly, would you need free monads if you already had (the feeling of) candy inside your heart?

Maybe we need to look at our priorities.

Re: Conversations with a six-year-old on functional programming

#254
post #125
post #4

Earlier quoted context omitted.

I'm curious what you mean. Is the problem that it is a constant function, or that you are asking them to ignore parameters? Or is that missing the point, still?

I think the problem is that our intuition is more or less based on a mechanical world in which the concept of a side-effect free or ineffective input is foreign.

I suspect it's more that our intuition is that everything is meaningful, or at least something is, so when the solution to is to ignore the only thing you have at hand, it's hidden in plain sight.

Re: Conversations with a six-year-old on functional programming

#255
post #115

Earlier quoted context omitted.

Is there a non-scribd (Google Drive) way to download the PDF?

I put it at https://drive.google.com/open?id=1hfzm3Rvm4xpwp_xHUKBHxuIEgf... . Please let me know if that fails, and I’ll try to fix it.

Thank you!

Re: Conversations with a six-year-old on functional programming

#256
post #14

When my son was around five or six, I did a similar exercise to explain the difference between prime and composite numbers. I told him that a number X is composite if you can fit X apples into buckets and end up with the same number of apples in each bucket. I drew 6 apples and asked whether they could be divided into buckets with an equal number of apples in each. It was immediately obvious that they could. My son c…

FWIW, "rectangles" is a visually/geometrically natural way to express "buckets of equal size".

And "1xN doesn't count" can be expressed nicely as "it can't just be a line", or "the line must be folded up into a shorter rectangle [because more compact shapes are nicer]"

Re: Conversations with a six-year-old on functional programming

#257

Earlier quoted context omitted.

I disagree with your example being a bad and reason is right there in your comment: the word "protocol". From wikipedia we find that a "communication protocol is a system of rules that allow _two or more entities_ of a communications system to transmit information...", where I have underscored the essential phrase and cryptographic protocols are just a subset of communication protocols. The reason that Alice and Bob…

(A)lice and (B)ob set up a channel. (E)ve is an evesdropper. When the only thing you change is to personify A, B, and E in your narrative description of a logical protocol, you are not making an analogy or an abstraction. Sequence diagrams, BAN logic, UML, pseudo code and other protocol notations are not teaching analogies, they are specifications. Some more useful than others. Teaching analogies and abstractions are…

Alice and Bob aren't just A and B. A and B are members of the category of "things" Alice and Bob are members of the category of "communicating entities", and are also familiar names for human. Humans communicate, so choosing Alice and Bob makes an analogy that helps the learner remember that A and B are the communicating entities, not messages, or the encryption key, or anything else.

They are illustrative examples that help with visualization and connecting the theory to an interesting use-case, which taps into most humans' natural preference visualization, socialization, and relevance. They aren't patronizing, they are humanizing.

Do you also feel that speaking in English is a "patronizing" way to communicate, since everything you say could be expressed in mathematical symbols?

Re: Conversations with a six-year-old on functional programming

#258

Earlier quoted context omitted.

I disagree with your example being a bad and reason is right there in your comment: the word "protocol". From wikipedia we find that a "communication protocol is a system of rules that allow _two or more entities_ of a communications system to transmit information...", where I have underscored the essential phrase and cryptographic protocols are just a subset of communication protocols. The reason that Alice and Bob…

What about a definition of protocol that allows sending messages to yourself for recursion.

That's a more complex idea that requires a more complex model. For example, Alice and Bob change to mailboxes, and Alice can have multiple mailboxes and mail stuff to herself.

Re: Conversations with a six-year-old on functional programming

#259
post #5

> “A function is like a machine where you put something in one end and something comes out the other end. For example, maybe you put a number in, and the number that is one bigger comes out. So if you put in three, four comes out, or if you put in six, seven comes out.” Examples are such a useful tool to explain complex subjects and make them approachable.

This is my biggest complaint with manpages, historically. Many of them don't have examples and only describe the command switches in a list.

EXAMPLES is one of the primary categories of man pages. Your broader problem is that "The full documentation for * is maintained as a Texinfo manual", and most people never learned how to access and navigate those.

https://www.google.com/search?q=%22The+full+documentation+fo...

Re: Conversations with a six-year-old on functional programming

#260
post #179

I remember exercise sheets at school (in the UK) like this - I think called 'number machines'. I _hated_ it; felt patronised by the illustrations of these machines, so I rebelled by trying to come up with a different correct solution - aware that there were infinitely many answers given just a few example domain/range pairs. But if anyone's interested in them for a car journey or some time you can't play this game al…

What's to hate? You solved the problems correctly and creatively. Any given reasonable limits on complexity of solutions (simpler -> better, Occam's razor), there are only a few solutions to any given problem.
Post reply on HN