Live data from Hacker News

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

m-cacm.acm.org

151–160 of 286 posts

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

#151

In my opinion the best sequence looks something like this: - Machine language (not assembler) — Assembler for a couple of different architectures (i.e: Von Neumann vs. Harvard, CISC vs RISC, etc) - Forth (written from scratch with one of the above) - C - LISP - APL - C++ I think of everything else beyond these mostly as C/C++ cousins or derivatives. With languages like Javascript and Python it’s far more about learni…

As someone who has taught (or TAed) undergrad courses in all but APL and machine language, I would suggest a different sequence:

- LISP / Scheme - Python - C - Assembler / machine - whatever else beyond here

maybe leave out the LISP depending on how religious one feels about it (I'm a fan, from a pedagogical approach at least).

Most students have a very weak understanding of what a computer does (i.e. Von Neumann arch, executing an infinite tape of instructions, etc). I like LISP / Scheme because it really helps bridge the gap between expressions (which students can pretty intuitively grok from high school math education) and it really has no language design warts; you can write a metacircular evaluator in ~10 lines.

Python is a next step because it goes from "how does coding work?" to "okay how can I do stuff with this?". The language itself is pretty straightforward (although certainly has its warts too, e.g. the odd methods of variable scoping), but there are a ton of libraries and it is pretty much useful straight away for anything one wants to design a course around. Many unis combine "learning Python" with programming some robot, doing an AI thing, or other such practical outcomes.

Importantly, whenever I taught a "relatively beginner Python course", I would always spend a huge amount of time on teaching students about ipdb / pdb. Allowing students to explore the state and stack of a running program is a critical doorway for them to step through to not only learn how to debug their own problems (less of a load on me!), but also really start to grok the "program is a sequence of instructions that change state" thing.

C before assembler, although I have found it's often useful to "combine" them so that the concept of a pointer seems less odd and more useful. Also, C still has tools that students can use to explore their code (e.g. gdb), whereas they're much more on their own with assembler.

After that, it really depends on what students want to do. They can stick with systems stuff and do Rust / C++ / Go or go to Javascript or go crazy with the PL stuff with Haskell, etc.

Certain people (perhaps yourself) really understand this "program is a sequence of instructions that mutates state" thing, but in my experience, most of my students really don't get that. If I were to throw them into that deep end of the pool where they lack the tools to debug their own problems, I would get a lot of bad reviews / people switching out of the major. On top of that, students often like to really be able to produce cool stuff, which they can in Python very easily. Many students may bounce off the lower level stuff if they just want to do front end too, which is perfectly fine in a "top down" approach from higher-level languages.

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

#152
Only yesterday I commented on a related thread I commented[1] thus which lead to a long subthread.

It all depends on the first couple of language that one learns and how they are learnt and taught. 10-15 years ago people would find it hard to grok Python's functional concepts. But as it began to be taught as the first language in universities and those graduates join the working population you see how it's super natural for them to grok Python.

That said, in a professional environment, one should be able to pickup ~70% of proficiency in 6-8 months if they aren't constrained by crazy timelines. This is based on my own experience.

[1] https://news.ycombinator.com/item?id=27639687

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

#153
post #136

Earlier quoted context omitted.

I've spent about 2.5 years teaching programming. Students really do seem to have some innate programming difficulty slider, which absolutely matters. Some of my students worked their absolute butts off to learn programming, and asked for help constantly (which I gave gladly). And they still barely scraped by. Other students seem to learn programming extremely easily. I would show them something one day, and the next…

I was the one who appeared to learn it super fast. In retrospect, I had comparatively large amount of preexisting knowledge - my parents shown me very basics (in basic) before and we had some programming games. And looking at my kids, this stuff matters a lot. A kid that comes in with complete zero experience has massive disadvantage against one with some experience.

This is very key. By the time I entered undergrad CS, the kids who had owned computers growing up, and played or even modded videogames, had a massive starting advantage over the ones who hadn't.

The entire first year of CS courses was mostly there to instill fundamental computer skills (not CS skills!) in the ones without that preexisting knowledge.

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

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

> “Programming fundamentals” isn’t the same from language to language. You should be able to carry very, very basic concepts over to other languages with much less difficulty than learning them the first time. A student sufficiently skilled in Python will be able to make the same intro level programs in C given enough time. Badly? Yes, but they'll function. Similarly, a watercolor artist won't forget the basics of ar…

C and Python are also languages with a pretty direct historical relationship. Going from, say, Python to Prolog, it will be significantly more challenging to identify commonalities.

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

#155
post #10

Georgia Tech around the year 2000 required most new students to take CS 1301/1311/whatever number course. It was, at one point, taught with a Pascal-derived pseudocode (incredibly unpopular, though I liked it quite a bit). Then they switched to Scheme (using SICP?) which was a fantastic catastrophe, major cheating scandal the first year. The TAs were not prepared (most had not taken it themselves and many/most were o…

This feels like a narrative in need of hard evidence. I was there at what I assume was the tail end of this in 1997. My gut was cheating was no worse then it had been, but they had automated systems for the first time. Some of it was so silly that I was accused of cheating in the C course for using and citing the hashtable implementation from the assigned textbook. On just talking to the graders and professor, they d…

From [1], 2002 187 students investigated for cheating at GT. 77 students had their final letter grade dropped by at least one letter grade, 26 received an F, 32 received a zero for the assignment, one student was suspended for two semesters.

Though I couldn’t read the full article, but that’s what it seemed to say in the first two paragraphs.

There seems to be two slashdot threads discussing the issue from 2002. Perhaps it was worse after you left?

[1] https://www.chronicle.com/article/georgia-tech-concludes-che...

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

#156

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 my (admittedly limited) experience with teaching and mentoring young programmers, it is much more important to have them write sound code-like programs before any particular implementation. Appreciating logic is a skill they will use for 50+ years.

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

#157

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…

> “I was taught like xyz, and I’m successful now and so that was definitely the right approach”. For what it's worth, the same reasoning can be heard in other fields. I work in foreign-language education, and debates about the best way to learn another language—memorize vocabulary and grammatical rules? move to a country where the language is spoken? watch a lot of movies in the language?—often reduce to competing pe…

Foreign languages come with an enormous amount of experience. Whether that experience comes from watching a lot of foreign language media or living there or something else entirely probably doesn't matter. You need to build intuition and that seems to only come with experience. Teaching in this sense tends to provide subpar results, because no teacher can spend enough time to get students the experience required to become close to fluent. (I also suspect that it's not just the amount of experience total, but that there's some kind of minimum "experience density" based on time. Eg an hour a week for 20 years might not be enough, but 2 hours every day for 1.5 years might be. But this is just a hunch.)

At least that's my personal experience. We studied English for 11 years in school, some studied it later in university too. Every single person my age that was good at it used English outside of the classroom - mostly on the internet. They had enough experience that even without knowing the grammar rules they got the right answers "because it felt right".

I think this applies to learning anything else that requires to recognize patterns works in the same way: programming, mathematics, listening to a different language, reading handwriting, fighting difficult bosses in video games etc. You can theoretically understand all the pieces, but still be incapable of utilizing them for a satisfactory result.

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

#158
post #146

Earlier quoted context omitted.

... I'm not sure anything you said is true. Unless I'm misunderstanding you. See Cambridge as a counter example of everything you said: https://en.wikipedia.org/wiki/University_of_Cambridge

I've found that for topics like this, the vast majority of Hacker News thinks the world began in 1776. Saying this, the Universities of Oxford and Paris do meet GPs argument - there were heavily theologian until fairly recently. Cambridge was too until the 16th century.

Also Bologna, the oldest and first university in Christendom. Notice that all of the subjects studied are either vocational, i.e. they lead to jobs, or the liberal arts, which are a prerequisite for studying theology.

> The university arose around mutual aid societies (known as universitates scholarium) of foreign students called "nations" (as they were grouped by nationality) for protection against city laws which imposed collective punishment on foreigners for the crimes and debts of their countrymen. These students then hired scholars from the city's pre-existing lay and ecclesiastical schools to teach them subjects such as liberal arts, notarial law, theology, and ars dictaminis (scrivenery).[17]

https://en.wikipedia.org/wiki/University_of_Bologna

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

#159

If a student has trouble transferring their knowledge of programming fundamentals from one language to another, it seems far more likely they didn't really understand them to begin with, which is a failure of teaching and testing, not some sort of 'limitation' in the student.

> programming fundamentals from one language to another,

But the fundamentals of different classes of programming languages differ. For instance, Haskell's model of computation is not Turing machine but a G-Machine. It's a different matter that G-Machine and Turing machine are equivalent and that doesn't mean learning one is sufficient to understand the other. There is very little that can be transferred between the two.

To take another example, Javascript supports continuation passing style coding where as Java didn't until very recently.

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

#160

Earlier quoted context omitted.

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

> Why do you believe that "not everyone can understand chemistry"? At least 5% of the population can’t understand algebra. If you can’t do algebra then you might be able to follow recipes but you can’t do chemistry. Without algebra you can’t do stochiometry and that’s essential for even high school level chemistry.

Can't or don't?

I think there is a huge difference between currently being unable to understand something and being unable to understand something indefinitly (e.g. because you have mental deficiency that blocks you from forming the necessary pictures in your mind).

Having thought math to mentally challenged kids, I had only one kid where I would really say he could not learn algebra at that point of his life. Mainly because he had a memory span of 10 minutes and severe developmental issues.

All the other kids where really bad at math, but given the right effort I could really improve things by just working on their stuff for 1 hour a day.

I know many tech guys like to see themselves as some kind of elite that has a secret knowledge very few others can master. But in my eyes that is just a failure of an education system.

Post reply on HN