Cover

It Is Time to Learn JavaScript

June 22, 2014
No Comments.

JavaScript is having a great year. With the continuation of web development, Node.js, and even Apple adding JavaScript as a replacement for their AppleScript.

You may be waiting until you have to learn JavaScript, but maybe you should learn JavaScript to make you a better developer. Let me pitch it to you:

Do Languages Matter?

I started with database ‘languages’ twenty-eight years ago. My experience in those days was that when you got a new package or solution, you were going to learn a new language. A language was part of the experience, not a separate piece of the puzzle. If you look back at how Paradox, dBase and others worked. The language was simply ‘in the box’.

Of course this wasn’t true of the lower level languages like C and C++. They were all over the place and pretty ubiquitous. The difference then was that there was a steep divide between the productivity gap between something like C++ and Delphi. Enterprise developers especially seemed to use high-level systems knowing that they were trading productivity for a performance hit.

In the recent past, the world started to get divided into large silos of languages that are bound to their vendors. The C#/VB/.NET stack against Java/JVM was the story for ten years in many circles. The introduction of new combinations (e.g. Ruby/RoR) from the open source world didn’t seem to change this much. Even the recent Obj-C/Swift/iOS stack is a continuation of this trend.

What I find so interesting is that it seems that developers are becoming more entrenched to their respective vendors (and usually languages too). Many people self-identify as Java Developers, .NET Developers or Ruby people. Even though the language is our first experience with an ecosystem, the underlying plumbing affects how we create software much more than the language in my opinion. Especially since many of these languages have more in common than they have differences.

In the more recent past, functional languages are making head-way with developers. Swift, F#, Scala and Clojure are changing the landscape for languages but they are usually tied to another runtime (e.g. F# –> .NET, Clojure –> JVM, Swift –> Obj-C Runtime). For developers out there (including me), this introduction of mainstream functional languages represents a challenge to the way we think about how languages are used to solve problems. But where does this leave our old friend JavaScript?

What about JavaScript?

Through this all JavaScript has been seen as the language people have to know…the a language that people want to use. Developers that are doing web development either sheepishly learn JavaScript and use it or find a way to avoid it (e.g. CoffeeScript, Script#, etc.). Since JavaScript was put together so many years ago and the standards have changed somewhat slowly (until recently), developers seemed to dismiss JavaScript as a real option. Of course there were always JavaScript diehards who believed in the language. But amongst the majority of developers, JavaScript is still seen as a scapegoat of languages or even the butt of the joke.

While many of us have been snickering, something amazing has happened. JavaScript has matured and prospered. It’s been adopted as a real language in many different scenarios. Certainly it’s biggest use is in client-side web development, but using JavaScript for mobile and server programming is getting more and more common.

Why Haven’t You Learned JavaScript Yet?

Usually learning a language is about needing it for a particular project, though some developers make time to learn new languages as a way to broaden their horizons. But I am finding some entrenched developers from all different corners are avoiding learning JavaScript. Since it’s so useful in so many different places, I think that it is a language that everyone should have at least a passable knowledge in. I hear excuses from developers about JavaScript occasionally with phrases like “JavaScript isn’t Object Oriented” or “JavaScript is weakly typed”. But those are just excuses (usually from a place of fear, not arrogance).

As most of you know, I am a .NET guy mostly. When I picked back up JavaScript a few years ago it was as an entrance back into the web development world. While learning JavaScript (and the other parts of the web ecosystem) have helped me build some interesting courses and build fun projects, it resulted in something I didn’t think I’d get from JavaScript – a new way to write my C# code.

JavaScript is an interesting beast and if you learn it with modern approach, you will soon learn that it is both Object Oriented and Functional in nature. It is neither an OO language or a Functional language, but it is a very productive language. The way that you tend to pass parameters and functions across JavaScript made me think of new and innovative ways of writing my own .NET code.

The functional aspects of JavaScript helped me understand and use LINQ in new ways. Callbacks and the async pattern added in C# 5.0 because simpler when I viewed it in the light of passing functions and the promise pattern. Parameter passing in JavaScript changed the way I build interfaces…both managed and web interfaces.

Finally, when I embraced Node.js, it informed the way that I wrote my ASP.NET code. Thinking in the light of asynchrony was no longer limited to Windows Services or other terse server code. I found the usefulness of being asynchronous by default in ASP.NET MVC and Web API. Sure, IIS can be tamed by throwing hardware at it, but why should it need to?

Today is the day to learn JavaScript, not just because you’ll probably be using it tomorrow in a number of ways, but also because it will make you a better developer. Stop admonishing it’s humble origins and embrace it as a language that you can learn from.

I am immune to knowing that some of you will assume I am taking this stance because I have some Pluralsight videos on JavaScript, but no matter where you learn it, it’s time.  Do it for your own professional growth. Thank me later.

Do you agree with me?