Live data from Hacker News

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

byorgey.wordpress.com

131–140 of 161 posts

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

#131

The most key point of this is right at the start: "I decided to just answer straightforwardly" That can make all the difference in your interactions with your child and how they learn about this world. Too many problems are caused by parents not being honest with their kids. Be straightforward, no matter how awkward the explanations may be. Avoid patronizing simplifications and saying things like "you'll understand w…

Parents observe their child learn the most in-depth actions and knowledge from a dizzying array of input...and then too often decide that children can't handle nuance or depth.

I know _I_ can't, but children seem to be quite good at it.

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

#132

Earlier quoted context omitted.

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}` ); }

Rather depends what font the quizmaster is speaking in: https://graphicdesign.stackexchange.com/questions/71807/what...

Ha, yes, and what language. My example won’t work for ŷ and any others like it.

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

#133
post #106

Earlier quoted context omitted.

> Education is a series of increasingly smaller lies Could you be swayed to the more optimistic "Education is a series of decreasingly incomplete truths"? I'm a math professor, and we do tend to be able to tell our students the truth, nothing but the truth, but very much not the whole truth, at least in every part of the curriculum that I've seen. (That we're able to do so doesn't mean no math teachers lie, but it's…

i think that the optimism comes from you're the one telling the incomplete truths or lies and not the one hearing them. when i was in graduate school for mathematics, it indeed felt that i had been lied to in undergraduate school. also, i think people are being a bit facetious when they say lie as well, but there's a kernel of truth to it.

> when i was in graduate school for mathematics, it indeed felt that i had been lied to in undergraduate school.

I'd be interested to hear more about that. Standard US undergraduate mathematics curriculums are aggressively non-"the whole truth", but they rarely lie. (Sometimes there'll be less attention than a professional mathematician might like on checking hypotheses, but, in my experience, they're always there for someone who cares to check.) What lies did you feel like you'd been told?

(I mean, of course, content lies. Implicit pedagogical lies like "what you see and do in undergraduate mathematics classes faithfully represents the graduate and research mathematics experience" are unfortunate, and won't go away as long as the audience for math courses is made up much more of people who want to apply it in other disciplines than people who want to be mathematicians, but I think they are of a different character.)

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

#134

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…

We used to play a game in summer camp where one had two sticks and could hand them to the next person 'crossed' or 'uncrossed' declaring as such. The key was it was the persons legs, not the sticks, which determined if one was passing the sticks 'crossed' or 'uncrossed'.

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

#135
Thanks _ttg for posting this! I just spent an hour with my 5-year old going over all the functions mentioned in the post and then some. I would give him an 'x' and he returned f(x) to me. Eventually we ended up at Collatz Conjecture and he absolutely loved it. I've always wanted to explain that one to him but it was hard to simplify the concept. Starting with simpler f(x) and building up to comparisons like min/max worked out perfectly. He completed the entire chain of 7 on his own! Thank you :)

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

#136
post #50

Earlier quoted context omitted.

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?

There's a notable book by philosopher Derek Parfit called "Reasons and Persons" that—among other things—uses "transporter" thought experiments to explore the nature of personal identity.

The quasi-buddhistic conclusion, with which I agree, is that personal identity is largely an illusion. It's an easy illusion to maintain however, given that in practice our "software" is very difficult to "copy" exactly.

https://en.wikipedia.org/wiki/Reasons_and_Persons#Personal_i...

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

#137

Kids definitely can grasp this on a very tangible level. I just explained function input and output to my 8yr old and she immediately said "Oh so like food is input and poop is output!" Yes we are all functions!

Golden response - bright future in programming for her.

[deleted]

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

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

a similar thing happens with folks when debugging. They assume something, and test their assumption and can happily declare victory. Instead, they should be testing _against_ their assumptions to prove their theory wrong.

> Instead, they should be testing _against_ their assumptions to prove their theory wrong.

I think this mindset should be taught explicitly starting in grade school.

If you have an idea, think how you'd disprove it, and test it. If you can't think of how you'd disprove it, that's a strike against the idea. If you can't test it, that should at least make you suspicious.

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

#139

Earlier quoted context omitted.

You may have asked him at the worst possible time for him personally. Whyever he didn't explain it at the time, I'm sure it's nothing to do with his love for you.

Oh, no question about that. When I was a kid, I tended to assume that my parents always were available to drop what they're doing and engage with you. (And which, incidentally, is surely a reason why many parents are finding working from home during quarantine to be so difficult.)

Your question may have touched a nerve, if he was getting older and no longer could see sharp.

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

#140
post #138

Earlier quoted context omitted.

a similar thing happens with folks when debugging. They assume something, and test their assumption and can happily declare victory. Instead, they should be testing _against_ their assumptions to prove their theory wrong.

> Instead, they should be testing _against_ their assumptions to prove their theory wrong. I think this mindset should be taught explicitly starting in grade school. If you have an idea, think how you'd disprove it, and test it. If you can't think of how you'd disprove it, that's a strike against the idea. If you can't test it, that should at least make you suspicious.

In theory, that's the scientific method, but aomehwt we've evolving this weird grade school science project "scientificky" method in it's place.
Post reply on HN