Live data from Hacker News

Conversations with a six-year-old on functional programming

byorgey.wordpress.com

261–270 of 319 posts

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

#261
post #89
post #80

Earlier quoted context omitted.

...who told you that lie? An educational psychologist? More like "at age 12 even the most incompetent teacher can teach things involving abstract/counterfactual thinking to even the least intelligent child"... the bad ol' "lowest common denominator thinking" and the other horrors of our standardized educational systems :| Unfortunately it's not economically feasible to lecture to children in a classroom unless you ca…

> ...who told you that lie? An educational psychologist? https://en.wikipedia.org/wiki/Piaget%27s_theory_of_cognitive... Fine, I was off by one year.

Piaget's classification of thinking skills is good, but the theory that these kinds of thinking are developed in discrete stages at those ages has only vague experimental support.

Young children can engage in basic counterfactuals. Ask one.

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

#262
post #89

Earlier quoted context omitted.

> ...who told you that lie? An educational psychologist? https://en.wikipedia.org/wiki/Piaget%27s_theory_of_cognitive... Fine, I was off by one year.

Still a lie. And you still believe in it even after seeing an example in contrary.

It takes far more than one anecdote to outweigh the evidence in support of Piaget's model.

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

#263

Earlier quoted context omitted.

Your comment seems confused in exactly the same way as coldtea's. How are you imagining turning input 20 into output 6 without acting on the input? If you don't act on the input, you have an identity function , not a constant function. Constant functions must alter their input whenever it doesn't match the constant output. Nobody ever complained that the problem with Procrustes was that he didn't do anything to the g…

> Your comment seems confused in exactly the same way as coldtea's. How are you imagining turning input 20 into output 6 without acting on the input? Easily: f(x) = 20 No action on the input -- discarding the input is not an intuitive action for a 6-year old that just got a handful of of ax+k and x k + n style examples. > Nobody ever complained that the problem with Procrustes was that he didn't do anything to the gu…

> f(x) = 6

Fixed, for the sake of corresponding more exactly with the challenge. Not that it wasn't clear what you meant :)

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

#264
post #249

Earlier quoted context omitted.

Yes: Joy. https://en.wikipedia.org/wiki/Joy_(programming_language) (Shameless plug for my own implementation: http://joypy.osdn.io/ )

Can you please explain why Joy is simple to a non-programmer ? because all i see is verbose language, and i know some programming.

> Can you please explain why Joy is simple to a non-programmer ?

I don't know, but I'll try.

It's simple, small, and fun.

First, everything about it is simpler than most other languages. (It may be the simplest useful language, e.g. "Brainf*ck" is simpler but impractical.)

Second, there are many small basis sets of functions that provide Turing-completeness. Meaning that you only have to master a few functions to be able to build any possible function.

Third, developing code in Joy is very like a simple puzzle-solving game, it's very fun.

I may be teaching it to non-programmers in a kind of seminar or course soon, so if you are really interested in real-world data please check back on the Thun site in a month or two. Feel free to get in contact with me through that site as well.

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

#265

Earlier quoted context omitted.

If you do have 8 kids, that's amazing. I have 5 myself and most of the time I feel more like a zookeeper/riot policeman than a dad.

Economies of scale. The kids work together, play together, teach each other, and parents facilitate (often leading to interesting conversations like the one in the article). It's actually probably a little easier than having 5.

A coworker keeps telling me (I'm a parent of one, and intend to stay that way) that having a big family like his is easier, since the older kids can take care of the younger kids.

Which sounds totally plausible and correct, 'cept it'll take you awhile to get up to that sort of economy of scale :P

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

#266
post #180

Earlier quoted context omitted.

"It's better to be young, rich and healthy than old, sick and poor" is probably not the most novel insight worth writing down for the benefit of others.

I believe the insight that I was sharing is that it matters in this case, as many people would not realize that it is relevant here.

You think 'a lot of things that take time are easier when you have the means to do whatever you want with your time' is something that eludes most people? About anything much, really, be it child rearing or laundry? I think that is very, very unlikely.

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

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

Just read Week 1 of this course - very easy to follow. Although with a different instructor, there are later versions - http://www.cis.upenn.edu/~cis194/fall16/ seems the most recent, with plenty of updates since the spring13 course. I'll be reading more!

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

#268

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.

The gist of music theory: It sounds interesting when sounds with simple frequency ratios are played at the same time. E.g., playing a 440 Hz tone at the same time and 660 Hz tone has a 2:3 ratio. Some combinations of frequencies, when played before or after other combos can establish an expectation and then either fulfill it or negate it. E.g., if you take the ratio above and then play 440 + 587, it'll sound like it'…

This is really easy to follow:

https://www.lightnote.co/

Already learned some things, thanks!

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

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

If you’re interested in the subject, look up Adam Neely on YouTube. A great channel with a series of 10-minuteish videos on various interesting topics in music, from theory to history to physics and beyond. Not so much a “course” in music theory, morning e of a series of one-off topics mostly accessible by a lay audience. Might be good conversation starters with your son :)

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

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

One thing that makes this easier is being rich. What I mean by that is for example, when my kid is asking me questions or wants to "do it myself!", the fact that I have a flexible schedule helps immensely, and that flexible schedule is possible because I can turn down work that doesn't give me that flexibility. If I had a strict clock-in/clock-out job, and only had limited time to run errands, I'd have a lot less pat…

We actually made a decision to cut our income considerably in order to be as involved as we can in our kids upbringing - we're basically almost always able to go to school concerts, we always eat together, we practically never aren't with them at bedtime, etc..

It's great. But I think we missed the balance a little - there are so many life experiences that are out of reach that we parents experienced when we were kids. Yes being tight with our kids is awesome - but when they get old enough to spread their wings a little, and when they're inquisitive about new things, then supporting that is exceedingly difficult when you're of low means.

School skiing trip? Not a chance, way out of our price bracket. Holiday abroad? Same, the interest is there, they're keen to learn geography/languages/culture. Piano lessons? Same, we've got a keyboard, one child is really keen and show some ability but we don't have means to support him in that and let him find fulfilment through that creativity.

But I do get to talk Fibonacci series; build fires in the woods; teach them about how aliens with 0, 4, 16 fingers count; but buy an up to date globe, or take them for a train ride, or go on a boat, or have a pet, or visit a mountain, ...

My problem is not time so much, nor fostering inquisition, but resources to develop the questioning in to solid foundations. Our kids are not the free-spirits of knowledge-hunger we anticipated because we instead have to follow economics.

Post reply on HN