Live data from Hacker News

Conversations with a six-year-old on functional programming

byorgey.wordpress.com

141–150 of 319 posts

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

#141

Earlier quoted context omitted.

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

> 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.

Music academics who envy scientists or engineers have a misplaced envy. They should properly envy those who fill concert halls and sell records. Just as does many a scientist or engineer who plays some instrument on the side.

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

#142
post #2

>\lambda x.\, 6 was also surprisingly difficult for him to guess (though he did get it right eventually). 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! It simply hadn’t occurred to him that the machine might not care about the input. (Interesting…

I have a series of programming assignments in my introductory course that has students write simple functions in Python. One of those functions is to consume nothing and returns their (the programmer's) current age. So for example, you might write

    def get_my_age():
        return 21
The students' reaction to this in office hours can be... interesting. I am curious how many of them actually follow the comment at the bottom of the question, and what they think:

> Reflect on the difference between creating a variable with a constant value and creating a function with no arguments and a constant return value.

Up to you to decide if this has any pedagogical value. The real learning objective was to "write a function that has no arguments but returns a constant value", so getting them to draw big conclusions about the nature of functions and values and so on is outside the scope of this little activity.

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

#143

"If you can't explain it simply, you don't understand it well enough." - Albert Einstein Brent definitely understands it well enough.

Einstein never said that, though: https://skeptics.stackexchange.com/questions/8742/did-einste....

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

#144
post #49

Earlier quoted context omitted.

It's an immense amount of effort to do it consistently. And it gets harder with each kid, at least for me. One of the things you figure out is that some kids aren't interested. And if your kid isn't interested in thinking about prime numbers, you're going to be hard pressed to change that. Conversely they will have interests that you don't share, and it's going to be harder for you to participate meaningfully in that…

My teenage son is a musician and is taking AP Music Theory right now. I ask him to tell me about what he is learning, and he patiently tries to explain it to me, but I just nod along because I have no idea what he's talking about.

Don't feel bad about that! My dad didn't know what the hell I was talking about when I was learning C++ as a teenager, but he asked anyway because he saw I got excited about it.

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

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

The original is correct, it says "apples" not "apple(s)".

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

#146

Earlier quoted context omitted.

My teenage son is a musician and is taking AP Music Theory right now. I ask him to tell me about what he is learning, and he patiently tries to explain it to me, but I just nod along because I have no idea what he's talking about.

Don't feel bad about that! My dad didn't know what the hell I was talking about when I was learning C++ as a teenager, but he asked anyway because he saw I got excited about it.

Wow, more parents should be like that! I'm not a parent, but I try to do the same kind of thing for friends and coworkers in hopes of spreading the idea that others' interests are worth attention and respect even if you don't share them.

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

#147
post #99

Earlier quoted context omitted.

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

I love HN for all these random connections, even if I have no skin in the game!

Me too. I feel like the world is not as big as it actually is!

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

#148

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

Thanks! I think my 6yo would like doing these (though he doesn't have a strong grasp of multiplication/division yet).

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

#149
post #45

Brent is one of the greatest teachers I've ever experienced. I used to take classes from him (and TA some others he taught) and was consistently blown away by his enthusiasm and capacity for sharing concepts. He has a great essay on pedagogy as well ( https://byorgey.wordpress.com/2009/01/12/abstraction-intuiti... ) If you're interested in learning some of the beautiful foundations of functional programming, I highly…

Took a class with Brent at Williams College when he visited for a year. Brent is awesome!! :)

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

#150
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.

As a parent, I agree. One should not shy away from talking about "advanced" topics. Kids are naturally curious and bright and I think we should encourage their desire to learn and understand complex things. I worry that if you try to dumb down things for kids, they might become interested in dumb things. :) Also, as the OP mentions, it can be a fun "pedagogical challenge" to try to explain free theorems or turing com…

When my daughter was 10 we were waiting in line to checkout at a Home Depot. She asked me what was algebra. I think she had heard the older kids mention it. I responded with a question. "A plus B = 10, and A minus B = 1. What are the values of A and B?" She puzzled it over while I check out. Then her face lit up like a whole realm of knowledge had just opened up to her, and she proudly told me the answer. It's a special moment that we will both always remember. She told me that as a camp counselor that she has challenged younger kids who seemed bored with the same problem.

Do challenge your kids intellectually beyond their years and you might be pleasantly surprised. My daughter heads to CERN in two weeks to study anti-matter, and I have no doubt that our brief intro to algebra at a Home Depot has a small role to play in that journey. Maybe Star Trek did too :)

Post reply on HN