Live data from Hacker News

Universities finally realize that Java is a bad intro programming language

thenextweb.com

51–60 of 132 posts

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

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

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.

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

#52

No one ever wrote a book called "Java: The Good Parts" (glad I don't write Java (or JavaScript) on a regular basis anymore)

I'm not sure if your comment is implying that there aren't any "Good Parts" of Java in the first place, or that nobody needed to write a book that excluded the "bad parts" of Java.

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

#53
Java isn't a bad language for an intro programming language -- it strikes a nice balance between hiding low-level details that are often important to be aware of, but are intimidating to firstcomers, it has a rich standard library and well-made collection types, and is statically typed, encouraging type rigor and making it a good fit for dogmatic OO -- but it's undeniable that the allure of instant-feedback environments like in-browser JS is strong, and OO's stronghold in mass-market academia is being challenged by functional programming as it happened in the industry.

In fact, F5-ability, and widespread real-world applicability are the biggest selling points of Javascript-as-an-intro-language, given that there's essentially no standard library to speak of, so every exercise becomes unique to the environment -- either window, or Node's APIs.

As others have said, perhaps Python strikes a better balance between approachability (not too much boilerplate), dogma (indentation), lenience (dynamic typing), standard environment (a featureful standard library), and rapid iterability (interpreted from source). Not sure why it's not more widespread in these settings.

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

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

As others have pointed out there are plenty of sites that allow you to run Python in the browser. Whereas something like the aforementioned alert('Hello World'); can actually be blocked by something as innocuous as pop up blocker. If anything console.log() is probably a better bet since it'll at least require students to understand what their environment consists of.

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

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

If you're going in CS or software development and don't learn the command line quickly, you'll be at a distinct disadvantage to many of your peers.

Besides, everyone in a CS program these days gets a shell account, right? I mean, login from home using whatever SSH client is hip on Windows these days and then it's just a matter of doing:

    javac YOURFILE
    java YOURFILE
(making sure that your class path is set up to your cwd). You don't even have to use vi/vim, nano is available on most any linux/unix distro.

No complex environment to set up at all, although even setting up a Java IDE is not that hard (my friend's HS students do it with little problem).

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

#59
I think the value of using an IDE and having access to a debugger outweighed the clunkiness of the stuff I didn't understand (like public static void main(String[] args)).

So much of web development comes across as formidable voodoo because of how many languages/frameworks are needed to even get anything to show up.

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

#60
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 more sense as it builds strong fundamentals, but it encourages people to think a certain way that doesn't really apply to newer languages. 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++. 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.

Post reply on HN