My seven year old would glaze over somewhere in the first sentence and switch topics to Pokemon. Your child might be gifted.
Conversations with a six-year-old on functional programming (2018)
21–30 of 161 posts
Re: Conversations with a six-year-old on functional programming (2018)
#22Re: Conversations with a six-year-old on functional programming (2018)
#23Surprising because I have seen few 6 years olds can do multiplications and divisions. If I'm not mistaken, standard US 1st grade curriculum expects kids to be familier with only addition below 100 and subtraction in low teens.
Re: Conversations with a six-year-old on functional programming (2018)
#24Maybe we should let kids be kids and do kids stuff instead?
Re: Conversations with a six-year-old on functional programming (2018)
#25What's the optimal strategy for choosing inputs in order to guess the nature of the machine?
If you restrict the nature of the functions e.g. "polynomials of degree at most d", then the answer depends on the restriction. For the polynomial of degree <= d case the solution is d+1 inputs, every polynomial of degree at most d is uniquely determined by d+1 points.
Re: Conversations with a six-year-old on functional programming (2018)
#26I find kids understand the concept of functions really intuitively if it is stated simply - input -> func -> output, it doesn't have to be difficult maths, and it can make for some great games. It looks a little intimidating if using the notation in this article but they easily grasp that a function transforms inputs and returns outputs, and it can be a fun introduction to maths and programming, and then later to thi…
Agreed! My kids are slightly older but we've long enjoyed a roadtrip game that's a variation on 20 questions: "give me an input, I'll respond with an output, then you guess what the 'machine' [algorithm|function] did". They'd get to provide one input, I'd respond w one output, then they'd get one chance to define the operation -- to which I'd respond only yes or no -- before the next person's turn to test it. Whoever…
Given any input word, I would tell them whether it was above the line, or below the line (which corresponded to acceptable and unacceptable behaviour in camp-speak). I think only two kids figured it out on their own, and each time I challenged them to write a program to categorize words automatically.
I wonder if hacker news can figure it out :)
"Hacker" -> Above the line
"News" -> Above the line
"chrisweekly" -> Below the line
"functional" -> Above the line
"programming" -> Below the line
Re: Conversations with a six-year-old on functional programming (2018)
#27Re: Conversations with a six-year-old on functional programming (2018)
#28I was 16 and learning FORTRAN at school. I was a lazy bum at that time (well, that stayed ;-), didn't really prepare, and at the final exam, the teacher asked me in what order the program is executed. Not knowing any better I replied "a value is calculated when the rest of the code needs it" (like in regular math that we did a lot at the time too). She said "not correct, it executes in the order it is written". -- I…
Re: Conversations with a six-year-old on functional programming (2018)
#29What's the optimal strategy for choosing inputs in order to guess the nature of the machine?
I don't think that this problem is even computable, since the functions could be arbitrarily complex. If you restrict the nature of the functions e.g. "polynomials of degree at most d", then the answer depends on the restriction. For the polynomial of degree <= d case the solution is d+1 inputs, every polynomial of degree at most d is uniquely determined by d+1 points.
I vividly recall facetiously making this point, that for all we knew it was the 'number machine' (as I think the teacher called them) that responded 'as described for the inputs shown, and zero for all others', or something; that 'it sure looks like 2x, but we can't possibly know for all numbers'.
If I'd been told the machines were linear I would have learnt something (probably, hard to recall one's knowledge at a specific time) and shut up. Alas, I was sent out...
Re: Conversations with a six-year-old on functional programming (2018)
#30I find kids understand the concept of functions really intuitively if it is stated simply - input -> func -> output, it doesn't have to be difficult maths, and it can make for some great games. It looks a little intimidating if using the notation in this article but they easily grasp that a function transforms inputs and returns outputs, and it can be a fun introduction to maths and programming, and then later to thi…
Agreed! My kids are slightly older but we've long enjoyed a roadtrip game that's a variation on 20 questions: "give me an input, I'll respond with an output, then you guess what the 'machine' [algorithm|function] did". They'd get to provide one input, I'd respond w one output, then they'd get one chance to define the operation -- to which I'd respond only yes or no -- before the next person's turn to test it. Whoever…
You don’t have to use the official Looney pyramids, of course, but those work really well. Just enough variations to be really interesting.
There’s an older game that uses playing cards, Eleusis: https://en.wikipedia.org/wiki/Eleusis_(card_game)