Live data from Hacker News

Why did we ever think a student's first programming language didn't matter?

m-cacm.acm.org

111–120 of 286 posts

Re: Why did we ever think a student's first programming language didn't matter?

#111

Given the ever-increasing amount of automation in the economy, I believe that programming (of one form or another) is going to become a skill as important as writing. Everyone learns how to write in school, even though only a few become novelists or journalists. Similarly, everyone will learn to code even though only a few will become data scientists or software engineers. Programming for non-professionals looks a lo…

I'm fairly sure that the average programmer today writes scripts for processing data in Python (or in R, Matlab, or something like that). Software engineers, data scientists, and other similar professionals who define themselves by their skills rather than their field are already a minority among programmers.

Or maybe I'm just spending too much time with biologists.

Re: Why did we ever think a student's first programming language didn't matter?

#112
There’s a lot of folks in this thread who’ve shared their personal experience with learning and teaching programming languages. Some attempt to generalise this experience into principles of how much the first language matters and how to choose it.

It would move the conversation forward if people were up front about which metric they’re trying to move. For example, here are two equally valid pedagogical goals that are in tension with each other - helping everyone become a programmer (no dropouts) and making sure every programmer meets some pre-defined criteria (strong understanding of memory layout or type theory or ability to build products). If your pre-defined criteria includes understanding of type theory, you might start with Haskell. Certainly all surviving members of your starting cohort would succeed according to your criteria, but this is only success if you didn’t mind people dropping out. Conversely, a language like python might help fewer students drop out, but they might have “weaker fundamentals” for some definition of that.

So let’s be clear about what success looks like. Let’s state a hypothesis for success and which metrics we’ll use to measure that. Let’s verify that hypothesis by offering the teaching approach to similar groups and interpreting the results.

We can do better than “I was taught like xyz, and I’m successful now and so that was definitely the right approach”.

Lastly, some people in this thread claimed that anyone can become a programmer if the teaching is good enough. On this, I’d like to paraphrase fictional food critic Anton Ego - “only now do I understand what was meant by the motto ‘Anyone Can Cook’. Not everyone can become a great artist, but a great artist can come from anywhere.”

Re: Why did we ever think a student's first programming language didn't matter?

#113

Earlier quoted context omitted.

> I don’t think everyone can understand computer science. This is a bold claim. None of us are special for working in tech. Our life has presented us the opportunity and passion to invest ourselves deeply in the field, often at great opportunity cost. Saying that a bad teacher makes no difference in student outcomes is equally ridiculous as saying an excellent teacher makes no difference in student outcomes. If that'…

>> I don’t think everyone can understand $RANDOM_DISCIPLINE. > This is a bold claim. I disagree. What makes computer science so special that it can be understood by everyone, while it is generally accepted that other disciplines cannot? After all, saying "Not everyone can understand chemistry" doesn't draw the same ire.

Why do you believe that "not everyone can understand chemistry"?

Perhaps I should be a little more specific. When I say "everyone" below, I mean "the overwhelming majority of people in the average range of human intelligence, without debilitating mental deficiencies". This group spans virtually everyone you are likely to encounter, from car mechanics to school teachers, to postal workers, to professional software engineers.

People have blind spots, but in general they're pretty smart when it comes to the things they think about every day. I believe:

* Everyone has the mental capacity to learn $RANDOM_DISCIPLINE if they put in the time and effort. A good teacher can dramatically accelerate the process, while a bad teacher can bring the process to a grinding halt.

* Everyone has a limit to how well they can understand $RANDOM_DISCIPLINE, (even Terrence Tao) but most careers do not demand that workers reach that limit. One can be a successful researcher without performing at the same level as Terrence Tao. One can be a successful software engineer without being a computer science researcher. One can understand advanced topics in math or computer science or chemistry without having personally discovered them. One can work as a chemistry lab technician, or a high-school chemistry teacher without winning a Nobel prize.

You can replace $RANDOM_DISCIPLINE with things like "computer science", "constitutional law", "how to reassemble a car", "chemistry", etc.. If you start getting very specific, you might be able to get me to disagree with statements like "Not everybody has the mental capacity to have invented Inter-universal Teichmuller Theory".

Re: Why did we ever think a student's first programming language didn't matter?

#114

I think you should teach assembly language first, and then build a few simple high-level langauges on top of that. I suspect it would prevent a lot of mental dross from forming.

Schools don't want too many of their students to quit. Especially when other schools start with more friendly programming languages. Assembly is important to know about relatively quickly, but I think it's a recipe to make people hate computer science when it's the first programming language.

Re: Why did we ever think a student's first programming language didn't matter?

#115
post #105
post #99

Even MIT abandoned Scheme and SICP and switched to Python. There's a beautiful elegance to that approach. It gives a sense of the mathematical foundation of computer science. It's not that useful for building large programs from off the shelf libraries, which is what almost everybody does today. At one time, computer science required a good understand of what's in Vol. 1 of Knuth. That's not in much demand any more.…

Where can one find those hash table theorists? (Just curious, that sounds really interesting actually)

I wrote some hash tables at an automated trading firm. They were really only suitable for our exact access pattern though.

Usually you find people like this making libraries or programming language runtimes I guess.

Re: Why did we ever think a student's first programming language didn't matter?

#116
post #105
post #99

Even MIT abandoned Scheme and SICP and switched to Python. There's a beautiful elegance to that approach. It gives a sense of the mathematical foundation of computer science. It's not that useful for building large programs from off the shelf libraries, which is what almost everybody does today. At one time, computer science required a good understand of what's in Vol. 1 of Knuth. That's not in much demand any more.…

Where can one find those hash table theorists? (Just curious, that sounds really interesting actually)

I don't know if you'd call him a theorist, but I think this gentleman maintains GHashTable and I found his posts comparing/benchmarking widely used hash tables really informative and entertaining:

https://hpjansson.org/blag/2018/07/24/a-hash-table-re-hash/

Re: Why did we ever think a student's first programming language didn't matter?

#117
post #110

Earlier quoted context omitted.

There's really no reason to go to university if all you want is to write some Python scripts. University is not vocational training.

> University is not vocational training. I'll believe that when employers stop giving preference to people with university credentials. Until they do that, the primary reason most people go to university for CS will continue to be 'for vocational training.' People follow incentives.

Employers don't prefer university graduates because universities offer better vocational training. Universities teach scientific thinking which makes students better employees. Universities don't teach specific skills but they teach the underling principles.

Re: Why did we ever think a student's first programming language didn't matter?

#118
post #29
post #18

Earlier quoted context omitted.

> If a student has trouble transferring their knowledge of programming fundamentals “Programming fundamentals” isn’t the same from language to language. It’s inconceivable that a student who learned to program with python would develop the same type of fundamental understanding as a student who used C (to develop an understanding of memory-level APIs) or Haskell (to develop an understanding of type and semantic theor…

I think you’re vastly overestimating programming fundamentals. Every language can do some form of if then else be it machine code with goto’s or purely functional. Ask someone to find the absolute value of a number and they should be able to quickly figure out something that works in a new language. The basics of programming are not about being correct so much as not being lost.

> Every language can do some form of if then else

Uh, not exactly. I had a really hard time learning prolog because it doesn't really have if-then-else. Haskell is missing the idea of something happening after something else. Stack languages don't have variables. And so on - there's a lot more to programming than python.

There's a big class of popular structured / OO languages which are quite similar (C, JS, Python, Java, etc). But they certainly aren't "every language". Not by a long shot.

And even amongst those languages there's huge variety in how the grain of the languages shape the code we write. I was talking to a grizzled old programmer at a conference a few years ago about the performance of java vs C. He said in some benchmarks he did the performance was almost identical. I got him to show me his code - and sure enough, he wrote java as if it were C. He was using native java arrays everywhere and basically everything was a primitive variable, in huge classes acting more as buckets for code than anything else. His code was unrecognisable as java because he was still writing C, just with a different syntax.

> The basics of programming are not about being correct so much as not being lost.

The basis of programming is expression. The most idiomatic way to express yourself in each language is very different. Its as much cultural as it is syntactic.

Re: Why did we ever think a student's first programming language didn't matter?

#120
post #20

I think it is possible to teach concepts like variables, loops, conditionals regardless of the language.

What about pointers? They are fundamental to data structures, and languages which doesn't clearly show the difference between pointers and values makes understanding data structures much harder, as many data structures relies on multiple pointers pointing to the same data and that simply doesn't make sense if you seem them as separate values.

That depends on purpose of the teaching. If you want to teach them basics what the thread starter mentioned is enough. If you want the deeper understanding you should teach them how it boils down to machine code or add a bit of Assembly to the menu. It explains pointers and other such things pretty well.
Post reply on HN