Live data from Hacker News

Conversations with a six-year-old on functional programming (2018)

byorgey.wordpress.com

61–70 of 161 posts

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

#61
post #36

Earlier quoted context omitted.

I taught at a programming camp one summer, and my favourite example of this that I drove several kids crazy with was "above the line, below the line". 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 t…

(Spoiler?) I think it's called "above the line" "below the line" because the characters in each of the accepted words don't travel below the "character placement line" that runs along the bottom of every word. I've forgotten the "real name" for this line. Thus, toothpaste -> below the line, because of "p" tooth -> above the line, no characters pass below it. Generally, if the word contains a y,p,q,g, or j, then it's…

That reminds me of “green glass door” and what you can and can’t take with you to magic land through the door.

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

#62
post #2

My seven year old would glaze over somewhere in the first sentence and switch topics to Pokemon. Your child might be gifted.

To quote the traditional meme on Pokémon: https://9gag.com/gag/534844/serious-pokemon-math

My point being that maybe it's possible to take interest in what the kids like, and use that to teach them something ? With pokémon it could be Statistics, Biology, Storytelling, Programming, etc. Whatever you like :-)

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

#63
post #53

Earlier quoted context omitted.

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…

This reminds me of a prediction game experiment I heard that was described like the following. \* The researchers presented the following to people. f(1) = true f(2) = true f(4) = true f(8) = true And asked, what is f? And the people will immediately jump in and test 16, 32, and then proudly declare that f = x -> x = 2^n for some integer n Forgetting to test f(3), f(5), etc. With more examination it turns out that f…

Sounds a lot like Derek Muller’s (Veritasium) video:

https://youtube.com/watch?v=vKA4w2O61Xo

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

#64
I see a lot of articles that try to make FP look really easy. The majority of programmers have a lot of trouble figuring out how to figure out a typical FP program with its layers of nested functions. It isn't easy, which is why most code bases are not FP.

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

#65

Earlier quoted context omitted.

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…

Awesome version of 20 questions. My parents are biologists and we played 20 questions with plants/animals on road trips growing up. The games were intense ! Learned a ton.

Did anyone ever just try and search through a phylogenetic tree?

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

#66

Earlier quoted context omitted.

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…

I taught at a programming camp one summer, and my favourite example of this that I drove several kids crazy with was "above the line, below the line". 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 t…

There is a similar game that goes like "The king does not like tea but he does like coffee". The you can ask questions like "Does he like cookies?" (answer: yes), "Does he like cats?" (answer: no)

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

#67
post #63
post #53

Earlier quoted context omitted.

This reminds me of a prediction game experiment I heard that was described like the following. \* The researchers presented the following to people. f(1) = true f(2) = true f(4) = true f(8) = true And asked, what is f? And the people will immediately jump in and test 16, 32, and then proudly declare that f = x -> x = 2^n for some integer n Forgetting to test f(3), f(5), etc. With more examination it turns out that f…

Sounds a lot like Derek Muller’s (Veritasium) video: https://youtube.com/watch?v=vKA4w2O61Xo

Thanks, that's it!

A good video and better than I explained it too.

The video says it's inspired by Taleb's Black Swan so I suspect I read it in that too.

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

#69
I had a fun conversation with my 6yo about recursion (or is it encapsulation?). We were out of green Play-doh so she came up with the idea to pretend blue Play-doh is green and to make a lump of green Play-doh out of the blue. When I suggested we can telescope this she spent the whole day saying sentences like "X made out of made out of made out of ....". Was cool to see how tickled she was by the idea.

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

#70

Earlier quoted context omitted.

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…

I taught at a programming camp one summer, and my favourite example of this that I drove several kids crazy with was "above the line, below the line". 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 t…

In college a friend had about 10 of us dumbfounded for an hour as we tried to figure out what "The land of Nodd" was.

The land of Nodd has floors, but no ceiling. It has grass but no lawn. It has no animals but there are teeth. Etc.

The game is we asked him questions about whether it has something or does not, and we had to figure out what "The land of Nodd" was :P

Post reply on HN