Rob Larsen

Archive for the 'javascript' Category

Internet Explorer 8 Is a Day Old and I'm Already (kinda) Frustrated.

I'm kidding of course, my overall initial reaction is actually quite positive. For instance, I just saw it do this:

ie-8-acid2-test.jpg
(more…)

Mark Pilgrim on Douglas Crockford's "Fixing HTML"

The difference, of course, is that Crockford should understand that things are a little more complicated than that, but the ideas that he thinks are good enough to announce to the world are no better than the ideas a 5-year old has before breakfast. “No more iframes! No more document.write!” he declares, blissfully unaware that his employer’s home page uses both. “Strict entity parsing!” he demands… in a page with unescaped ampersands. “UTF-8 is the One True Encoding!” he proclaims boldly… in a page that declares itself as ISO-8859-1. “No more javascript: URLs! In fact, let’s replace Javascript altogether! And I’ll be back to talk about CSS!” It just goes on and on, the awesomeness gradually swelling until it all folds back on itself like a Möbius strip of self-parody. It’s the Bolero of trolls. Everything he claims is secure isn’t, and everything he claims would increase security wouldn’t. Everything he wants to add to HTML would make it worse, and everything he wants to remove would also make it worse. Please, please tell me he’s shooting the moon to make the worst proposal ever. It just doesn’t make sense any other way, at least not from anyone older than 5.

The Bolero of trolls [dive into mark]

The Fixing HTML page itself.

Books 2008 #3 Pro JavaScript Design Patterns

Pro JavaScript Design Patterns An excellent book. There are plenty of takeaways from this intense examination of Object Oriented programming in JavaScript. I haven't worked on a project large enough to really benefit from OO JavaScript in the overall (classes/inheritance, etc), but even without switching over to a fully OO framework, there are optimization patterns and namespace patterns outlined in this book that can immediately prove useful no matter what scale of project you're working on.

From a pure "oh, that's cool!" perspective, the chapter on Chaining was a real eye opener. I'd looked at jQuery code, of course, but I'd never sat down to think about how he might have created the().ability().t0().keep().mashing().functions().together(). It's diabolically simple in concept (return this!), but also mighty powerful. Again, it's not one of the patterns I'm looking to adapt any time soon, but it was crazy interesting how simple it is in concept.

Two CSS Techniques I Love + I Rolled My Own Social Bookmarking Component

I used to use AddThis for social bookmarking here on the blog. And by "used to" I mean up until two days ago :-) . Over the past couple of days I've been working on setting up my own version to use here and throughout the rest of the site. I launched it yesterday.
(more…)

Books 2008 #1 Pro JavaScript Techniques

Pro JavaScript Techniques (Pro) Reading this book I finally understand why I don't really immediately grasp JQuery code. Resig's doesn't use verbs for his function names. Instead of something like getElementsByClass(), he uses something like class(). I like verbs in my function names.

That aside, this is an excellent book for the serious JavaScript programmer. Resig does a great job of covering the breadth of modern JavaScript techniques and if you've got a reasonably solid JS foundation you can't help but come away from this book with patterns, techniques and approaches that you can apply to your day-to-day code.