Live data from Hacker News

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

m-cacm.acm.org

61–70 of 286 posts

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

#61
post #18

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.

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

Having learned C++ and Python, I feel they're similar in programming model (imperative, object-oriented). My limited experience with application or kernel C code feels like C++ but with high-level constructs replaced with pointer juggling that makes me feel uneasy (C has a culture of not using vocabulary types to communicate nullability and responsibility for deallocating). Haskell (barely know) is an altogether unfamiliar programming model, being based on pure functions instead of mutation, but the underlying model beneath the abstractions (thunks) leak through.

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

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

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

#63
First language should focus on getting started. Python works perfectly fine for this. Startup is minimal, students can start writing functional code within minutes.

Subsequent languages should match the content and focus of their classes (i.e C for Data Structures and Algorithms, C/C++/Rust for Systems Programming, Java / C# / C++ for OOP classes, Haskell/Clojure/etc. for Functional Programming classes , etc)

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

#64

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.

I think they should teach assembly in parrallel but I disagree with the evolution you're suggestion.

High level languages are expressing informational logic that actually can have nothing to do with computers, formally.

The way that the language maps to assembly, memory, cpus etc. is obviously incredibly important, but that's crossing a major boundary of abstraction.

Assembly is an under the hood implementation detail to quite a lot of CS work.

That said - of course it has to be taught - but I actually don't believe it's a 'precursor'. That's just how computers evolved. Imagine a day in 50 years when we switch to Quantum computers. Maybe 'assembly' will be something completely different then.

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

#65
post #55

Earlier quoted context omitted.

As someone who fought hard to switch careers into this industry and teaches software engineering now I understand the impulse to think this but I have to say all my experience thus far contradicts it.

Which part(s)?

Possibly replying to someone else.

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

#66
"Matter" to what end? That is, if you do not have a specific goal in mind when learning a language, then of course it doesn't matter. On the other hand, if your ultimate goal is to learn a myriad of languages so that you can jump around fields, then of course it matters, as you will likely have difficulty learning advanced concepts without understanding the basic ones. (Just as you would likely not dive into calculus without understanding algebra.)

> We don’t have to make programming about mathematics.

I also don't understand the article's interest in decoupling programming from math; that seems like trying to have physics without math or philosophy without logic. The power of the field is founded on math; you can't just sidestep around it and gain its power at the same time.

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

#67

After graduation, I fought my undergrad to switch the CS 101 course from Java to Python for the simple reason that public static void main() has a huge number of concepts built in and "just trust us, we'll cover that later" is a terrible excuse. Edit: Even now, years later, I still got them in the wrong order. Arg.

Yeah, ignoring that might be okay in a course like "Programming for non-CS Majors", but I'd expect better from an actual CS program where understanding the foundations of the language you're working with are important.

I remember the same exact thing from Java, and similar "magical words" that weren't explained but I was simply told had to be there.

Learning for/while/do loops and variable assignment and all of that is fine for a programming course, but the first semester of a CS course shouldn't just be sticking a fahrenheit to Celsius converter or a string reversal or simple sorter in between magic words and symbols.

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

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

“… sufficiently skilled […] given enough time …”

Well, sure. For some values of sufficiently and enough.

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

#69

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.

I agree. At the very least, teach assembly in the first term, at the same time as students are learning a high level language. If you know assembly, you can understand why arrays exist in C ( because CPUs have base-and-offset addressing), why records exist (same reason), what pointers are (assembly is pretty much about pointers), why ints are different from floats (ADD vs FADD) and so on, how functions are called (sy…

We have dedicated classes in computer architecture to learn all the things you mention, it's not the job of a programming language to teach them to you

When I first learn C in highschool the asign statement was what bugged me the most because I had already has a math background at that point so statements such as x = x + 1 made no sense, and even in natural science general, the idea that you can "asign" new intrinsic property to a thing is very unintuitive. 20 years later mutablity is the exact idea that I have to unlearn everyday.

My point is all these languages and learning hierarchy were made up by people like us, and in an era when frankly, they had no idea where this field was headed. We should not just blindly think because they're written in a book and sound important, that students should be condescendingly reminded about them in programming languages while they're trying to learn to solve real-world problems.

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

#70
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 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'…

The person you responded to didn't make any claims about bad teachers or good teachers. The claim is that not everyone can understand computer science. As an extreme example do you think a person who is mentally disabled can understand computer science? From my perspective it's clear to me that not everyone can understand computer science and the same applies to many academic areas.
Post reply on HN