Live data from Hacker News

Conversations with a six-year-old on functional programming

byorgey.wordpress.com

91–100 of 319 posts

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

#91
post #40
post #3

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.

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.

Yes, those are equally suitable choices as you say. Why are you implying that stopping to play frisbee would have been the more "equally suitable" choice in this situation?

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

#92
post #4

Earlier quoted context omitted.

I'm curious what you mean. Is the problem that it is a constant function, or that you are asking them to ignore parameters? Or is that missing the point, still?

A function with a linear type uses it's parameters exactly once. The concept of "linear type" doesn't relate to a the concept of "linear function" except in an abstract mathematical way.

6+a*x, a->0

same but different:

6+x/a, a->infinity

imho constant is a special case of linear

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

#93
post #14

When my son was around five or six, I did a similar exercise to explain the difference between prime and composite numbers. I told him that a number X is composite if you can fit X apples into buckets and end up with the same number of apples in each bucket. I drew 6 apples and asked whether they could be divided into buckets with an equal number of apples in each. It was immediately obvious that they could. My son c…

> I told him that a number X is composite if you can fit X apples into buckets and end up with the same number of apples in each bucket. Wrong; X is composite if you can fit X apples into buckets and end up with the same number of apples in each bucket, with at least two apples in each bucket . "You gotta tell the children the truth. They don't need a whole lot of lies. Cause one of these days, baby, they'll be runni…

This is something I saw over and over again long before I had a serious interest in technology or science at all. It’s an attitude that’s rampant in liberal arts courses.

There are “kiddie” versions of everything from History to to Music Theory to Grammar. It used to really frustrate me in undergrad how many things taught as almost moral absolutes were upended the following semester.

I sort of get it that even in junior high and high school, the teachers don’t really know anything beyond the kiddie version, so that’s what gets taught.

But at the college level, there’s no excuse for that. There’s a certain amount of science envy that some liberal arts professors have. They want to be able to say that there is one and only one way to understand a historical event or way to compose music.

Milton Babbit was famous for this in the music composition world and argued that music needed to be “elevated to a higher form like that of math or physics” and that no one expects advanced math to be accessible to lay persons. Therefore music shouldn’t be comprehensible by anyone who doesn’t have a PhD in music theory or composition. This was actually a pretty popular attitude in the “classical” music world from the 1950s to the early 80s, and the music written during that time reflects it.

Sorry to get so far off on a tangent, but while that specific fad has come and gone in music composition, there remains an inferiority complex among liberal arts academia that is extremely problematic and a general attitude among professors of all stripes that some people just can’t handle the truth: that outside of religion, there are no absolute truths.

Getting back to the Hendrix quote, I absolutely agree. Teach children as much of the truth as you know. They can take it. In my own experience teaching violin, I’ve found that I get the best response when I treat the students the most like adults. About 20 years ago I started bringing in little vignettes about music theory and history with my youngest students (4-6 years old) as a break between lesson segments where we were focusing very intensely on specific violin techniques. When I realized that they enjoyed both the context switch and the color commentary about why exactly we do these kinds of things, I brought more and more of that to the table, and it’s been very successful.

Obviously, this isn’t a robust study, it’s not meaningful in a larger scale, and it doesn’t prove anything at all.

But if the theory is that young students can handle a lot of uncertainty and a lot of advanced material at a young age, then my experience is, at least, not evidence that it’s false.

Deep down inside, I think that we need to be a lot less careful, protective, and hand-holdy about what we expose our children to. They can handle it.

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

#94
post #4

Earlier quoted context omitted.

I'm curious what you mean. Is the problem that it is a constant function, or that you are asking them to ignore parameters? Or is that missing the point, still?

A function with a linear type uses it's parameters exactly once. The concept of "linear type" doesn't relate to a the concept of "linear function" except in an abstract mathematical way.

This makes sense, but I don't see how it explains the difficulty the kid was having.

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

#95
I always liked to imagine a scenario where my daughter would invite me to her class to talk about what I did, and I would try to explain the concept of programming to young children. I would pretend to be a robot, and they would have to command me to do things, but I would only do them exactly as they described them.

I had a similar experience when I was in school and it really stuck with me. Kids love this shit, they just need it in a way that lights up their minds a bit.

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

#96
post #4

Earlier quoted context omitted.

I'm curious what you mean. Is the problem that it is a constant function, or that you are asking them to ignore parameters? Or is that missing the point, still?

The child was stuck on the intuition that the argument must change in some way (i.e. that the function was linearly typed).

Oddly, I think I'm stuck on the idea that it has to be "just once." Curious if the child could have figured out a function that needed the input twice, as an example. (So, x^2+x, or something similar.)

So, is it that it is linearly typed, or that it is greedy and wants to use all inputs given at least once?

Or, are those the same thing?

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

#98
If this anecdote is credible (and I don't see any reason it wouldn't be) then in four years this kid will ask, "What are you reading?" and then the father will say what he's reading - and then sheepishly as for help from the ten year-old on the part he's stuck on.

I mean this kid is clearly superlatively gifted.

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

#99
post #57

Earlier quoted context omitted.

I'll second this; he is a fantastic teacher. I had the incredibly fortunate opportunity of learning from Brent in my undergrad at Hendrix, where he currently teaches. There are other comments here that praise his patience with regard to teaching these topics to a child. I can say without a doubt he maintains the same patience with all of his students - not just his children. If you ever have the opportunity to learn…

You did CS at Hendrix College? I did too ('11) and can't help mentioning it even though I have little to say... because hey, small school, tiny department, it's not often you run into another Hendrix CS alum, even virtually. And after years in "industry" I really appreciate the surprisingly good CS education there for a not well known school How's the dept doing these days? Is Ferrer still there?

Hi Domingo, This is Dr. Ferrer. I am pleased to tell you that I am still at Hendrix College, now completing my 16th year. We're doing well. We hired Dr. Mark Goodrich after Collins retired (2014), and we hired Dr. Brent Yorgey (the author of this blog post) in 2015 after Burch departed for Google. Both have been fantastic contributors to the CS program and to Hendrix College.

I'm glad that your education has served you well! I'd love to hear an update from you when you get a chance.

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

#100
Fun(ctional)!

When my daughter was in 4th grade, I volunteer-taught a group of pull-out 4th–6th graders, so that she could have some peers to do math with.

You might enjoy this set of math worksheets I created for them. https://www.scribd.com/document/15720543/Squarrows [EDIT: now also at https://drive.google.com/open?id=1hfzm3Rvm4xpwp_xHUKBHxuIEgf...]

I was learning category theory at the time. I gave them some element-chasing problems so they could work on the same areas I was studying, although at a different level of abstraction.

We also did some stuff on permutahedrons, and relating single-character-replacement paths (I think Nabokov calls these “rooks path”, when each step is a word) from AAA → BBB, to geometric cubes, and 2³, etc., but I didn't collect the worksheets for those into the same document.

Post reply on HN