Live data from Hacker News

Conversations with a six-year-old on functional programming

byorgey.wordpress.com

211–220 of 319 posts

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

#211
post #177

Earlier quoted context omitted.

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

Coincidentally a friend at University had a dad who worked at CERN. His number one goal was to not work at CERN.

Do you know why?

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

#212

Earlier quoted context omitted.

I was also stuck thinking in integers for a few seconds, perhaps because of the context. But yeah, a 10-year-old would already know about fractions.

I also mentally started thinking about integral solutions. I wonder if it's also because of the variable names... a,b,c tend to be used to represent integers (e.g. Fermat's Last Theorem, Euclid's algorithm etc). x and y are more commmonly used to represent real numbers.

Random aside: once in high school I took a math puzzle test. The only problem I skipped was because they asked for "integral solutions." I knew the word "integral" only as belonging to calculus, about which I knew nearly nothing at the time. If I had realized in context it just meant "integer" I could have done it!

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

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

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

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

#215

Earlier quoted context omitted.

I was also stuck thinking in integers for a few seconds, perhaps because of the context. But yeah, a 10-year-old would already know about fractions.

I also mentally started thinking about integral solutions. I wonder if it's also because of the variable names... a,b,c tend to be used to represent integers (e.g. Fermat's Last Theorem, Euclid's algorithm etc). x and y are more commmonly used to represent real numbers.

Thanks for pointing that out. I'll use X and Y next time I share this story. Of course my daughter wouldn't have known at the time about the distinction, and neither did I - it having been too long since doing algebra ;)

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

#216
post #212

Earlier quoted context omitted.

I also mentally started thinking about integral solutions. I wonder if it's also because of the variable names... a,b,c tend to be used to represent integers (e.g. Fermat's Last Theorem, Euclid's algorithm etc). x and y are more commmonly used to represent real numbers.

Random aside: once in high school I took a math puzzle test. The only problem I skipped was because they asked for "integral solutions." I knew the word "integral" only as belonging to calculus, about which I knew nearly nothing at the time. If I had realized in context it just meant "integer" I could have done it!

They did make it a tricky question!

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

#217

I'm taking a discrete math class right now. How is this read: \lambda x.\, x - 3 and what is a simple example? In a discrete math perhaps it is the same as "All x, x is an integer such that...."?

> "How is this read: \lambda x.\, x - 3"

I'd read it as "Lambda x maps to x - 3."

In Python, you can rewrite lambdas as regular functions if you want.

    lambda x : x - 3
is the same as

    def f(x):
        return x - 3
This runs in the IDLE as such:

    >>> f = lambda x : x - 3
    >>> def g(x):
    ...     return x - 3
    ... 
    >>> f(0)
    -3
    >>> g(0)
    -3
    >>> (lambda x : x - 3)(0)
    -3

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

#218
post #177

Earlier quoted context omitted.

Coincidentally a friend at University had a dad who worked at CERN. His number one goal was to not work at CERN.

Do you know why?

(My guess)

She spent her teens trying to get away from dad, why spend her working life there? :)

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

#219

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…

This is super fun and such good timing! Thanks for sharing this.

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

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

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's moving forward and that the second combo has 'arrived' as you might have expected. The 587 is derived by fixing the first note but inverting the relationship from 2:3 to 3:2 (and then doubling the frequency of the second so you don't have to move so far from 660).

Most everything beyond is attaching labels to the frequencies and combos. Just as we have names for frequencies of light (red, yellow, blue) and patterns (gradient, checkerboard) there are names for frequencies of sound (A, C#, E) and their combinations (major, minor). There are also more esoteric terms (chiaroscuro in painting, neapolitan flat 9 in music) for people who've spent so much time on a subject that the basics have become boring.

Oh, and there's also divisions of and patterns for time in music theory. E.g., "hold this note for twice as many milliseconds as the previous one".

There have been some good resources here on HN: https://hn.algolia.com/?query=music%20theory&sort=byPopulari...

Post reply on HN