How does one build shit in javascript, exactly?

A quandary

A few months ago, I made a tutorial series entitled Build Shit in CSS, received way more enthusiasm for it than I expected (it’s been passed around General Assembly, and at least one cloud storage company that you’ve probably heard of), and almost immediately, Portia Burton suggested I write one for javascript.

I scratched my beard, as that’s how I think, and told her I’d think about it.

I’m still thinking. And I think I’m stuck.

Javascript is a very small set of tools that’s easy to learn, but can be applied in all sorts of clever ways. I really like this. It means I can jump into any given javascript project, e.g. Backbone’s annotated source and have a pretty good idea what they’re thinking.

Let’s call this concept “diggability” - the property of code that let’s a developer jump in and see how other people solve problems.

That same simplicity has lead to a proliferation of libraries, frameworks, ecosystems, build systems, and angry Medium posts about how terrible javascript in 2016 is.

I could write javascript in ES6 using Babel to give myself classes and multiline strings (which is a great feature). I could decide classes are a terrible papering over prototype. I could decide to break my code into modules with require or browserify. Or use Backbone. Or render views in React. Or stick with jquery.

The problem is every one of these decisions is perfectly reasonable, depending on your circumstances. I can make a good case for writing an app with React components, or for keeping javascript as minimal progressive enhancement.

There are no best practices because there are too many best practices, and the phrase itself has turned into a meaningless weasel word, where it is both a good idea to package your code into modules and to avoid bloating the build process.

This is to say nothing of the popular projects that break with all preexisting conventions and do this own thing: Angular and D3.

So if I want to teach junior developers how to build shit in javascript in a practical, unopinionated way, what does that even mean, given that I can’t even keep up with the spread of pace of change?