It Is Time to Learn JavaScript

javascriptJavaScript 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?

 

Comments

Gravatar

Noemata Sunday, June 22, 2014

Sometimes we go backwards before moving forward again. This is such a time. And, or, jump, if ... you dare. Assembly language can be used for any sort of programming task at the cost of your long term sanity. Javascript ... with its script suffix suggests that it was only ever intended for small point solutions. A vast software product written in Javascript; it's well beyond daring, well beyond certifiable, Knuth is rolling over in his grave.

Gravatar

Johnny Callback Monday, June 23, 2014

The javascript runtime is worth targeting. As for using javascript to do it - I would rather eat me own flesh.

Gravatar

Jim T Monday, June 23, 2014

I generally agree that Javascript is not the language that people once thought it was.
To be honest, I'd happily work just in JS now, drop every other language unless there's a specific reason for it.
We can cover Web (browsers), Client (node-webkit), Backend (nodejs), devops (nodejs), win 8 (metro) & generic mobile (phonegap). This is a pretty compelling platform.
When using things like node, we can bring in binary modules or use asm.js or edge.js if we need something specific to run fast. Targeted use of other languages would allow them to play to their strengths.

The tooling is adequate and will only get better. Things like jshint can save us from the worst of ourselves.

And, if we follow the "Good Bits" principle and avoid using patterns and practices that make life hard for us, we can get a very long way indeed.

What's more, we can use this stack on any platform we're comfortable with. I can dev using my linux machine, you can use your windows machine and she can use her shiny mac. It's not an impediment to our collaboration. Whilst this is a feature shared with ruby and python, neither has had microsoft tuning their engines to work on windows as a first class citizen (as nodejs has).

Javascript is not a step backwards, it's not a hindrance. It's a sleeper that had far more power than we ever previously imagined.

Gravatar

Aaron Monday, June 23, 2014

I've been of this mindset for the last year now. Surprisingly, I have not been met with much resistance, snickers, or eye rolls when stating that I'm betting the future on javascript.

I too have been applying patterns and other things that i've been learning from javascript and applying them in c#; not because it's cool, but sometimes it makes alot of sense. I'd love to see some code examples of the types of things you are borrowing from the javascript world and porting to the c#/mvc world.

Do you have anything to share?

Thanks!

Gravatar

Md. Shohel Rana Tuesday, June 24, 2014

Definitely

Gravatar

david falkner Tuesday, June 24, 2014

Angular sense to be the killer feature to me, with its delightful pattern/structure and all.

Gravatar

Daniel Tuesday, June 24, 2014

I agree 100%. My path was Clipper->Delphi->C#->javaScript
But with javaScript you have to get through the first 6 months of face palmers "why the hell doe this not work", lint is your friend here.
I use angular to marshal my code but there are some up and coming projects to watch, polymer & famous. The javaScript is now (almost) up with silverlight of 4 years ago, but this time no one can kill my investment in time learning to become an expert in the language.
I have unhitched from the Microsoft bandwagon in order to keep my career going, Microsoft are the new IBM!

Gravatar

Ben P Tuesday, June 24, 2014

The clue is in the name: JavaSCRIPT

Great for its original purpose ie: adding snippets of functionality to a website so your don't have to make a trip to the server for basic things like validation.

But the idea of building whole applications based on Javascript? The stuff of nightmares! I see that the author cites lack of OO and strong typing as "excuses" - this could not be further from the truth. Look no further than current development techniques: DI, TDD and so forth - could these be implemented easily in vanilla Javascript?

Yes, "vanilla" Javascript. Because at the moment, there seems to be a new framework every in vogue other month - node js, angular js, dart... until we have only one or two "winners" that have stood the test of time, I for one certainly would avoid building a business plan on a third party product, especially given how rapidly fortunes change in the tech industry.

Javascript today is like a block of flats with extra storeys added on top: originally stable, but gradually becoming more and more unsound as more floors - or hacks, in the case of Javascript - are added to increase its usability. What front-end web development needs is a completely new language, designed to support modern programming practices and techniques, to replace Javascript - not more hackery to try and give the impression that an old dog has a new trick.

Gravatar

Louie Tuesday, June 24, 2014

Do you have any great books/tutorials for a .net developer trying to take the deep dive into JavaScript?

Would be good if you put something together.

Gravatar

Shawn Wildermuth Tuesday, June 24, 2014

Louie,

I have a couple of courses on Pluralsight that should help you get started, including "JavaScript for C# Developers":

http://shawnw.me/js4csharp

Gravatar

James T Tuesday, June 24, 2014

@Ben P "could these be implemented easily in vanilla Javascript?" -- what does this even mean? Everything is "vanilla" at the end of the day. If you choose to use an existing abstraction/framework/library, then great. If you don't, then you'd just be writing your own framework, or perhaps writing a lot of original code in favor of adopting something widely used and tested, which sounds like a bad ide.

But you seem concerned with the "risk" of using a framework that is well used today simply because there are new ones being developed. Why? People have built very successful enterprise Javascript apps using underscore, jQuery, Backbone, Knockout, Ember, Angular, to name a few, as well as home-grown frameworks or component-based approaches. The pace of advancement speaks to the highly active community, not to problems with the existing framework options.

If you are only comfortable using something that's got 10+ years under its belt like Spring, then perhaps front-end development isn't for you, but I can assure you that the evolution in the Javascript world doesn't mean you can't make good apps today. It just means there might be something even better around when you start your next app, and it's up to you to decide to use it or not. The great thing about Javascript is nothing ever stops you from looking under the hood. You'll never be stuck with an unfixed bug even if your choice of tools happen to be less well supported in the future (though everything I mentioned, even the venerable Backbone, continues to enjoy widespread active support). You can just fix it yourself, or extend it to your liking.




Gravatar

Bryan Ellis Tuesday, June 24, 2014

I started on the Apple II using dBase III. Over the years I have learned many languages. My favorite was Assembly Language but I never planned to program in it for a living. I used VB and VBScript for many years but always did most of the coding in VB because of the compile-time checking. Language to me is about syntax. The primary strength (and weakness) of JavaScript is that it is not typed. This makes it very difficult to find issues prior to runtime. I am starting to look at TypeScript as an option since it is a strict superset of JavaScript but adds type specification and other nice features without changing the underlying language (JavaScript).

Gravatar

Florian Rappl Tuesday, June 24, 2014

I do and I do not agree with you. Why I do not agree with you? What makes you a better programmer is a good understanding of the machine. Therefore you require knowledge of C (as it is really close to what you actually have, but supplies enough abstraction for solving problems efficiently). There are many C# programmers (and especially JS) programmers, who do not understand C well enough to be considered good programmers. That statement is generally not restricted to the two languages mentioned.
However, getting to know other programming languages, seeing other concepts and playing around with the machine will definitely help you figuring out stuff that you couldn't handle before.

Gravatar

Shawn Wildermuth Tuesday, June 24, 2014

Florian,

I think that is a pretty bad attitude. I don't think knowing C is how you become a good developer. Too bad you have decided to throw developers under the bus for not knowing C specifically.

Gravatar

Randy Long Wednesday, June 25, 2014

I've been coding c#, but am moving to javascript. So far, I've found VS to be the best ide -- the best auto completion. Any other ideas?

Gravatar

Randy Long Wednesday, June 25, 2014

BTW - Shawn, thanks for a thoughtful article on moving to javascript. I'm looking forward to the adventure.

Gravatar

handofmercy Wednesday, June 25, 2014

Shawn,

Thanks for the post. I've been developing since the 90's (crazy that it's been that long) and so have been using C, C++ and C# for sometime now. I have consistently refused to learn JavaScript because that's not proper software development.

In the last 2-3 years the rise of JavaScript and the very slow death of IE6-8 has been the reason for not bothering to learn JavaScript. But that is all changing. Especially in a world where rich client side, multi-device, fast and complex website applications is once again ruling the development space 'it is [indeed] time to learn JavaScript'.

So I will be getting a pluralsight account and diving in deep for the next few weeks getting to grips with the one thing I have resisted for so long, that is JavaScript!

Shawn, besides your own pluralsight courses, are there any others you can recommend?

Cheers
handofmercy

Gravatar

Alex Gill Wednesday, June 25, 2014

In response to the article:
If Javascript wasn't the only language for web scripting, you wouldn't have even heard of it. It has a laundry list of deficiencies, and ironically its popularity as a web language is what prevents it from evolving as fast as others. ECMAScript 6 is a shining beacon on the horizon though, and once its features arrive in mainstream web browsers then Javascript may actually catch up to other dynamic languages like Python and Ruby. Of course, then there's still the fundamental problem of dynamic typing - great for prototyping and writing small scripts, terrible for creating large, structured applications.

Florian:
That may have been the case 10-20 years ago, but times have changed. In most modern industries (save for video games and critical embedded systems) the best programmers are those who are productive, and are able to deal in abstractions without worrying about machine code. That's what a compiler/interpreter is for - to provide that abstraction. And the zeitgeist now is a strong push towards functional programming, which originates in mathematics, even further removed from bytecode.

Gravatar

Christopher O'Leary Wednesday, June 25, 2014

Cannot agree more when you mentioned that learning javascript (and the other web eco-parts) will help to become a better developer. This is an experience that I share with you - and continue each day.

Not too long ago I was asked where one should begin their studies for this industry. Javascript immediately came to mind along with SQL, C# (or Java.. or both), and later one of the lesser known and focused languages. Of course, this is purely the opinion of one person.

Thank you for taking the time to put this article together!

Gravatar

Alex Thursday, June 26, 2014

I agree - the time is right. I started getting more interested in Javascript last year mainly because of Node.js and Angular. If you think Javascript is only good for simple website programming I can personally recommend a Pluralsight course written by Shawn on using Javascript for large, enterprise level applications: http://pluralsight.com/courses/large-scale-javascript/

Gravatar

Harald M. Thursday, June 26, 2014

The number of wrong words in this article is astonishing - better switch off your "spelling checker" ...

Gravatar

Kushal Thursday, June 26, 2014

I strongly agree to the following from the article/blogpost
1) One should stress on learning logic not the language. Language is yet another to approach a problem statement.
2) Languages should be treated as a means of learning approaches.
3) Javascript is there is to stay for long in the coming years because things are going to be more online and full-stack developers will be needed. Javascript will serve as one language for all stacks.
4) Learning is a continuous process and one should not stop post learning one language. Keep trying out and experimenting with languages (may be not professionally)

Gravatar

Frank Friday, June 27, 2014

Is the Web going away? Is the world becoming less connected? Any chance browser vendors get together and agree on a new standard language anytime soon? For better or worse I think JavaScript is hand we have been dealt.

Gravatar

WeePee Monday, July 14, 2014

JS IDE:
I jumped into JS using the excellent Intel XDK to do cross platform dev. Later I "graduated" back to VS... yes primarily for the code-completion, native Cordova integration and other interface helpers. I am keeping a close eye on Webstorm...

Article comment:
Like so many of us... I also started on the MS stack.. SQL Server, VB, C#. I am proficient in JS now and I love it. I can concur with the influence of JS on using other languages. I am now neck deep into SWIFT (yes.. wtf?), and even here JS helped immensely with my understanding of the async and block(closures) concepts.

If I wish knew JS at the time of c# lambda's launch :)

Gravatar

Plank Monday, August 4, 2014

Don't write this kind of article.
Every experimented web developers know that javascript is dying and must die. It's a pain just like the flash player was.

There are tons of high quality alternatives and it's sure you can write better code with them, they are ready for production and some of them are really stable.

Don't make web a crap again.

Gravatar

Shawn Wildermuth Monday, August 4, 2014

Plank,

You don't have to read what I write. But telling me what to write and not to write is just rude. Too bad you think that there are 'tons of alternatives' when it all ends up as JavaScript. You'd prefer to generate JavaScript than write JavaScript? Feel free.

Gravatar

Fawad Wednesday, October 1, 2014

Hi there,

Very nice article for me, for someone in a .NET camp. Thanks.


Gravatar

Mike Graham Friday, October 3, 2014

I enjoy your courses and your comments. I come from the Microsoft stack and am at present deep in Telerik Kendo AppBuilder JavaScript d3.js three.js WebAPI EF OData land. I plan to dive headlong into Angular2 and ECMA 6 as it matures.

RIP Silverlight / WPF / C# - you were a good friend :)


Leave a Comment

*
*
*