One Hundred and Fifty-Three

May 22

You know what’s better than programming? Programming outdoors. (Taken with instagram)

You know what’s better than programming? Programming outdoors. (Taken with instagram)

May 14

Show me the code

Backbone.js, I have nothing against you. I’m merely singling you out because you’re popular, and it’s endemic.

What’s endemic, you ask?

Look at the home page.

Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.

Ok, great. But how do I use it?

The project is hosted on GitHub, and the annotated source code is available, as well as an online test suite, an example application, a list of tutorials and a long list of real-world projects that use Backbone. Backbone is available for use under the MIT software license.

Yes. But how do I use it?

You can report bugs and discuss features on the GitHub issues page, on Freenode IRC in the #documentcloud channel, post questions to the Google Group, add pages to the wiki or send tweets to @documentcloud.

I’m sure I can. But how do I use it?

When working on a web application that involves a lot of JavaScript, one of the first things you > learn is to stop tying your data to the DOM. It’s all too easy to create JavaScript applications that end up as tangled piles of jQuery selectors and callbacks, all trying frantically to keep data in sync between the HTML UI, your JavaScript logic, and the database on your server. For rich client-side applications, a more structured approach is often helpful.

But how do I use it?

With Backbone, you represent your data as Models, which can be created, validated, destroyed, and saved to the server. Whenever a UI action causes an attribute of a model to change, the model triggers a “change” event; all the Views that display the model’s state can be notified of the change, so that they are able to respond accordingly, re-rendering themselves with the new information. In a finished Backbone app, you don’t have to write the glue code that looks into the DOM to find an element with a specific id, and update the HTML manually — when the model changes, the views simply update themselves.

Getting there. That’s still not what I mean.

Show me the code.

It’s all I’m asking. When looking at a framework, or library, or whatever the fuck you’re pitching, I want to see the code, writ large above the fold. It’s all well and good waffling on for the best part of 2000 pixels about high-level English descriptions of why exactly I should care. But if I don’t see the code, I lose interest.

I still have no fucking clue how one goes about writing a Backbone.js app.

Compare and contrast: jQuery. Bottom of the screen, to the left. What’s there? Code. With a big button to run it. Sold.

Meteor Home page. Top right. A screencast? I’m busy, but sure. Code. Sold.

Rails Cropped, and it links to screencasts, but: you guessed it. Code. Sold.

Back to Backbone. It looks, reads and feels like an API documentation page. Hell, for the most part, it is. It needs a nice splash page with calls to action in big-ass Helvetica.

And code.

Apr 05

Mar 26

Things that went badly this afternoon

After a wonderfully sunny and productive morning, I:

Fibers -

I wish I’d heard about Fibers a month a go, before I’d started rewriting Gusto using Promises.

Mar 25

Dear Tumblr,

Today is the 25th of March. In what universe is the 27th of December two months ago? Use round, not floor, please.

What would be great

If Samuel L. Jackson would read to me the lyrics of “Meet Me on the Corner” by Lindisfarne.

If Coco’s error message line numbers weren’t off by one. Every time.

Mar 15

No. Bad Chrome.

Stop preferring your autocomplete to what I’m typing. You don’t know better than me.

Mar 14

5-minute Chocolate Cake -

In a mug. I ate two. I feel ill.

Shame, really.

Shame, really.

Feb 28

It terrifies me how much time I spend on the internet, consuming for consumption’s sake. Given half the chance, I’ll while away hours middle-clicking TVTropes links.

So I’m taking the chance away. I’m allowing myself but ten cumulative minutes per day on any remotely distracting website, courtesy of StayFocusd.

And I’m giving myself more opportunity to create. I code more. I’m writing more. Pretty soon I hope to be creating for 40 hours a week and be given money for it, so let’s see if I remember how.

Feb 22

Deactivating my Facebook account was one of the least pleasant experiences I’ve had in a long while. The page is littered at the top with pictures of me and various people, with the captions “ will miss you”. It went on to ask me why I’m leaving and list all the things that would break were I to go through with it: pages I was the sole admin of, apps I was the sole developer of, that kind of thing.

It forced me to go through each and resolve who would take care of them after I’m gone, with links that opened in the current page, forcing me to go through the whole ordeal again.

Finally, I click the Deactivate Account button, and it asks for my password. Fair enough.

“Oh, wait, no, you forgot to reassign this one app. Im’ma go ahead and reload the entire page for you.”

Gee, thanks, Facebook. Try it again. Creepy photos, check. Reason for leaving, check. Things that break, check. Password, check. CAPTCHA, wait, what?

So you know I’m human, because you made me do a CAPTCHA when I signed up, an whenever you didn’t like the look of a link I tried to post. And you know I’m me, because I just entered my freaking password. What the hell is the point?

The cynic in me says “to make it more difficult to leave”. The idealist in me reluctantly agrees.

I even told them it was only temporary. I’ll be back.

Honest.

Feb 16

I have, two days running, on two separate email clients, on two separate operating systems, accidentally replied by email to myself. This is 2012. This kind of shit shouldn’t happen anymore.

Feb 10

kriskowal/q - GitHub -

I wish I’d found out about promises when I started writing Gusto. Because now I want to rewrite it.

Feb 05

It turns out that Struct was a rather poor choice of name. Dammit, Apache. It shall heretofore be known as Gusto.