Live data from Hacker News

Universities finally realize that Java is a bad intro programming language

thenextweb.com

91–100 of 132 posts

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

#91

Earlier quoted context omitted.

I agree. Although JS is a powerful language, it is not suitable to teach in an introductory environment. How about C? It makes the student grasps not only logical constructs but also introduce a portion of computer organisation and architecture.

The Stanford curriculum goes from Java to C++ to C in the first core year of classes. Our final project is a memory Allocator (Malloc, Realloc, Free). By the end, students really do grasp computer organization and architecture.

Funny--I learned in pretty much the opposite order: Assembly -> C -> C++ -> Java. Seems odd to go top-down but who's to say which way is better..

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

#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 syntax so that students can learn the fundamentals of stitching together a series of logical steps into a working program

OR

b) be low-level so that students learn computers and programming from the ground up. I mean registers and pointer arithmetic and memory allocation/deallocation.

Either is a valid approach. For a) the most obvious candidate (to me) is Python. For b) it's either some sort of assembler language (my first language was 8086 assembler) or C

Java is a "tweener" language; it's not simple enough to teach programming and logic, but not low-level enough for students to understand computers at a basic level.

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

#94

Earlier quoted context omitted.

>>They are going from a bloated syntax to a bad-habit goldmine. That's precisely why I think it's a good idea: with proper instruction, you can teach people good habits from the start.

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.

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

#95

I'm not sure I'd consider a decision to move from Java to JavaScript an improvement. They are going from a bloated syntax to a bad-habit goldmine. Why not go Java -> Python instead?

Python has its own issues. Magic `__foo__` methods everywhere. Significant whitespace (there are arguments for or against it, but it's bad for beginners). One-line lambdas, `def wrapper`. Tuples versus lists, `(x,)` syntax. `global foo`. Ongoing split between 2.x and 3.x means that documentation is confusing. I think ES5 would be a legitimately better first language. Now that ES6 is everywhere though, javascript is a…

Significant whitespace won't be much of a problem for a beginner that doesn't have a precocieved notion about whitespace not being significant. After all, in humanwrittenspeechwhi tespa cematters, doesn't it? So the concept shouldn't be too hard to grasp.

As for magics, don't see why it would be an issue either. For a beginner, it's a magic incantation just like any other, for more advanced student, it's a callback/override just like any other. You can argue that this system has its disadvantages, but if you understand enough to argue about such matters, your education as a beginner is a definite success.

2/3 gap is an issue, yes. Fortunately, one can just teach python3 and leave python2 for advanced studies. It's not like students would be deploying in industrial production right after the class...

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

#96
post #18

I'm not sure I'd consider a decision to move from Java to JavaScript an improvement. They are going from a bloated syntax to a bad-habit goldmine. Why not go Java -> Python instead?

Because you only need a browser. When you're just a beginner, setting up an environment can be extremely painful.

This can be solved in so many ways, from writing good instructions to giving people pre-made environments to having one install session at the beginning of the course (if you can't get Java/Python running in 1hr something on the system is horribly wrong) to using one of those online education platforms that allow to run tons of stuff from the browser.

But if you're introducing people to programming, letting them know command line exists may also be not that bad of an idea :)

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

#97
post #51
post #18

Earlier quoted context omitted.

Because you only need a browser. When you're just a beginner, setting up an environment can be extremely painful.

While the Java ecosystem is terribly and unnecessarily painful, working in a browser isn't exactly trivial either. Personally, I think Go wins the "easy setup" award--download the toolchain, `mkdir -p ~/go/src/project`, edit your files with your favorite text editor (they all have Go plugins), and `go build/test/install/etc`. No ANT/Maven/Gradle/etc files, no CLASSPATH, no IDE, no runtime or runtime dependencies, etc…

"No IDE" is not exactly a plus in my book. Surely, you can write code in vim (or notepad) but doing any proper work requires proper tools, and good IDE is among the first ones you'd need.

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

#98
post #23

I belong to the Java generation but thought it was very clean and nice, promoting good OOP practices. That was in 1998 though and Java was helmed by Sun, and we used something like Java 1.0-1.3. I can understand someone jumping into Java of today could feel far more overwhelmed. So maybe this hasn't always been a truth, but a truth that has been growing?

My sentiment exactly.

It did a good job of acting as an improvement over C++ as the language in which business apps were supposed to be written but at some point things like InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState started coming along and ruined it.

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

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

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

#100
post #78
post #51

Earlier quoted context omitted.

While the Java ecosystem is terribly and unnecessarily painful, working in a browser isn't exactly trivial either. Personally, I think Go wins the "easy setup" award--download the toolchain, `mkdir -p ~/go/src/project`, edit your files with your favorite text editor (they all have Go plugins), and `go build/test/install/etc`. No ANT/Maven/Gradle/etc files, no CLASSPATH, no IDE, no runtime or runtime dependencies, etc…

>mkdir -p ~/go/src/project Where is the mkdir icon on my windows desktop?

Windows is a brutal operating system to be learning on; I'd hope universities have something a bit easier for their incoming CS students.

I bet they don't, though :/

Post reply on HN