Live data from Hacker News

Universities finally realize that Java is a bad intro programming language

thenextweb.com

61–70 of 132 posts

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

#61

The title is bit clickbaity: the article is mostly about Stanford's intro course. It's also misleading. Educators have known for a while that Java is not a good language for introductory education. The Greenfoot project attempted to work around some of its limitations, while other curriculums like How to Design Programs (using Racket in an environment designed for teaching) have used entirely different---and in my op…

On that note, the size of the courses are not even comparable. If you look at "Explore Courses", a website that gives information on Stanford's course offerings per quarter, you see a massive disparity between CS106A (the intro course almost all CS majors take if they have no programming experience) and CS 106J (The new course). The "A" course, taught in Java, currently has about 560 people in it, while the Javascript course has about 40. (Source: https://explorecourses.stanford.edu/search?view=catalog&filt... )

I agree that Java may not be the best language to teach to beginning programmers, but to suggest there's been a wide move away from Java (as this article does) sort of oversells the situation, in my opinion.

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

#62
My first two courses were in C++, and after that it was a mix of C++ and Java.

If my first course was in JavaScript I probably would've WAT, and gone into psychology.

It's funny reading the comments regarding some of Java's "bad" features like type safety, which I consider to be a strong selling point of a language.

In 101 my professor educated us as to how many holy wars there are in computer science, and that most of them boil down to treating opinion as gold. Then he told us to never get involved in them, and just do the damn job in whatever language, framework, etc... we were currently using.

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

#63
From the comments on the site:

> If a simple Hello World program in Java frightens you, you might as well forget about learning how to code.

Meh at this attitude. It's not that it's 'frightening', it's simply a longer path (and cognitive load) from code to result.

You want to pique a student's interest? Let them navigate to JSFiddle.net and begin making magic happen in an environment they spend all day in VS whatever-you-have-to-do-to-get-Java-running.

Not everyone who takes an intro to programming class aims to build their own kernel. Some simply want to know how to build cool things. A little bit of dazzle in programming 101 will keep the latter interested without alienating the former, and you can get in to the thick of it later.

This 'you might as well forget about learning' attitude is toxic.

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

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

As a beginner in java, you really just need java, javac and a text editor. The problem is less the ecosystem and more just the language isn't a good starting point for a beginning programmer in a formal education setting.

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

#65
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 they start coding. Most of us that learned in the 90s probably learned this way.

* No special software/tools are needed. This is a bit of a repeat of the above two but it makes getting started so much simpler when you can focus on the code & not the environment.

* You can teach server side & front side development.

* You can teach functional programming & object oriented programming basics.

JavaScript is everywhere. With the skills they learn they can write code for the web, games, IoT devices, mobile devices, etc. Once they advance & start learning more advanced programming, then they can open up Pandora's box.

I believe an intro class should be about teaching very basic concepts & creating passion for the subject. I think JavaScript does a great job creating a snowball effect when it comes to learning programming.

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

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

Especially once you get into managing dependencies. Virtual environments (whatever this year's flavor is, venv I think?) are a mess. I was trying to get VS Code to execute a python project in its virtual environment but gave up and just went back to running it in a terminal. There's probably a way to do it, but I poked at it for a while and didn't figure it out. Javascript might have its hassles, but even when you ge…

I replaced all that with guix environment https://github.com/pjotrp/guix-notes it works well for Ruby too https://dthompson.us/ruby-on-guix.html

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

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

Go would be another good learning language, I agree. But you still have GOROOT/GOPATH to worry about, I think it's about the same as Java in terms of complexity.

Besides, you don't need an IDE for Java, it's just that most people use one. I personally use gradle and vim when progamming Java.

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

#69
Although I agree with the case that Java is syntactically bloated and hostile to newbies. However, a person admitted to computer science programme should be well used to programming already from her high school or self-study. If not, the hostility of Java environment is just a minor issue in the context of other courses, alongside of learning how to survive at the university per se.

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

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

My impression is that Python does in fact tend to be the default choice for beginning programming/algorithms/etc. courses. It seems a reasonable choice. It does have some peculiarities but is definitely mainstream. And it is suitable, especially in conjunction with its ecosystem (as you say), for a lot of tasks. It seems more generally useful for STEM students and others who aren't necessarily going to major in CS.
Post reply on HN