Who would it be?

 

Well, maybe I’m getting a little ahead of myself. Allow me to back up for a moment. I know there are probably people who read the title of this blog post and scoffed, thinking to themselves, “Superhero? More like, which arch-nemesis?” To those I say, I hear you, but humor me. Before we get into the debate on which superhero let’s talk about JavaScript itself; where I can, hopefully, bring some of you around who are reading this with your skeptic pants on.

A (Very) Brief History Lesson

I don’t want to go through the entire history of JavaScript because there are probably a million very detailed versions of this already on the internet written by people who know much more on this topic than I. So to be brief, we will just hit a couple of points here. In the early days of JavaScript, it was considered to be a complimentary language to  Java to create web based applications. It has since evolved from being a complimentary language and now stands on its own as a viable language to create web based applications. There have been many efforts to replace JavaScript over the course of time, yet JavaScript continues to stand tall. Over that long period it has managed to amass quite the following. Coincidentally, it may also be one of the most detested languages of all time.

JavaScript Now

If you’re reading this article, and you’re saying, “Pfft, Nicole, I don’t write in JavaScript. In fact, I write most of my applications in this new trendy language Elm/Reason/PureScript/ClojureScript. It’s totally the language/framework of the future!” Well, maybe you’re right. And maybe it is the language/framework of the future. But at the end of the day, all of these languages compile down to or rely on a base of, you guessed it, your friendly neighborhood Javascript (no, I am not foreshadowing).

Some other new languages that I didn’t mention above that have become quite popular are TypeScript, CoffeeScript, and Babel (many apologies if your JavaScript based language of choice didn’t get a shout out). I’m going to take a moment to focus a bit more on TypeScript. TypeScript is a language that I have found (typically) front-end developers initially hate and back-end developers initially love. It brings some useful concepts, that back-end developers are typically more familiar with, to the notoriously loose rules of JavaScript. The single greatest feature TypeScript brings is the concept of type safety. Do you know how many problems in your web application adding type safety could help you to avoid/detect? To my fellow front-end developers out there, trust me, TypeScript is your friend. And since TypeScript is a superset of JavaScript, it also has the nifty ability to allow you to write both TypeScript and JavaScript in the same file. This is an amazing benefit for those of you who have decided to upgrade from JavaScript to Typescript, allowing you to not have to take the task on all in one swing.

Anyway, back to JavaScript…

Other very popular developments around JavaScript have been the development of frameworks. A few top players in the game are AngularJS, Angular, and React. No matter your stance in World War III (also known as the great debate of Angular vs. React), you have to admit all of these frameworks have changed the game of web development and are very popular/sought after skill sets. It is worth noting that all of these game changing tools chose to build on the basis of JavaScript. This is pretty compelling evidence that JavaScript has come a long way from its early days and has managed to keep up with the times in its tenure. The challenge of the browsers keeping up with advancements seen in the latest releases of ECMAScript (ES6, ES7, etc), well, that’s a conversation for another day.

Recent developments of frameworks like ReactNative and NativeScript have even brought JavaScript to the world of mobile development. ReactNative is based on, you guessed it, React while NativeScript is based upon Angular. Both of these languages give you the ability to build cross platform apps with ease and without having to learn Objective C, Swift, or Java. There are some slight differences between each of these frameworks and their parent framework but I assure you this learning curve is small and much better than having to learn an entirely new language.

I would also be remiss if I got through this entire blog post without mentioning that JavaScript is no longer just a programming language for the client facing portion of your application. You can now write your full stack in JavaScript using Node.js. There are also a few other JavaScript based choices out there for you to write your server side code in, but Node is by far the most popular at the current juncture. If you’re writing an application on a team, imagine the benefit to the whole team being able to build an entire application on the back of just one language. Now, I understand frameworks like Angular and React are not without their own learning curves. But, to my point, I believe that curve of having to know/learn Angular and Node is much more gradual and than having to learn, let’s say, Angular and C# because at the end of the day it’s all just JavaScript.

This is not to say that JavaScript was and always has been perfect. It certainly isn’t, and if we are being fair, no programming language is without its faults. But JavaScript has the benefit of many of these faults being very well documented, which means so are the ways they can be avoided/resolved. Plus the frameworks built on top of JavaScript inherently try to push you in a direction which will avoid certain risks of (mis)using JavaScript.

The Future of JavaScript

The irony of all of this is that the future of JavaScript is probably people writing less pure JavaScript. Plot twist, I know. But with the emergence of frameworks like Angular, you have full robust applications utilizing their API which is written with the assumption that you’ve chosen to write your application in TypeScript (because it’s awesome). React stays a bit more true to its JavaScript roots, but still pushes the boundaries by introducing new tools for your utility belt (am I foreshadowing yet) such as JSX. JSX is a syntax which allows you to create full HTML templates, with the power of JavaScript.

There’s that cliche phrase, “Never forget where you came from.” That’s the point I’m trying to make here. No matter where we go with these new languages and frameworks that I have mentioned, none of them would exist without the base layer of JavaScript. JavaScript has paved the way and provided a foundation for a massive portion of stacks we use to build applications today and the foreseeable future.

Back to the Superhero Thing

So, hopefully I’ve gotten a few of you to go to your nearest department store and exchange your skeptic pants for a refund. Now, on to what you’ve all been waiting for. If JavaScript were a superhero, who would it be?

We could draw some comparisons to one of the most well-recognized heroes of all time, The Man of Steel. Not only is Superman one of the most well known superheroes, but also easily one of the most powerful. In fact, it is unknown how powerful Superman truly could be. Similar to Superman, JavaScript is probably one of the most well-known. Anyone in the in the business of software could tell you they’ve at least heard of JavaScript. In addition it ranks at the top of best programming language to learn (according to this survey courtesy of Stack Overflow). There is also a fair amount of evidence out there that would support the theory that JavaScript is among the most powerful (depending on how you measure what makes programming languages powerful) programming languages you have at your disposal. But alas, I think that is where this comparison has to draw to a close. A major irreconcilable difference here is that while Superman has only one weakness, Kryptonite, JavaScript has amassed quite the list since its inception.

What if we take a slight left here and go for more of an anti-hero? I couldn’t possibly resist doing this blog post and attempting the comparison with everyone’s favorite merc, Deadpool. Raise your hand if you’ve ever felt personally victimized by (Regina George… just kidding, wrong movie) an error in JavaScript. It’s okay, we’ve all been there, left to debug our code for hours only to realize something nowhere near the line number provided was borked or the fallen into the trap of coercion when using a double equal instead of using a triple equals. Deadpool is someone who always remembers not to take himself too seriously and more or less mocks and taunts himself and others throughout his adventures similar to the way some of these JavaScript issues seem to feel like they could be mocking or taunting you. But, overall, I can’t say I think this is the most fitting comparison because Deadpool has the ability to heal himself. Although that is wishful thinking, we all know if something is wrong in our JavaScript it is most certainly not going to fix itself. Congrats though, for the rest of eternity you will now read your JavaScript errors in the voice of Deadpool. You’re welcome.

Next up, Batman. This is an interesting comparison because, is this guy even a superhero *gasps heard around the world*? But really, hear me out. He’s a really rich guy that has a lot of really fun gadgets and way too much time on his hands. There isn’t really anything all that ‘super’ about him when it comes down to it. To be clear, this me saying Batman isn’t great, he’s iconic (when not played by Ben Affleck). What I am saying is that without the Batmobile, Batcave, Utility Belt, and the seemingly endless entourage of sidekicks he’s just a normal (really rich) guy. But wait… does this sound familiar? It should.

Without all of the fantastic tools that have been created from JavaScript itself, is JavaScript really that special? Probably not. There are not many coding languages that we see really lasting this long over time. Considering the amount of technology available out there, that list isn’t exactly running off the page. But, here we are, still talking about JavaScript more than a decade later. That is a pretty long time in this industry. You can endlessly debate about which flavor of JavaScript you love the most and why it’s better than the others just like you can debate which Batman was the best (*cough* Michael Keaton *cough*). Love it or hate it, JavaScript isn’t going anywhere anytime soon, and has brought us a plethora of tools that have revolutionized the building of web applications similar to Batman’s longevity in the comic book world and endless fun gadgets.

So there you have it. If JavaScript were a superhero, we think it would be Batman. Now, ensue the debate on whether Batman qualifies as a superhero or just a hero. Ready, GO!

Do you agree? Have someone else in mind? Let us know what you think in the comments and thanks for reading!

newsletter

Want to know as soon as we post anything new? Sign up for our newsletter to get alerts to any announcements, blog posts, and other cool stuff we have going on.

Nicole Faulise

Nicole Faulise

Continuously trying to solve the riddle of how to fit more than 24 hours in a day. I have worked on developing applications in a diverse portfolio of industries including, but not limited to, Transportation/Logistics, Education, and Health. If I were to describe my occupational status it would have to be part-time software engineer, full-time nerd. My best friend is my dog, and that's how we both like it. I love to travel and have an obsession with hockey. And last but not certainly not least... Go Bills!

Leave a Reply