131 comments

[ 4.7 ms ] story [ 214 ms ] thread
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.
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.

Mumbai University curriculum goes from C to Java (actually its more of Object Oriented Methodology) and then we have a separate subject for Computer Organisation and Architecture. This is in 3 contiguous semesters. By the end, we know from low-level to high-level.
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..
I've taught introductory programming to undergraduates in both C and Python at different times. In my experience students struggle to grasp computer architecture and memory management at the same time as learning to think like a computer and formulate ideas in code. They have coped much better with Python and enjoyed how time/effort is spent solving useful problems rather than boilerplate.

Ideally they would all learn about computer architecture and memory management at some point. But at least with this course motivation and interest is a big problem, and producing confident Python programmers seems a better result than terrified students who can't produce competent C.

JS is a powerful language for a narrow domain. That makes it totally unsuitable as an introductory language because if the domain you wish to move to is not web development you now have to restart all over again with another language. Python would be better, java wasn't all that bad as a universal language it is applicable to many domains. But the ECT cycle of java could be seen as a drawback, python would remedy that to get the instant gratification factor.
I'm no lover of JavaScript -- especially without TypeScript -- but JS is the most universal language. There are frameworks to create server side components, Android apps, iOS apps and windows app

Not that JS is optimal for any of those use cases.

yeah this is my exact reaction. not sure if they are thinking that knowing JavaScript allow students to sell themselves for internship since webdev internship is getting much more popular.
>>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.
Having gone from Python and a little C++ to Python and a certain REALLY pedantic language, I wish I had had one such unforgiving language/compiler from the start...
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.

University is hardly a controlled environment; students are encouraged to get their projects working and then ditch them. There's very little incentive to write good code.

Remember, we're talking about intro languages here. It's a much better idea to teach languages that encourage good habits because then going to "wild west" languages like javascript is much easier.

(comment deleted)
In the first programming course many students can't judge "what works and what doesn't" yet, or even appreciate the details if you tell them, and are busy enough with the basic concepts behind what they are doing.

You also can't really teach only an opinionated subset of the language, since students use all kinds of material to learn. Material about JS is often steeped in environment details (browser, nodeJS, JQuery, ...), and thanks to transpilation right now multiple versions are popular, which makes it even more confusing.

It wouldn't be impossible to teach a good intro course with JS, but I don't see any benefit in doing so, and it wouldn't make the students very effective JS programmers.

>>In the first programming course many students can't judge "what works and what doesn't" yet

That's what the instructors are there for...

From my perspective (I've TAed a bunch of intro-level courses, taught in various languages):

You can tell them, yes. But as you rightly say, an important thing is to experiment and (IMHO) to see for yourself what works and what doesn't. And that part works best if it fits their abilities. Experimentation should lead them past what they've learned from you, but not into to much confusion, which for absolute beginners can be incredibly demoralizing.

More talented students will go into different languages and weird stuff anyways, I'll help them when they ask questions or I see something they are doing I can contribute to, but I can't run a course matching their abilities as an intro-course.

Again, I'm not saying you can't do it in JS, but it's not a decision of "let's use JS because I want people to learn JS". And if having JS in there is the goal, nothing wrong with running a course using multiple languages and using JS as one of the later ones. Ideally, after a good set of intro courses your students have seen enough that they can pick up most languages relatively easily, and then, when they need them, learn what current best practices and their ecosystem are.

Sure, given enough instructors and a huge amount of time you could probably teach it. But starting with javascript gives you almost no benefits and saddles you with the huge burden of attempting to teach a language known to have many quirks and strange conventions.
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.

Because you only need a browser. When you're just a beginner, setting up an environment can be extremely painful.
With python you just need a browser too: www.repl.it/python
While that's true, you learn a lot from going through those troubles. I disagree that we need to make it "easy" for students to get into programming by glossing over very important details like environment configuration. Someday they'll have to do it at their job - why not prepare them for it?
I've gone through a couple online courses and some percentage of people obviously really struggled to get setup. It's probably significantly less of an issue at schools where "Intro to Programming" mostly assumes that you already have at least the basics of hacking around with a computer down. But it's probably hard for most people here to appreciate how daunting "never seen a command line before" is for many beginners.
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 get to dealing with npm it's still more of a self contained thing.

I had the same struggles. Eventually I just went to pycharm, which is great and has full support for any environment you want.
If I were programming as a profession I'd consider it, but $200/year is more than I'm willing to spend on an IDE for a hobby. Especially since I'm writing more C/C++ than Python lately.
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.
Until you depend on anything, like a unit testing library. Manually managing CLASSPATH isn't fun. I think Java is a fine way to learn OOP (it was my introductory computing language), although I'm now of the opinion that OOP is a big distraction.
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.

> Go would be another good learning language, I agree. But you still have GOROOT/GOPATH to worry about

GOROOT and GOPATH are set automatically by default, you don't need to mess with these unless you want to.

> I think it's about the same as Java in terms of complexity.

Even if GOPATH/etc weren't set automatically, you still need to learn Maven and Gradle and friends. I've been programming for a decade or so, and every time I try to play with Java I have such a hard time getting projects set up. I don't know if the tooling is really so complex or if the happy path is just poorly documented (perhaps because everyone assumes you're using an IDE?). A few things I had trouble with: - Getting the Gradle server set up so I didn't have to wait for the JVM to boot every time I wanted to compile anything - Configuring Gradle to compile a native dependency like OpenGL - Configuring Gradle to produce a fat jar - Configuring Gradle for unit testing

By comparison, with Go does all of that out of the box (`go build` doesn't have a VM to warm up, and Go's tooling supports native dependencies, static compilation, and testing by default).

I don't think this is a big problem if you already understand Java's ecosystem or if you have someone to hold your hand until you get a project set up, but I had a terrible time finding the right documentation.

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

Last I checked (a year or so ago), there were no reasonable vim plugins for Java. Certainly nothing as mature as vim-go.

>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 :/

I'm not sure what point you're making. It's easy enough to translate my unix shorthand for directory creation into windows instructions...
Windows even has mkdir. I'm not sure if this particular line would work though (-p is the default behavior on Windows; I don't think it would understand the switch).
(comment deleted)
"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.
I have no problem with `vim-go`. Go works without an IDE because the language has a simple project model which lends itself to good, modular tooling. You can still use an IDE with Go if you like, but no one is twisting your arm.
Nearly everything works without an IDE. There are added services making working easier in IDE though. Saying "no IDE is needed because the modular system is so good" usually either a delusion or kind of misguided roughshod pride ("in my time, we just made bits by banging rocks together, you kids are so spoiled") that sacrifices productivity for no real reason.
You're plainly misinformed. According to the most recent Go developer survey, only 12% of respondents use an IDE; the rest use text editors (in fact, more people use vim specifically than all IDEs combined). Developing Go without an IDE is quite feasible. The particularities of IDEs which make them more productive than text editors are artifacts of the poor project system found in most languages. If you fix the problem at its root, you're free to reap the efficiencies of a proper editor instead of the mediocre one that comes bundled with your IDE.

Of course your conclusion that IDEs are more somehow productive than text editors is completely baseless (or perhaps only based on experience with Java and the like).

> According to the most recent Go developer survey, only 12% of respondents use an IDE;

There are two possible reasons for this I can see:

1. Go is so awesome that unlike any other language I've used in my multi-decade carrier, it can not be improved with an IDE. It's just an ideal and any attempted improvement would just spoil it.

2. There's no decent IDEs for Go and Go developers are forced to do with what they've got.

My experience shows the former is much more probable than the latter.

> Developing Go without an IDE is quite feasible

Of course, people programmed when ed was an IDE, and before that. It's humanly possible. Is it better? I highly doubt it.

> The particularities of IDEs which make them more productive than text editors are artifacts of the poor project system found in most languages

I'm sorry but this statement sounds both misinformed and fanboyish. There are tons of benefits to IDE which have nothing to do with "poor project system" - from module management to task management to refactoring to keeping integrated information about the project to code assist, etc., etc. I could spend an hour writing them. Claiming that Go "fixed" need for IDE sounds, excuse me for being blunt, laughable. It's like when iPhone was first released, I heard some fanboy claim that iPhone interface is so intuitive one doesn't need copy-paste (first version didn't have it). Of course, next update added copy-paste and iPhone users (including the said fanboy) are happily using it ever since.

> or perhaps only based on experience with Java and the like

Yes, it is based on almost 30 years of experience with programming in multitude of languages and environments, and this experience is why I find claims that Go is so awesome it needs no IDE so laughable. I'm sorry to look self-aggrandizing here, but you asked about it so I have to say it I guess.

> I'm sorry but this statement sounds both misinformed and fanboyish.

Fanboyish? Quite a statement from someone arguing that IDEs are necessary--my position is that they're optional. Misinformed? The features you list aren't particular to an IDE--they're available in any pluggable editor, which is a repackaging of my point. I don't mind a rude rebuke, but you're not even vaguely correct. Forgive me for basing my decisions off experience and not your misinformed speculation. ;)

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

? It's a university. If they can't convey "advanced" concepts such as setting up a dev environment, they shouldn't be teaching programming.
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.
(comment deleted)
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 :)

Agreed. Java was my intro language, and probably my favorite (those are probably related); conversely, I still haven't gotten the hang of Python, and it's one of my least favorite languages, but I still recognize that Python is a massively better first language than Javascript of all things.
Actually, Java was my first language too. And I still don't regret learning programming using Java. How much ever I love JS, I wouldn't have traded it for Java.
I'm good with it. The more people they crank out learning the wrong languages, the more value I have working with the right ones. :P
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.
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 really terrible first language, certainly worse than python... the online learning material for a `for` loop, for instance, is now split between `for(var ii = 0; ...`, `for(let ii = 0; ...`, `for(var x in obj)`, `for(const x of obj)` (but make sure that something called `webpack` is set up with something called `babel` so that all of these will actually work). You'll find similar confusion when approaching variable declaration, module imports, etc.

The magic methods in Python are used to support common, built-in functionality. E.g., `__init__` is the constructor (you rarely need `__new__`), `__len__` supports the standard `len()` function, `__str__` is equivalent to JavaScript's `.toString()`, etc.

Signification white-space should actually help students when programming because it forces code to be properly indented instead of having an indentation disaster or misplaced braces.

One-line lambdas and decorator functions are no worse than JavaScript's.

The tuple syntax is clunky, but there is an important distinction between it and lists: mutability of the list itself.

Frankly no one should be using `global` without a very good reason.

The split between 2 and 3 is hardly worth mentioning. 2 is the legacy version. 3 is actively maintained and most major libraries have supported 3 for a while. Very little changed syntax wise between them. The split was necessary because of a fundamental improvement and disambiguation between textual and binary strings.

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

Most do. From the article:

"According to research published by Philip Guo on the ACM (Association for Computing Machinery) website in 2014, Python is now the most popular language for teaching introductory computer science in the United States.

Eight of the top 10 U.S. computer science departments, and 27 of the top 39 (69 percent) use the language to teach the fundamentals of Computer Science."

Even PHP would've been a better move than to JavaScript.
As much as I loathe PHP, I have to agree.
>Java is popular, certainly, but it’s also extremely clunky and syntactically bloated.

And Javascript?

The article fails to mention all the quirks with JS that will cause more headaches than "scary keywords".
Javascript is a great language to learn to program because it gives you feedback. Middle/High school students get something showing up and keeping them engaged.

However, in uni I think Javascript is a very bad first language because there is a level of focus expected (and required eventually for them to be good developers) that you don't need Javascript to help with. It's better to pick a language like Scheme or Python to teach the /ideas/ of programming first and then transition to C/C++ or even Java.

As a Stanford student, an important caveat is that 106J is not replacing 106A. It is still being tested out this quarter, and this is the first time it's being offered. Enrollment in 106A is still around 400 while 106J is 40.
This came up a when this same news was discussed a few days ago on some other site: The JavaScript first manifest: https://gist.github.com/rtoal/046c7be95aa077a832fcd87f5b0244...

It makes a rather good (IMHO) argument that while, yes, JavaScript sucks, it does have redeeming qualities for usage as a first programming language.

I strongly disagree. The kind of bugs you can create with javascript are enough to make pl experts scratch their heads, scope is a mess and while there is no shortage of web frameworks and resources that have to do with web development outside of that the library field is surprisingly barren.

The only thing it really has going for it is distribution, if you have a browser then you can learn how to program in js.

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

Winston Churchill said it best, "Java is the worst introductory language except all those that have been tried before."
Churchill was one of the best coders out there. Like when he said "My Java code be buged. But in the morning will still run, and you will have to update your npm dependencies".
No one ever wrote a book called "Java: The Good Parts"

(glad I don't write Java (or JavaScript) on a regular basis anymore)

Maybe because you need all the parts, so there's no benefit in differentiating them.
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.
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.
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.

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.
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...
I agree. When I TA'd intro programming courses, I found that most frustration stemmed from a piece of code not doing exactly what you expect it to do. JavaScript is famous for having a million quirks and places where behavior changes based on context ('this', for example). That's going to lead to a million places where students blow up because it doesn't do what they expect it to do. Students need lots of little wins, and JavaScript is full of little losses.
The article isn't wrong. I count 15 words that are CS specific jargon in the Hello World statement. Couple this with some big lecture and mediocre professor who explains poorly, it's pretty painful intro experience.
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 to machine learning, web development or analysis and it probably would come in very handy when collaborating with other students.

Universities that pick javascript for an introduction to programming are making a choice of convenience rather than one that is best for their students.

Well, at least they'll have plenty of bad habits to unlearn later on.

Javascript is a general purpose programming language and your comment doesn't make any sense.
Hard to decide if your comment is meant as a joke.
How would I be joking? Do you even program with JS or are you basing your opinions on hearsay and a bad introduction you had one time in the past and haven't looked at it since?

Last I checked, Javascript is Turing Complete and has most of the common features you'd find in every other language. Just because it doesn't have OS interaction on the browser side doesn't mean it isn't a general purpose language. Have you ever even heard of Node.js? Have you not seen the wealth of great things implemented in Javascript?

Where does your claim that Javascript is not a general purpose programming language come from is what I'm asking. I can't seem to grok how one could come to that conclusion, which is why your comment doesn't make sense.

Don't get me wrong, Python is a great language as well, but outside of a slightly more preferable syntax, I don't see why you seem to think Javascript is such a bad language.

Javascript (in Node.js 7.9.0) even seems to have better benchmarks performance than Python 3.6.1 [1]

Please elaborate rather than making snide replies.

[1] https://benchmarksgame.alioth.debian.org/u64q/compare.php?la...

ECMAScript is a general purpose programming language that, historically, just happened to be made specifically for the purpose of standardizing a language made specifically with a web-browser (Netscape) in mind.
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.

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, which should make it a great introductory language. People are able to easily build more interesting stuff than yet another mortgage calculator.

[1] https://en.wikipedia.org/wiki/HyperCard

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.

Learnt with Python, Uni intro went Haskell (which I know is done at a few others) + Java later in the year as an OO fundamentals language.

JS is a very poor alternative, but it's better than the French High School system that introduced it's own completely demented "Algorithm Language" AlgoBox. So many of my classmates swore to never touch programming because "It's difficult and pointless".

That first contact is incredibly crucial, and I don't think JS is the answer.

I think that it's a big mistake that universities teaches programming in CS using most popular languages. They should use more didatical languages. Not being a popular language it's in fact a huge bonus, because it will force que students to learn other languages before leaving the university. Learning new languages shouldn't be a big problem for a good computer scientist.
I'm showing my age here, but in my first year of CS we used Pascal and COBOL.

My second year was the first year they taught Java, and back then it seemed incredibly easy and powerful by comparison!

Mine wasn't quite as 'aged', but not sure it was the best choice.

First programming language my school taught was C++.

are they going to blow the dust off an old good SICP one day?
Java -> JavaScript :: C -> FORTRAN
Even as a JS developer, I'm not sure JS would be my goto. I actually really like introducing people through pure Ruby (so, not rails) since the syntax is pleasing, it has OO concepts but can also be used functionally, and really cuts down on the "scaryness" of the language.

Python isn't a bad choice but virtualenv, v2/v3 issues, etc do make it a bit scarier. Also there are a lot of bad tutorials out there that teach poor habits (not that JS is any better..)

ANSI C isn't a bad one either but I think it's more difficult to grasp and is slower to get results which might dissuade some new developers.

I may be in the minority here on hacker news, but I think Java is a great language. It was intuitive for me to learn, and it is highly extensible/customizable.

Telling college kids to learn javascript first is a terrible idea. Teach them a static language first. Anybody who knows what they're doing in a static language will have no trouble picking up non-static languages like javascript.

I think it's a lot easier to understand OO, for instance, when you know what structs and functions are ("oh, a class is basically a struct with functions [methods] in it with an implicit argument pointing to itself, and some sugar on top? Cool, that was easy.") versus trying to jump straight in, which is what makes Java so painful to n00bs.

I don't see moving to JS helping with that problem much, though. If anything prototypal OO is more confusing without that foundation, and loosey-goosey nothing's-really-defined-for-real-until-runtime languages might be fast to get started in but will quickly lead students into a big ol' swamp of WTF.

I'd think a semester of C as an intro, despite its warts, would make everything that followed much clearer. But maybe it'd turn off too many students because everything they'd do in that semester'd be kinda boring.

Not as bad as APL in 1978. It turned me off the idea of programming for 10 years
I laughed at the phrase: "While there’s a lot to like about it, Java is perhaps the harshest language you can learn as a beginner."

"Harshest language" seems extreme, and I could name a bunch of languages that would be much harsher :)