There are a bunch of things in “modern” JS that irrationally scare me. I’m going to make a list of them so I can tackle them one by one. Earlier this morning I mentioned I wanted to learn ES6 techinques one-by-one, so here’s a good hitlist of things I should attack.
Moving blocking JS calls from the top of your page to the bottom is a very well-established performance recommendation – you shouldn’t block your visitors from seeing your content before it becomes interactive. I followed this advice to update my company’s website’s behavior, even on pages that used Handlebars to render big important parts of the page. On those pages, I used to put a
<script> tag right in the middle of the page to render the form then and there. But now that the dependencies weren’t available half-way through pageload, I had to make that script call at the bottom of the page.
I started with Luke Hoban’s ES6 Features repo and quickly got intimidated. Yikes! What a big list of features with terse descriptions and illustrations that leap headlong into illustrating the specific concept. I think this will be good for when I have a better high-level idea of the new features. For now, it seems like Rauschmeyer’s list in Ch4 of his book seems just as good if not better because I’ve at least heard of dude, and his concise definitions seem easier for me to parse. I bet when I get comfortable I’ll see some advantages to @lukehoban’s approach.
Now I’ve actually set up Babel for my project, which takes a few more steps than just running
$ npm install --save-dev babel-cli babel-preset-env
Following the steps listed in Lindley’s article about Learning ES2015, I started by skipping over step 1 – I think I know enough ES5 to get started with learning ES2015. Then comes setting up a local ES6 development environment. My first thought is “Babel” and that this article seems a little out of date if it’s even mentioning Traceur and JSPM. So sure enough I go to Babel’s site, run the npm install command, and am immediately faced with the question of whether or not I should set up some kind of task runner to watch and transpile Babel as I write it. Seems like a typical problem I run into learning JS stuff today – one thing leads immediately into another, and before I know it I’m trying to think of a good directory structure and tooling setup for easily transpiling. Options now seem to be Grunt, gulp, npm run-scripts, and a taskfile format that sounded really appealing.
So I’ve already got a bunch of changes I want to make to my last post, but the whole point of this blog is to write new posts about coding and learning new things. The urge to edit-edit-edit and polish is definitely present and strong.
I decided to start a blog about coding stuff and whatever’s on my mind because I realize I don’t write regularly outside of work emails and little back-and-forth chats with coworkers. But I enjoy writing. I also don’t do much coding outside of work, and at work my focus isn’t to stay on the bleeding edge of technology trends. My focus at work is to meet business goals. If I get to have fun playing with a new technology at the same time, or deliver more value because I’m doing something better, great. But that’s not the goal. And so to give myself an excuse to write and code more, I’ve started this blog.
I just got my blog up and running using github, github pages, jekyll-now, and prose.io