Live data from Hacker News

Universities finally realize that Java is a bad intro programming language

thenextweb.com

71–80 of 132 posts

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

#71

I think JavaScript is a great intro language. Note, it's being used as an introductory language. I use it for teaching kids & it works wonders. Here's why: * You can show off what you develop to your friends because everyone has a web browser. Being able to show off your work is very important to students' feeling of accomplishment. * You can go to any website & start modifying their code. People love doing this when…

It's a great intro language. But it's a poor language for university-level CS major students (I realize that most of these classes using JS are not CS-track classes).

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

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

? It's a university. If they can't convey "advanced" concepts such as setting up a dev environment, they shouldn't be teaching programming.

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

#73

Replacing a general purpose programming language with a language that really should have only one application (front-end web development) is a huge mistake. And there are many other, much better alternatives. Python would be fine, java isn't perfect but not all bad either, clojure could be interesting. Python would have the added advantage that you can go in many different directions from data structures and basics t…

Javascript is a general purpose programming language and your comment doesn't make any sense.

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

#74
post #24

The move to JS is a great one (although I'm sure many will disagree). When I was first learning programming, half the fun was seeing stuff happen on the screen. Doing programming in HyperCard[1] is one of the fondest memories I have of learning how to write code. And HyperTalk (like JS) wasn't really a "good" programming language, but it was a fun one. JavaScript has easy access to the DOM, Canvas, and even OpenGL, w…

HyperCard was formative in my youth as well, and I definitely think JS is a fine introductory language for the self-taught, bootcamps, or even lightweight tech school courses. But when we're talking about top-flight CS programs like Stanford I think we should be teaching students something that generalizes better.

Java is crufty, but adequate for general algorithms. Personally I did the traditional Scheme in my MIT-based curriculum and so I have a bias for the syntax-less approach with a lisp, but if I'm being honest with myself I have to say that Python really is the best general purpose language for people to cut their teeth on.

It's not that I think JS is a bad language, but it is pathological in its TIMTOWTDI-ness, and that is going to confuse the hell out of beginners. To have a fighting chance you're going to have to lock down the curriculum to a sane subset of JS, Crockford-style, but even then you will run into nasty cognitive dissonance when exposed to real-world JS.

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

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

Setting up a Java environment is about as simple as you can get: you use the JDK installer, and maybe the installer for a Java IDE.

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

#76
post #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…

I've seen more university calendars these days copy CMU and add functional programming like SML as the new preferred intro course, esp European universities it really is probably one of the best student languages for understanding/reasoning about large programs by using types and it puts everybody on equal footing since normally most first year students have zero exposure to functional programming. https://existentialtype.wordpress.com/2011/03/21/the-dog-tha...

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

#77
post #71

I think JavaScript is a great intro language. Note, it's being used as an introductory language. I use it for teaching kids & it works wonders. Here's why: * You can show off what you develop to your friends because everyone has a web browser. Being able to show off your work is very important to students' feeling of accomplishment. * You can go to any website & start modifying their code. People love doing this when…

It's a great intro language. But it's a poor language for university-level CS major students (I realize that most of these classes using JS are not CS-track classes).

I agree that a quality university should teach better languages for the bulk of the major. The class does say "No prior programming experience required" though.

I'm making a similar guess as I believe you are that a lot of non-CS students are taking this class. If that's the case, it works great for them if they want to use a simple language to do some automation later in life in some non programming related job.

From what I can tell, this class isn't part of the CS degree -http://exploredegrees.stanford.edu/schoolofengineering/compu... unless this hasn't been updated yet.

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

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

>mkdir -p ~/go/src/project

Where is the mkdir icon on my windows desktop?

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

#79

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?

Setting up Java or Python isn't that difficult. At the very least, being able to follow the instructions to set up either environment is a screener for people who aren't suited for something as detail oriented as programming, IMO.

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

#80
The Stanford Daily's article is a much better source: http://www.stanforddaily.com/2017/02/28/cs-department-update...

This quote stands out:

> The computer science department has cycled through several languages over the past decades. When Roberts came to Stanford in 1990, CS106A was still taught in Pascal, a programming language he described as not “clean.” The department adopted the C language in 1992.

Moving to C makes sense, but the rest of that statement is extraordinary and needs examination. In 1990, Pascal was widely used, as many Hacker News contributors can attest to. In fact, it was designed for clarity, with teaching one of the design's use cases - the other being clarity for a pro coder - and was widely used for many years by many CS courses for exactly that reason. Some schools still use it in its modern OO form Delphi.

Javascript is widely regarded as a less than ideal language. On HN this is preaching to the converted, but: http://www.javascriptgotchas.com/gotchas/common-javascript-e... and http://stackoverflow.com/questions/12694530/what-is-typescri... both contain good material.

So the same person who considered Pascal - a clarity-focused and teaching language - unsuitable for teaching, considers Javascript - an unclear and confusing language with lack of type safety and many widely known gotchas, such that many people move to the Pascal-ish or C#-ish Typescript - as suitable?

Post reply on HN