Live data from Hacker News

Conversations with a six-year-old on functional programming

byorgey.wordpress.com

121–130 of 319 posts

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

#121
post #3

What is truly astounding about this is the patience to even attempt to explain free theorems to a 6 year old. Most parents would likely answer "math" and that would be the end of it. I don't (yet) have kids, but when I do I hope I have the wherewithal to recognize and take advantage of moments like these.

Dad of 8 here. It makes life so sweet when we acknowledge the child's capacities. Notice it didn't take that much patience...it's almost just a matter of creatively overcoming a language barrier.

Out of curiosity, did you mean you have eight kids, or your kid is eight years old?

Because if it's the former, I'm impressed you have even one second to be on HN!

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

#122
> (and to be fair, free theorems are only interesting when polymorphism is involved which I definitely didn’t want to go into).

"there's a thing called polymorphism, and it means 'of many forms', what it means is that if you put the thing in, you're guaranteed to get a specific type of thing out, but it might be different depending on what you put in. So you put words into the machine, and letters come out, but if you put lists of numbers in, numbers come out."

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

#123
post #3

What is truly astounding about this is the patience to even attempt to explain free theorems to a 6 year old. Most parents would likely answer "math" and that would be the end of it. I don't (yet) have kids, but when I do I hope I have the wherewithal to recognize and take advantage of moments like these.

One thing that makes this easier is being rich. What I mean by that is for example, when my kid is asking me questions or wants to "do it myself!", the fact that I have a flexible schedule helps immensely, and that flexible schedule is possible because I can turn down work that doesn't give me that flexibility.

If I had a strict clock-in/clock-out job, and only had limited time to run errands, I'd have a lot less patience for waiting for my kid to do stuff or answering her questions.

I consider myself very lucky that I have that privilege and can pass that on to my kids.

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

#124

Earlier quoted context omitted.

I'm a father of two girls, ages four and nine. Explaining things to them and seeing the dawn of understanding in their eyes in easily my greatest joy in life. As a parent, I basically get to relive this xkcd[0], over and over, every day. We take it to an extreme - we unschool[1]. We do our best to treat our daughters as any other member of the family, expecting to act as adults to the extent that they're able to do s…

My problem is unschooling is that just because you’re not interested in something (as a kid) doesn’t mean you shouldn’t learn it. It’d be nice if traditional school had a better balance where personal interests could be explored in a structured and formally accepted way.

> My problem is unschooling is that just because you’re not interested in something (as a kid) doesn’t mean you shouldn’t learn it.

In my experience as an unschooled child who was in constant contact with the parents of other unschooled children, and other unschooled children, if a child isn't interested in something, that almost always changes over time. One example was where one kid did not wish to learn to read, until about the age of seven where he taught himself to read, without much struggle (and without parental intervention -- the parent found out about it because the kid kept the books under his pillow!), simply because he found a topic he was so interested in that he wanted to learn more about it.

I also know someone else who did not learn to read until the age of 6 or 7, after which he rapidly caught up, and at the age of 9 or 10 he sped through all three of the Lord of the Rings series, and was an avid reader. These are only two examples of something that was typical within unschooling circles.

One fundamental idea behind unschooling is that children develop at different rates, and thus in some cases, trying to force them to learn something before they are ready to learn can actually cause damage -- in a lot of cases this damage isn't visible, but that doesn't mean that it isn't there. I experienced this first hand, with a primary school maths teacher. This mathematics teacher misexplained things, and would constantly pile on the stress. It took me 6 years of unschooling to de-stress enough with regards to mathematics enough to simply add up efficiently (it felt like punching through a mental brick wall, I was completely unable to manipulate the numbers, despite being able to see them). Now at the age of 20 I am still filling in gaps in my mathematics education, through the right aids.

Something I would add is that most people learn the skills that are required for them in day-to-day life, so even if a child is not interested in mathematics, they tend to learn the basics just by helping out their parents with shopping. The most important thing that a child needs in their life is the willingness to learn, which is a skill that school rips out of our children.

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

#125
post #4
post #2

>\lambda x.\, 6 was also surprisingly difficult for him to guess (though he did get it right eventually). I think he was just stuck on the idea of the function doing something arithmetical to the input, and was having trouble coming up with some sort of arithmetic procedure which would result in 6 no matter what you put in! It simply hadn’t occurred to him that the machine might not care about the input. (Interesting…

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.

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

#126

This game can be played in a group, too: https://en.wikipedia.org/wiki/Zendo_(game) > once the guesser thinks they know what the function does, the players switch roles and the person who came up with function specifies some inputs in order to test whether the guesser is able to produce the correct outputs. In Zendo when the guesser offers the wrong rule, the 'master' must tell them an (input,output) pair where the g…

Come to think of it, I find Zendo much harder than the game described in the article. I think it’s because the inputs (arrangements of shapes) are more complex than numbers, and the outputs (Booleans) give you less information than numbers.

I've actually never gotten to play real Zendo, but you can make up your own class of koans, like Lisp programs or regexes. Maybe the real-worldness of arrangements of pyramids does give them more of a Zen feel?

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

#127
post #3

What is truly astounding about this is the patience to even attempt to explain free theorems to a 6 year old. Most parents would likely answer "math" and that would be the end of it. I don't (yet) have kids, but when I do I hope I have the wherewithal to recognize and take advantage of moments like these.

Dad of 8 here. It makes life so sweet when we acknowledge the child's capacities. Notice it didn't take that much patience...it's almost just a matter of creatively overcoming a language barrier.

If you do have 8 kids, that's amazing. I have 5 myself and most of the time I feel more like a zookeeper/riot policeman than a dad.

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

#128
post #110

> It’s called the function machine game. I will think of a function machine. You tell me things to put into the function machine, and I will tell you what comes out. Then you have to guess what the function machine does. Cool, this sounds like a general form of the picnic game[0]. An input to the "picnic" function is a food (or other object), and the output is whether or not it can be brought to the picnic. The picni…

my favorite snack is "" ! (pronounced " ")

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

#129
post #40
post #3

What is truly astounding about this is the patience to even attempt to explain free theorems to a 6 year old. Most parents would likely answer "math" and that would be the end of it. I don't (yet) have kids, but when I do I hope I have the wherewithal to recognize and take advantage of moments like these.

Note kid asked "dad what are you doing", not "what is functional programming". That's a simple call for attention, and it was equally suitable to close the book and play frisbee with him.

The kid was crying out for a math education!

On a serious note, you may be right in that it's a simple call for attention, but at least with my kids those are the opportunities for the best instruction, because the kid is usually bored, curious, and wants attention. If you give said attention, and answer questions in a way that they can think through and reason about, they will grok stuff you never expected.

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

#130
post #3

What is truly astounding about this is the patience to even attempt to explain free theorems to a 6 year old. Most parents would likely answer "math" and that would be the end of it. I don't (yet) have kids, but when I do I hope I have the wherewithal to recognize and take advantage of moments like these.

Dad of 8 here. It makes life so sweet when we acknowledge the child's capacities. Notice it didn't take that much patience...it's almost just a matter of creatively overcoming a language barrier.

And, kids are fascinating conversationalists
Post reply on HN