Why Stanford's Java-to-JavaScript transition is so important

Recently a tweet by Sean Larkin hit me. It said Stanford's introductory course to programming was piloting JavaScript instead of Java as the language of choice.

Let me tell you a bit about me. I'm a Senior Software Engineer with 10+ years of experience developing solutions, designing architectures and leading teams. I've used many programming languages but mainly Java during my academic career and JavaScript in my professional one. This is significant because there is a growing demand on technologies that most universities don't teach properly. This mismatch has to be corrected if we want college to be the road both to enlightment and reality it should be.

If you're into programming software, you surely know your language of choice kind of defines you. A programming language is basically a set of predefined rules to build software, so its influence in how you approach a solution, its paradigm, and the freedom or security it allows are key in order to choose it. And your language of specialization determines (specially in the early stage of a career) the projects you work on, the companies you work for and even your salary range. Sure, a Software Engineer is more than a mere specific language specialist but at some point in his career that's exactly what he is.

According to the original article on the Stanford Daily:

Java was intended early on as “the language of the Internet”. But now Javascript has taken its place as a web language.

That is, in my opinion, the main consideration behind the current JavaScript revolution that is taking place.

It took seven years for Java to replace C as the chosen language to get Stanford's students into programming. That happened in 2002. It has taken 5 years for JavaScript to enter the introductory course replacing Java.

But why is this so important?

There are some inherent advantages of JavaScript over its competitors, specially Java, that make it the ideal candidate to take students into programming.

  • It is ubiquitous: browser, server, your Raspberry Pi connected to your TV, you name it.
  • Fast initial learning curve: its tiny core, dynamic type system and concise syntax allow writing initial code a breeze.
  • Quick deployment and execution: no need to compile, just run it or reload the browser.

Stanford's move may seem anecdotical but it is not. There is a thrilling JavaScript community that has been undervalued and sometimes even despised by some academic circles and "orthodox" engineers. It has been historically uncomfortable to declare yourself as a JavaScript specialist, even now when JavaScript is eating the world sometimes and somewhere it is.

For me, and for many others, Stanford's move towards JavaScript is kind of a seal of approval for my latest years' fight. One of the most important tech colleges in the world is performing a reality check on the language that many of us have dedicated our professional careers to.

As superficial this may sounds, this is a step into the academic dignification of the most important and more used programming language in the XXI century.

For many of us this has been a battle of reality over theory, and still is. In software engineering, finding the best solution is beyond any programming language. But defining what solution fits best to the problem is tricky when there are many. It practically involves bias at some point, considering costs, team knowledge, development time and many other factors.

In the end there is this unavoidable feeling of triumph for me. The tiny, bastard multi-paradigm son of the early web, the unspeakable non-static typed language that filled so many jokes in the past about fragility, instability and chaotic design is taking its place as the programming language of choice to enter the most important domain of knowledge of the present: Software Development.