Live data from Hacker News

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

byorgey.wordpress.com

71–80 of 161 posts

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

#71
post #47

"He gasped in astonishment at the idea of putting function machines into function machines" "He gasped in astonishment as I carefully explained the results of the double-slit experiment." Surely more like that this describes a 6yo kid being excited about something their parent is excited about and a product of implicit empathy, than any significant insight? I hate to lose reputation with downvotes for sounding negati…

>I hate to lose reputation with downvotes for sounding negative

This is my experience with this community. Downvotes without any discussion on statements (opinion or fact) that exist outside the norm.

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

#72
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…

This is the right answer! I think it was made harder in the camp due to "above the line" and "below the line" already having semantic meaning in the context of the camp, most kids didn't expect that to literally be the answer.

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

#73

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…

Words go below the line iff they contain the same letter twice in a row

Been -> Above the line

Fuzzy -> Below the line

Weeds -> Above the line

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

#74
So nice! This morning my 7 y/o son said the epic words: I really know a lot, I think about 50% of all there is. Naturally triggered and with Dunning-kruger in the back of my mind I start explaining about how he knows about rain, but not about molecules and exactly why it falls down and that generally smart and knowledgeable people realize that there is still a lot they don't know and that it is a sign of deeply understanding something if you realize it. But I was wrong he said, because he saw a movie about rain during his (home schooling) curriculum...

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

#75

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…

let descenders = ['q','y','g','p','j']; let isBelow = (word) => descenders.some(d => word.includes(d)); let tests = { "Hacker" : false, "News" : false, "chrisweekly" : true, "programming" : true, }; for (const test in tests) { let pass = isBelow(test) == tests[test]; console.log( pass ? `Passed for ${test}` : `Failed for ${test}` ); }

Ding ding ding. You get extra camp tickets for adding tests :)

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

#76
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…

Something like this is in Josh Tannenbaum’s PhD thesis, where he calls it “The Numbers Game.” https://dspace.mit.edu/handle/1721.1/16714

He uses the game to show that people do something akin to Bayesian updating over possible concepts and have certain intuitive priors (e.g., ‘even numbers’ is a priori more likely than {2, 7, 9, 31}).

This is briefly mentioned at the beginning of Kevin Murphy’s Machine Learning: A Probabilistic Approach, so you might also have encountered it there.

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

#77
post #47

"He gasped in astonishment at the idea of putting function machines into function machines" "He gasped in astonishment as I carefully explained the results of the double-slit experiment." Surely more like that this describes a 6yo kid being excited about something their parent is excited about and a product of implicit empathy, than any significant insight? I hate to lose reputation with downvotes for sounding negati…

>I hate to lose reputation with downvotes for sounding negative This is my experience with this community. Downvotes without any discussion on statements (opinion or fact) that exist outside the norm.

Even more so if you make it meta like you just did, watch this!

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

#78
post #77

Earlier quoted context omitted.

>I hate to lose reputation with downvotes for sounding negative This is my experience with this community. Downvotes without any discussion on statements (opinion or fact) that exist outside the norm.

Even more so if you make it meta like you just did, watch this!

1 and counting! maybe dang will come and tell me I'm triggering people or something.

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

#79
post #47

"He gasped in astonishment at the idea of putting function machines into function machines" "He gasped in astonishment as I carefully explained the results of the double-slit experiment." Surely more like that this describes a 6yo kid being excited about something their parent is excited about and a product of implicit empathy, than any significant insight? I hate to lose reputation with downvotes for sounding negati…

This reminds me of one of my favorite stories in This American Life, about a very young daughter who has a lot of questions, and her dad (a professor) asks her to write them down. She comes to him with a list with questions like “are we alive? Explain.”

I don’t want to spoil it, but it’s simultaneously hilarious and a tear jerker. They just replayed it a few weeks ago, you can listen to the climax and conclusion here: https://www.thisamericanlife.org/697/alone-together/act-one-...

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

#80
post #79
post #47

"He gasped in astonishment at the idea of putting function machines into function machines" "He gasped in astonishment as I carefully explained the results of the double-slit experiment." Surely more like that this describes a 6yo kid being excited about something their parent is excited about and a product of implicit empathy, than any significant insight? I hate to lose reputation with downvotes for sounding negati…

This reminds me of one of my favorite stories in This American Life, about a very young daughter who has a lot of questions, and her dad (a professor) asks her to write them down. She comes to him with a list with questions like “are we alive? Explain.” I don’t want to spoil it, but it’s simultaneously hilarious and a tear jerker. They just replayed it a few weeks ago, you can listen to the climax and conclusion here…

This is a great episode.

My favorite quote of hers was (paraphrasing): "I just wanted someone to talk to."

Post reply on HN