Wednesday, June 19, 2013

Heretical Guide To Ember JS

I've written a new ebook. It provides a detailed introduction to Ember.js.

One enormous caveat: it doesn't deal with the data layer at all. I think this is fine, because Ember Data hasn't gotten near 1.0 yet, and Discourse and some other Ember projects roll their own data layers anyway. Nonetheless, my new book's 108 pages long, with extensive code samples, because there's a lot of other material in Ember to cover.

The book covers a few different Ember "hello world" implementations, then shows you how to build a trivial GitHub notifications API reader, and then walks you through building a complete chess game, with HTML5 drag and drop, and similar user interface flourishes.

The gradually-increasing sophistication of these example applications helps me acquaint you with the Ember mentality. Ember's widely known to have a somewhat punishing initial learning curve. By starting out super easy and building more and more sophisticated code, my book can get you through that learning curve much, much faster.

My book also takes a critical examination of Ember's idea of MVC. Spoiler alert: I don't think Ember chose its class names perfectly. I don't think the Ember Controller really is a controller, for example. But I do think Ember is useful. In the same way that experienced Rails developers have to achieve a sophisticated and sometimes critical understanding of Rails in order to make subtle decisions about how to use Rails most effectively, I deconstruct Ember MVC and assemble a new way of understanding Ember which I think is much more effective than the default interpretation, and will make it much easier for you to reason about your Ember apps.

Basically, I figured out Ember so you won't have to. Many people who think Ember's Controllers are not real controllers are left helpless and baffled to explain what Ember's Controllers really are, but I think my book makes that question very easy to answer. So you can skip that whole confusion phase and jump right into building great apps.

Likewise, there are a few places in Ember where there's more than one way to accomplish a given task, and your job becomes to choose the right method. That can be hard without a good mental model, but not everybody learns well from a theoretical perspective, so, in the section on the {{action}} handler, I re-implement the same functionality several different ways, and compare the implementations.

My book about Ember is obviously the best book about Ember, because it's the only book about Ember, but people have told me that my book about Rails is the best book about Rails, and there are many, many books about Rails.



Update: my mistake, there's a book on Amazon and a book on the way from Manning also. My book might be the best book on Ember anyway, but it might not; I don't know yet.

Saturday, June 15, 2013

Tango Protest

Tuesday, May 28, 2013

Ember Animation Hello World

Ember Animated Outlet is a great little GitHub project with a simple demo which, as an Ember newbie, I nonetheless found a little confusing to implement, so I stripped it down to a "Hello World" use case to make the code easy to use and explain.

Friday, May 24, 2013

How Git's Smudge And Clean Filters Work

The technique is powerful but obscure, so I created a repo on GitHub which demonstrates it.

Basically, smudge is equivalent to "run this code whenever you check anything out," and clean is equivalent to "run this code whenever you check anything in." One major caveat to that overgeneralization is that git expects the code you run to be a filter. Because of this, it not only expects input from standard out and passes your code input via standard in, it also suppresses both standard out and standard error.

(Like git-bisect, git filters allow you to execute arbitrary Unix software in a very powerful context, opening up the possibility for other use cases, but firmly encourages a particular use case.)

Wednesday, May 8, 2013

Elektron Analog Four: Phenomenal Demo

One of the challenges I saw with Archaeopteryx: programmers got so excited about the code side of it, they distracted me from the actual instrumentalist aspect.

This is awesome. And so is this. But so is this:

Saturday, May 4, 2013

Stop Drawing Dead Fish

Another brilliant presentation from Bret Victor. The spirit of Xerox Parc remains alive, and then some; he transfers, to animation, the machine control as performance dynamic which characterizes DJing. Very highly recommended.


Tuesday, April 23, 2013

Music-Generating Swings In Montreal

Sunday, April 21, 2013

New Track On SoundCloud: "Willfully Obtuse"

It's a leftfield drum and bass track with an indie rock feel to it.



Probably very influenced (unintentionally) by this Diiv song.