Live data from Hacker News

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

byorgey.wordpress.com

41–50 of 161 posts

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

#43

I 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…

I sure hope the haircut function mutates it's input, and doesn't return a clone whose hair is cut.

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

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

The line is called a baseline.

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

#46
post #36

Earlier quoted context omitted.

(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…

The line is called a baseline.

Thanks :)

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

#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 negative, but I find my credulity challenged with this story.

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

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

> 6yo kid being excited about something their parent is excited about and a product of implicit empathy, than any significant insight?

Which is perfectly fine. A young child cannot judge by themselve, so they rely on their parent's judgment which is conveyed by emotion.

I played the game an hour ago during family lunch, with my kids aged 15 and nearly 12. It still works!

I upvote.

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

#49

I 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…

I sure hope the haircut function mutates it's input, and doesn't return a clone whose hair is cut.

;)

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

#50

I 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…

I sure hope the haircut function mutates it's input, and doesn't return a clone whose hair is cut.

Reminds me of a YouTube video which said every time someone gets beamed in Star Trek they are killed and someone else is created with their body and mind somehow. If that were possible, why wouldn’t they just store backups and “restore” from backup when someone died?
Post reply on HN