Live data from Hacker News

Universities finally realize that Java is a bad intro programming language

thenextweb.com

11–20 of 132 posts

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

#11
I had a horrible time with Java when I took CS142 and CS143 at the University of Washington. It was a complex language even back then. As someone who had only played with HTML and a tiny bit of JavaScript back in the late 90s, I found the amount of boilerplate overwhelming and the language confusing. It didn't help that we didn't have the massive amount of online resources that we do today, so figuring anything out required digging through thick textbooks and obscure documentation files... if you could find them.

I ended up getting a 2.8 in both of those classes, and it convinced me that I wasn't good enough for Computer Science. I ended up majoring in something related[1], and eventually found my way to a programming career. But I occasionally think back about those days and wonder what course my life would have taken if the classes were taught in a more friendly language like Ruby or Python (which were admittedly quite obscure back then).

[1]https://ischool.uw.edu/academics/informatics/what-is-informa...

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

#13

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?

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

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

#14

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?

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.

I would also go with C first. It takes the magic out of the computer and you understand what's going on under the hood.

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

#16

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?

I'm curious if a combination of JavaScript: The Good Parts, and a professor that emphasizes good practices can offset JS's inherent problems.

Very few people formally learn JS. It's usually more of a read up on syntax, read documentation of a library, apply concepts.

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

#17
I think JavaScript is an excellent choice. This is about getting people started, and you can start making your own apps in the browser right away with very little overhead. You can also ignore boring stuff like static types and only learn them later when doing bigger things. JavaScript also lets you learn functional programming basic concepts in an incremental way.

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

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

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

#20
As someone who primarily makes a living from programming JavaScript, I don't think this is a good idea. Java may be a bit syntactically bloated, but it's a much better engineered language than JavaScript. The parts "fit" together in a more methodical way. And while a learner may be able to get started with JavaScript quicker, as they move into larger projects they'll find the quirky JS implicit type coercion rules to create hidden and hard-to-debug errors.

And with Java's emphasis on interface vs implementation, it's an ideal language for learning data structures and algorithms. I'd say if you struggle with Java's syntax in your first year of CS, you might have a hard time making it as a professional programmer or academic computer scientist.

If they really wanted to move from static->dynamic, I'd agree that Python would be a much wiser choice, even though it too has its idiosyncrasies. As jacquem points out, Python has the added advantage of a rich data science/machine learning ecosystem.

Also, if they really wanted to use the web ecosystem, maybe TypeScript would be another wiser possibility than JavaScript?

Edit: IMHO, perhaps the best didactic language is SML, but that appears to be a losing battle these days.

Post reply on HN