I Suck At JavaScript

Today, more than ever, more developers are reaching for JavaScript as their programming language of choice. That choice makes sense because JavaScript can exist and run practically anywhere but for me it has been the hardest language to grasp. Why is this? This blog post and video explain.

Let’s start by setting the stage

My day-to-day work is all browser based. Using JavaScript in the browser is pretty much the reason it exists in my mind, although it’s truly capable of much more. For me, JavaScript started as some enhanced interactions that hooked into DOM elements of my designs (more or less some added flare). jQuery was still the champion of the interactivity of the web and it was perfectly fine to use it since it covered so many obstables early versions of JavaScript and browsers just wouldn’t support.

Now-a-days full-fledge frameworks that are responsible for both frontend and backend tasks and JavaScript is responsible for rendering markup directly but in order to do this you need compilers, linters, task runners, uglifiers, and dependencies galore. When did this become the cool thing to do?

jQuery bad, Vanilla JS good ?

It seems like now you get shunned if you use jQuery at all. I get that you want to fit in with the most modern JavaScript developer hype but if you can’t write good JavaScript in the first place that supports many browsers then why do we instill these thoughts such as libraries like jQuery are really bad.

God forbid you load in the rather small jQuery library to make writing scripts a little less painful. I say this as many of these newer frameworks and JavaScript patterns depend on Node and what seems like gigs of dependencies. How is this any better than where we were?

I’m not so sure that it is. Besides the nice advancements of ES6 we really only get off with an updated syntax rather than making writing JavaScript that much easier to write. Take the arrow function for instance. That thing can get quite confusing to any type of developer. Rather than reading like English like other awesome languages, ES6 gets redacted to using characters with meanings rather than words like function.

For someone coming from the land of writing the word function a mega ton I fear my hurdle to really learn and understand the JavaScript language will be a never ending one.

Frameworks everywhere

With so much hype around the language today as well as the enhanced ES6 syntax in existence there’s no wonder why more and more frameworks are popping up. Gone are the days of just opening up your text editor, creating an html document and css stylesheet to later create a basic website.

Now we somehow prefer to configure a build tool like Webpack or Gulp to create, compress, minify, and author all our files. Libraries like React or Vue create a virtual DOM of which are crazy fast but at what cost?

I get that there are a multitude of advantages to using such frameworks but from a broader perspecive aren’t we still just creating HTML and CSS in the end? Sure it’s more state-dependent and dynamic but languages such as Ruby, Python, PHP, and more have been doing this forever.

Where JavaScript Excels

After all of this complaining I could use a drink but rather than that I’ll shift gears as to why It’s important to learn JavaScript and why I’m truly on a mission to understand the language.

State managment is big these days. We deal with massive amounts of data and using the interactivity from JavaScript to Get, Post, and Patch data on remote servers without a page refresh is pretty gnarly. Being able to do things asynchronously is the name of the game. Nobody want’s to wait for things to load any more. We want our information or media now with no execeptions. JavaScript helps tame this rapid beast called patience. YouTube for example already queues up that needs video in the playlist you are watching and knows to autoplay it when the one before completes. The same is true for Netflix, Spotify, Pandora, you name it.

Where to start learning JavaScript in 2018

JavaScript is here to stay. Like I said before, I’m on a mission to truly learn it. I have been linked to several places to start but what I’ve found that solidifies my understanding the best is build something real with a new language. My most recent Let’s Build series called Let’s Build: With Ruby on Rails is an exact example of this idea in practice. Rather than just teaching myself the language and conventions I need to literally put it to use. It’s a painful but necessary journey to finally grasp a new bit of knowledge but I think FINALLY learning JavaScript is going to stop me from being so scared of the language and reunite me with a passion for it.

Where I’m looking for learning inspiration and guidance:

With all of that said I’m going to start off with a new series revolving around JavaScript. First I may dive deep into the basics but ultimately I plan to build actual apps with it and see what all the fuss is truly about. Here goes nothing!