Live data from Hacker News

Universities finally realize that Java is a bad intro programming language

thenextweb.com

101–110 of 132 posts

Re: Universities finally realize that Java is a bad intro programming language

#101
post #92

Making Java an introductory programming language was a misbegotten idea IMO. I can sort of see the justifications: "it'll make students workforce ready", "it's a modern programming language and teaches OOP" etc. And relevance to industry is also probably why Stanford might be switching to JS. For me an intro programming language should have one of two qualities. It should either: a) have simple, easy-to-understand sy…

Rust and Go should probably also be considered for b), don't you think?

Re: Universities finally realize that Java is a bad intro programming language

#102

I think something like Racket or other Lisps are much easier to wrap your head around as a first principles language. Python has its own set of problems, and JavaScript is complicated even for experienced programmers. If something more "modern" was needed, Ruby would also be a fantastic choice. It's easy to pick up, reinforces object-oriented design, and it has Rails. I get why people think learning C first makes mor…

I can't comment on the Lisps, Python, or Ruby, as my experience with them is limited at best. However, I believe that C/++ is a fantastic pedagogical choice - admittedly, though, I am biased - this was how I was taught in college. I feel that C allows you to get up and running with the basics very quickly (hello world, basic operations with numbers and strings, file I/O, etc), and builds strong habits around using data structures efficiently.

>I think you can really see that when you look at courses that teach both C and C++, where too much time is spent on doing things in C and not really learning how to work idiomatically with C++.

I think teaching a language should not be the primary goal of most software engineering courses. Instead, a language should be chosen that complements the syllabus. This usually suggests that it plays well with a particular paradigm and doesn't have too many quirks that delay a student's progress with the material. C++, in my experience, is used to introduce students to OOP, and I think it makes a fine choice for this.

>If you compare C to a Lisp, I feel like the latter is far more applicable to modern everyday programming than the former, especially with the resurgence of functional programming.

I think it's a bit early on to say that functional is more applicable to modern programming as compared to OOP. Iterative is obviously a no-go, but most developers today are immersed in OO and BAs/product managers speak it a bit more fluently than they do FP. That said, if you're just starting out, you can probably jump in to FP more easily than you could if you were to learn OO first.

Re: Universities finally realize that Java is a bad intro programming language

#103

Earlier quoted context omitted.

Not sure how that follows. You can try to teach good habits, but you're still throwing intro students into a language that doesn't care if you follow them or not.

But surely a university environment is the best place to experiment and learn what works and what doesn't. I mean, the majority of these students will have to write JavaScript sooner or later. Better they learn it in a controlled environment.

University is hardly a controlled environment; students are encouraged to get their projects working and then ditch them. There's very little incentive to write good code.

Remember, we're talking about intro languages here. It's a much better idea to teach languages that encourage good habits because then going to "wild west" languages like javascript is much easier.

Re: Universities finally realize that Java is a bad intro programming language

#104

Earlier quoted context omitted.

Not sure how that follows. You can try to teach good habits, but you're still throwing intro students into a language that doesn't care if you follow them or not.

But surely a university environment is the best place to experiment and learn what works and what doesn't. I mean, the majority of these students will have to write JavaScript sooner or later. Better they learn it in a controlled environment.

[deleted]

Re: Universities finally realize that Java is a bad intro programming language

#105

Earlier quoted context omitted.

Not sure how that follows. You can try to teach good habits, but you're still throwing intro students into a language that doesn't care if you follow them or not.

But surely a university environment is the best place to experiment and learn what works and what doesn't. I mean, the majority of these students will have to write JavaScript sooner or later. Better they learn it in a controlled environment.

In the first programming course many students can't judge "what works and what doesn't" yet, or even appreciate the details if you tell them, and are busy enough with the basic concepts behind what they are doing.

You also can't really teach only an opinionated subset of the language, since students use all kinds of material to learn. Material about JS is often steeped in environment details (browser, nodeJS, JQuery, ...), and thanks to transpilation right now multiple versions are popular, which makes it even more confusing.

It wouldn't be impossible to teach a good intro course with JS, but I don't see any benefit in doing so, and it wouldn't make the students very effective JS programmers.

Re: Universities finally realize that Java is a bad intro programming language

#106
post #92

Making Java an introductory programming language was a misbegotten idea IMO. I can sort of see the justifications: "it'll make students workforce ready", "it's a modern programming language and teaches OOP" etc. And relevance to industry is also probably why Stanford might be switching to JS. For me an intro programming language should have one of two qualities. It should either: a) have simple, easy-to-understand sy…

I agree - I think for the most part, Java is a simple language that has straightforward C-like syntax. The main problem is specifically the boiler plate class and static main method you need to blurt out just to get anything even compiling. (Also the inevitable CLASSPATH errors that are an initiation rite for using Java).

This is a direct result of the design decision to enforce an OO class structure on all Java programs. You literally can't write any code that isn't somehow part of a "class" (an OO concept that, as an intro CS student, you haven't even learned yet).

Re: Universities finally realize that Java is a bad intro programming language

#107
Wait, they saw Java as bad beginner's language and they switched to... Javascript? It's like realizing eating carbs-heavy diet may be not healthy and then resolving to dine only on Big Macs & fries from now on.

Javascript is a good practical language, but it was never designed as a beginner's one and has tons of quirks, from minor, to major things like being kinda-OO-but-not-OO and kinda-functional-but-not-functional. And subjecting a beginner to some of the industrial JS framework code would be downright cruel.

Re: Universities finally realize that Java is a bad intro programming language

#108
post #92

Making Java an introductory programming language was a misbegotten idea IMO. I can sort of see the justifications: "it'll make students workforce ready", "it's a modern programming language and teaches OOP" etc. And relevance to industry is also probably why Stanford might be switching to JS. For me an intro programming language should have one of two qualities. It should either: a) have simple, easy-to-understand sy…

Rust and Go should probably also be considered for b), don't you think?

Maybe? I'm not sufficiently familiar with either one to state that they would be appropriate. I haven't progressed beyond "Hello world" in both. If they support manual memory management and pointers (I seem to remember Go having pointers and Rust being a C/C++ replacement should have them) they may be decent candidates also.

Re: Universities finally realize that Java is a bad intro programming language

#109
post #99
post #92

Making Java an introductory programming language was a misbegotten idea IMO. I can sort of see the justifications: "it'll make students workforce ready", "it's a modern programming language and teaches OOP" etc. And relevance to industry is also probably why Stanford might be switching to JS. For me an intro programming language should have one of two qualities. It should either: a) have simple, easy-to-understand sy…

> introductory programming language > make students workforce ready That's the problem right here - the idea that a single introductory programming course can make anyone "workforce ready".

Not that one class alone. But it may very well be that students use predominantly Java throughout their degree, starting with this course. I got my bachelors in India so we started with C++ and learned Java for just one course in year 3. But when I came to the US for my Masters everyone who went to undergrad in the US only used Java for class projects. So it may be that for students who graduated in the last ~10 years in the US, Java is their strongest language. I didn't ask anyone about their language choices at the time so I don't know this for sure; others are welcome to chime in.
Post reply on HN