One Hundred and Fifty-Three

  • Random
  • Archive
  • RSS
  • Ask me anything
You know what’s better than programming? Programming outdoors. (Taken with instagram)
Pop-upView Separately

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

  • 2 days ago
  • Comments
  • Permalink
  • Share
    Tweet

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.

  • 1 week ago
  • Comments
  • Permalink
  • Share
    Tweet
View Separately
  • 1 month ago
  • Comments
  • Permalink
  • Share
    Tweet

Things that went badly this afternoon

After a wonderfully sunny and productive morning, I:

  • Fell down a kerb on the way to the library, grazing my hands.
  • Had to pay a £15 library fine.
  • Had to go home to pick up the Bluetooth dongle I forgot.
  • Had to go home (again) to grab the pizza I had intended for dinner.
  • On the way home, someone stepped in front of my bike. I swerved, caught the pegs on a low-lying wall, and I flew over the handlebars, grazing my hands in the exact same place.
  • While at home, I also picked up a battery charger and phone charger. The former was for the Bluetooth keyboard that suddenly stopped typing mid-word, the latter for my now-dying phone. Except the old batteries had leaked in the keyboard, rendering it useless, while the cable I had picked up for the phone was not, in fact, Micro USB, but Apple Dock Connector.
  • Burnt my aforementionedly grazed hands on the aforementioned pizza.
  • Utterly failed to do anything productive.
  • 1 month ago
  • Comments
  • Permalink
  • Share
    Tweet

Fibers

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

  • 1 month ago
  • Comments
  • Permalink
  • Share
    Tweet

Dear Tumblr,

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

  • 2 months ago
  • Comments
  • Permalink
  • Share
    Tweet

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.

  • 2 months ago
  • Comments
  • Permalink
  • Share
    Tweet

No. Bad Chrome.

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

  • 2 months ago
  • Comments
  • Permalink
  • Share
    Tweet

5-minute Chocolate Cake

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

  • 2 months ago
  • Comments
  • Permalink
  • Share
    Tweet
Shame, really.
Pop-upView Separately

Shame, really.

  • 2 months ago
  • Comments
  • Permalink
  • Share
    Tweet

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.

  • 2 months ago
  • Comments
  • Permalink
  • Share
    Tweet

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.

  • 3 months ago
  • Comments
  • Permalink
  • Share
    Tweet

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.

  • 3 months ago
  • Comments
  • Permalink
  • Share
    Tweet

kriskowal/q - GitHub

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

  • 3 months ago
  • Comments
  • Permalink
  • Share
    Tweet

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

  • 3 months ago
  • Comments
  • Permalink
  • Share
    Tweet
← Newer • Older →
Page 1 of 8

About

Avatar 153 Ways That Things Can Go Wrong and Then Awesomely Right, or Inventive Solutions to Problems That Don't Exist

Me, Elsewhere

  • Facebook Profile
  • quartertotomorrow on Flickr
  • mattyb1000 on Last.fm
  • Google
  • quarterto on github

Following

Cool Shit

See more →
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr