On Tuesday, I published a repo to GitHub containing a JavaScript textbook that I've started writing under the working title JavaScript for the Web Savvy. As soon as I have some more work committed, I'll create a GitHub Pages version for easy viewing, but right now you'll need to pull the repo to read the built pages (or build them for yourself). I wanted to go ahead and get the drafts out as I work on them, in order to incorporate any feedback students and other readers might want to offer.
In order to build the book, you'll also need NodeJS with Grunt, grunt-contrib-less, and grunt-contrib-watch installed. In addition to using LESS and RequireJS, I've written the World's Worst Template system to reduce boilerplate. The repo contains fully-built versions of the site, so you don't need to build it to read, but it would be helpful for pull requests and testing.
Why write another JavaScript textbook? Ever since I started teaching a year ago, I've been looking at the most commonly-recommended books for my students to use. This isn't easy: technical books are hard to evaluate, since they may be hard to find and they're incredibly expensive. Those I have tried tend to get ruled out for several reasons:
My goal with JavaScript for the Web Savvy is to write a smart, accessible textbook for people who know a little HTML/CSS, but want to start adding JavaScript to the mix--including the common case of people who know just enough to add a jQuery plugin to the page, but not enough to troubleshoot when something goes wrong. It will teach coding using the actual tools used by real web developers, like the browser console. I also want to experiment with visualizations and interactive elements for common trouble spots where students struggle, like loops and functions. Finally, I want it to be free and freely-available, so students without a lot of money aren't having to pony up for expensive technical books they may or may not use after the class is over.
As I'm working on this project, I'll commit to the repo and update GitHub. If anyone wants to file pull requests for things that are technically wrong, confusing, or need more explanation, please feel free. Contributors will get their names in a credits section, although I will have to ask that copyright be assigned to me as a precaution, in case I ever wanted this to see print. If nothing else, I hope people find it to be useful as a resource. Teaching has become one of the most rewarding parts of our move to Seattle, and I don't see any reason that should be limited to just my classroom.