Learning JavaScript: 2019

Having settled on JavaScript as the thing I wanted to learn more about next, I thought a log may be useful to look back on, and as a reference for others

Posted 10th June 2019 • Development • #javascript #learning

As a web developer, my job is constantly changing, usually getting more complicated. The skills you need to build a fast and easy to use content managed website today compared to 10 years ago are completely different, and if you don't adapt and keep learning it's easy to fall behind.

I decided it was time to learn something new, so the first challenge was "what?". I use tools every day which are written in PHP and JavaScript, yet my skill in both isn't great because I haven't really needed them much in my work. Both of them are languages that I feel like I should know, but in reality I have very little call for them. I build content managed websites for clients using Craft CMS, HTML & Sass. Occasionally I need some light interaction or animation but that's about it. If I need something specialised there's usually either a plugin for it, or I hire someone to build it for me.

PHP is the language Craft is built on (actually it's built on Yii 2, a PHP framework) and although I feel like perhaps I should know more about how it runs under the hood, the reality is that if I don't use something regularly, I'm going to forget it. I've done several PHP courses in the past and I remember almost nothing because I never have cause to use it regularly. It's also more of a backend language and I generally find front end work a lot more satisfying.

JavaScript was my second option. It's used in every corner of the web and it's so adaptable it's often used for things it was never even designed for, but I don't see that changing any time soon. Knowing where to start with Javascript today is a challenge in itself. I've considered getting in to it in more depth several times in the past. It generally goes "Ok, so I'll learn JavaScript. Where do I start?" I remember an article about all the peripheral plugins, build stacks and technologies around JS and look at this Hackernoon article on How it feels to learn JavaScript in 2016. That's usually enough to make me go "This is insane, maybe it's not worth it after all... I'm going back to work now".

Oh, Babel is a transpiler that allows you to target specific versions of JavaScript, while you code in any version of JavaScript. You don’t HAVE to include Babel to use ReactJS, but unless you do, you are stuck with using ES5, and let’s be real, it’s 2016, you should be coding in ES2016+ like the rest of the cool kids do. - Jose Aguinaga

This time I tweeted about it and had a reply from Steve Rowling suggesting I take a look at some vanilla JS work from Chris Ferdinandi. 'Vanilla' is slang for 'plain' here, that's JavaScript in it's basic form without all the build process stuff or the latest versions which require transpilers to use in a real website. I looked through the site and I think that even if I don't stick with vanilla JS in the long term, it's at least a good place to start. Learning a framework is always easier if you understand what it's doing under the hood anyway.

So long story short, I'm going to try and keep a dev diary of what it's like learning JavaScript in 2019 from the point of view of someone who's been getting on fine with jQuery for the last 10 years, but to whom this whole ES6 thing is like a foreign language (which, incidentally, is still easier than learning Finnish).

Useful stuff discovered this week

  • Codecademy - This is where I'm going to start. It has interactive lessons for lots of languages, and gives you practice while learning instead of just reading from abook
  • Sample App Ideas for ideas on what you could build with your new skills
  • Headless Craft CMS - Ryan explains how to use Craft as a headless CMS with CraftQL in this paid-for set of lessons. Could be useful if CraftQL is actually maintained (it hasn't been updated for 3 months at this point)

Eventually I'd like to interact with some APIs, particularly like Steam or Goodreads as I have some ideas in mind.