Live data from Hacker News

Relating natural language aptitude to differences in learning programming

nature.com

41–50 of 50 posts

Re: Relating natural language aptitude to differences in learning programming

#41
They asked the subjects to write a Rock Paper Scissors game in python. Then asked programmers to mark what people did. They unfortunately didn't provide the source code the subjects wrote.

From what I've seen online this is done with an if/else tree which is very far from a good solution.

The way I would model this is with a group [0]. Something you can't possibly see without a very substantial background in mathematics.

Programming has as much to do with learning a programming language as novel writing has to do with learning punctuation.

[0] in Python3.6+:

    import random

    class hand:
        wins = {'r': {'r': 'r', 'p': 'p', 's': 'r'},
                'p': {'r': 'p', 'p': 'p', 's': 's'},
                's': {'r': 'r', 'p': 's', 's': 's'}}
        def __init__(self):
            self.value = random.choice(list(hand.wins.keys()))
        def assign(self):
            value = input("enter r, p or s: ")
            assert value in hand.wins.keys()
            self.value = value
        def __mul__(self, other):
            return hand.wins[self.value][other.value]
    
    if __name__ == "__main__":
        for i in range(10):
            h1 = hand()
            h2 = hand()
            print(f"{h1.value} * {h2.value} = {h1 * h2}")

Re: Relating natural language aptitude to differences in learning programming

#42

Earlier quoted context omitted.

A majority of Europeans speak 2 languages, a quarter speaks 3 or more. So it isn't a white thing, it is an American thing. And it isn't because Americans are dumber than Europeans, it is just because learning new languages makes more sense for Europeans than for Americans due to those languages being smaller and foreign languages being physically closer. Also mastering a single language is harder than learning to get…

>A majority of Europeans speak 2 languages, a quarter speaks 3 or more. You haven't met many Europeans have you. Not all of them are Dutch, Scandinavian, urban youth or immigrants. >a majority of them are not really all that good even in their mother tongue as we can see from standardized testing This makes no sense. You can't be not good in your mother tongue - it's your mother tongue . Standardized testing has no s…

I had a great-grandmother from rural Moldova. She spoke Vlach, Bulgarian and Russian.

Speaking three languages is not a big deal when you live in a village where everyone else speaks them.

Re: Relating natural language aptitude to differences in learning programming

#43

Earlier quoted context omitted.

>A majority of Europeans speak 2 languages, a quarter speaks 3 or more. You haven't met many Europeans have you. Not all of them are Dutch, Scandinavian, urban youth or immigrants. >a majority of them are not really all that good even in their mother tongue as we can see from standardized testing This makes no sense. You can't be not good in your mother tongue - it's your mother tongue . Standardized testing has no s…

I had a great-grandmother from rural Moldova. She spoke Vlach, Bulgarian and Russian. Speaking three languages is not a big deal when you live in a village where everyone else speaks them.

Apologies, I'll amend my previous comment.

>You haven't met many Europeans have you. Not all of them are Dutch, Scandinavian, urban youth, immigrants or throwawaybbb's great-grand-mother.

Re: Relating natural language aptitude to differences in learning programming

#44
post #19

Earlier quoted context omitted.

Number of language spoken is largely a function of the environment and doesn't have much to do with intelligence. If you take a highly multilingual African and drop them in America, in two generations you will likely have mostly monolingual descendants.

Not confirmed by current immigrants. https://en.wikipedia.org/wiki/African_immigration_to_the_Uni...

You'd have to link to something more specific than "African immigration to the US" to make your point.

Re: Relating natural language aptitude to differences in learning programming

#45
post #22

Earlier quoted context omitted.

Honestly the biggest benefit I can see with knowing some math beyond basic arithmetic for some types of programming is understanding code complexity and big-O notation. If you're doing 3D graphics projections you're going to want linear algebra. If you're doing financial forecasts you'll probably want to know calculus. If you're modeling throughput of large menssage-passing systems with multiple cooperating processes…

I don't disagree with you, but as far as I'm aware the study was talking about "numeracy", not math. From the Wikipedia article on "numeracy": Fundamental (or rudimentary) numeracy skills include understanding of the real number line, time, measurement, and estimation.[3] Fundamental skills include basic skills (the ability to identify and understand numbers) and computational skills (the ability to perform simple ar…

Well, numeracy and "fundamental numeracy" / "rudimentary numeracy" leaves a bit of wiggle room. Conditional probabilities and the ability to interpret charts already are quite a bit more advanced than percentages. None of this is really as helpful as Boolean logic for basic programming skills in a high-level language.

Re: Relating natural language aptitude to differences in learning programming

#47
post #39

Earlier quoted context omitted.

>> Imagine that we roll a fair, six‐sided die 1000 times. Out of 1000 rolls, how many times do you think the die would come up as an even number? A classic example of a question you can only answer if you don't know what you're talking about. I bet they think the answer is 500. 500 is the most likely result, but the odds of actually getting 500 heads on 1000 flips of a fair coin are 2.5%, 1 in 40. A little ways out,…

Isn't the correct answer about 500? Sure, getting exactly 500 would not be highly probable. But getting approximately 500 would be.

Is "approximately 3.5" the answer to "which number will come up when I roll this 6-sided die once?"?

Re: Relating natural language aptitude to differences in learning programming

#48
post #39

Earlier quoted context omitted.

Isn't the correct answer about 500? Sure, getting exactly 500 would not be highly probable. But getting approximately 500 would be.

Is "approximately 3.5" the answer to "which number will come up when I roll this 6-sided die once?"?

The Expected value would be exactly 3.5 ( https://en.wikipedia.org/wiki/Expected_value#Finite_case ). But isn't the question malformed since for a single role only one of the discrete values can come up?

Re: Relating natural language aptitude to differences in learning programming

#49
post #48

Earlier quoted context omitted.

Is "approximately 3.5" the answer to "which number will come up when I roll this 6-sided die once?"?

The Expected value would be exactly 3.5 ( https://en.wikipedia.org/wiki/Expected_value#Finite_case ). But isn't the question malformed since for a single role only one of the discrete values can come up?

How is "which number will come up when I roll this die?" better or worse posed than "how many even numbers will come up when I roll this die several times?"?

Re: Relating natural language aptitude to differences in learning programming

#50

Earlier quoted context omitted.

I had a great-grandmother from rural Moldova. She spoke Vlach, Bulgarian and Russian. Speaking three languages is not a big deal when you live in a village where everyone else speaks them.

Apologies, I'll amend my previous comment. >You haven't met many Europeans have you. Not all of them are Dutch, Scandinavian, urban youth, immigrants or throwawaybbb's great-grand-mother.

My grandmother knew 6 languages.
Post reply on HN