What is truly astounding about this is the patience to even attempt to explain free theorems to a 6 year old. Most parents would likely answer "math" and that would be the end of it. I don't (yet) have kids, but when I do I hope I have the wherewithal to recognize and take advantage of moments like these.
I'm a father of two girls, ages four and nine. Explaining things to them and seeing the dawn of understanding in their eyes in easily my greatest joy in life. As a parent, I basically get to relive this xkcd[0], over and over, every day. We take it to an extreme - we unschool[1]. We do our best to treat our daughters as any other member of the family, expecting to act as adults to the extent that they're able to do s…
Conversations with a six-year-old on functional programming
61–70 of 319 posts
Re: Conversations with a six-year-old on functional programming
#62Earlier quoted context omitted.
This and this: >> I think he was just stuck on the idea of the function doing something arithmetical to the input, and was having trouble coming up with some sort of arithmetic procedure which would result in 6 no matter what you put in don't really seem, to me, like they can explain what's happening -- f(x) = 6 is trivially easy to express in terms of arithmetic operations being applied to x. If you assume that a fu…
> what's wrong with a function that multiplies by 0? Obviously the fact that it doesn't seem to have any visible effect on the input -- and people expect the input to be affected.
Your comment is more of an indictment of identity functions than dimension-losing functions.
Re: Conversations with a six-year-old on functional programming
#63Side question: maintenece of functional programs is easier, because you don't need to think about state. Could it be used to create a functional programming language, easily understood by non-programmers or beginners , so they too could take a program and adapt it to their needs ? Does such language exist ?
Lisp is perfectly suited for this task due to the minimal and familiar syntax to non-programmers. Math should be taught in prefix notation if u ask me.
Re: Conversations with a six-year-old on functional programming
#64Earlier quoted context omitted.
It was a strange context switch if it was sarcasm...
It was self-deprecating humor aimed at acknowledging that all parents are pretty sure their children are the smartest humans to have ever walked the earth. At least that was my reading and it gave me a chuckle.
Although there may be a useful metaphor here that the solutions are often easier or more "obvious" than they seem, and people often get lost in the details and busywork, missing the forest for the trees. So having a simple (but receptive) wall to bounce ideas off of (such as a 6yr old) helps break through the noise to focus on core / fundamental / primitive ideas from which more complex breakthroughs spawn.
Re: Conversations with a six-year-old on functional programming
#65What is truly astounding about this is the patience to even attempt to explain free theorems to a 6 year old. Most parents would likely answer "math" and that would be the end of it. I don't (yet) have kids, but when I do I hope I have the wherewithal to recognize and take advantage of moments like these.
Note kid asked "dad what are you doing", not "what is functional programming". That's a simple call for attention, and it was equally suitable to close the book and play frisbee with him.
Re: Conversations with a six-year-old on functional programming
#66Earlier quoted context omitted.
> what's wrong with a function that multiplies by 0? Obviously the fact that it doesn't seem to have any visible effect on the input -- and people expect the input to be affected.
Affected? f(x) = 6 has a pretty obvious effect on all input other than 6. Your comment is more of an indictment of identity functions than dimension-losing functions.
Re: Conversations with a six-year-old on functional programming
#67Re: Conversations with a six-year-old on functional programming
#68Earlier quoted context omitted.
It was a strange context switch if it was sarcasm...
It was self-deprecating humor aimed at acknowledging that all parents are pretty sure their children are the smartest humans to have ever walked the earth. At least that was my reading and it gave me a chuckle.
I get the joke, now that I know it was a joke. You never know who's on the other side of the wire, and for all I know you might have some genius kid. My 5 year old is into Nerf guns and Mario, but again, this _is_ HN...
Anyway, I'll take my downvotes and move on. Thanks for sharing the story, I might try explaining it like this to my kids!
Edit: oops thought I was replying to jawns
Re: Conversations with a six-year-old on functional programming
#69Side question: maintenece of functional programs is easier, because you don't need to think about state. Could it be used to create a functional programming language, easily understood by non-programmers or beginners , so they too could take a program and adapt it to their needs ? Does such language exist ?
Lisp is perfectly suited for this task due to the minimal and familiar syntax to non-programmers. Math should be taught in prefix notation if u ask me.
> Math should be taught in prefix notation if u ask me.
Perhaps it should, but it's not.
Or was this whole post sarcasm, and it was done so well that I missed it?
Re: Conversations with a six-year-old on functional programming
#70Well, maybe the 3 year old still has a chance.