Recent Geek News


I wrote a very thorough comment in response to the rather (unfortunately) ignorant and inflammatory blog post on DailyJS titled Static Site Generators for Yeoman, but it seems to have mysteriously disappeared. I didn’t intentionally delete it, at least.

Either way, here’s my original comment, in case you may have missed it.


Recently, Miller Medeiros wrote a blog post called Node.js, Ant, Grunt and other build tools where he outlined some of his concerns about JavaScript build tools, focusing specifically on grunt, the task-based JavaScript build tool I’ve been developing.

Instead of posting a super-long comment on his blog, I figured I’d respond to his comments here.


You know the new Apple Retina MacBook Pro laptop? The one with the super-high resolution display? Well, I got one last week, and I spent all weekend updating my dotfiles to work with OS X 10.8 (Mountain Lion). And after a lot of wrangling with XCode, I finally managed to get everything working. Well, almost everything.

While using Gyazo, I’ve encountered one particularly annoying “Retina” related issue. I posted an article a few years ago about running Gyazo on your own server, and ever since then I’ve been running Gyazo without a problem. The first time I used it on the new laptop, however, I noticed that something odd was happening: every Gyazo screengrab on the new Retina screen was about twice as big as I expected.

Note that while this article addresses an issue within the context of using Gyazo, because it’s more of a general OS X issue, the solution presented herein can be useful in similar scenarios.


These days, arguing over whether semicolons are optional in JavaScript seems to be all the rage.

Many people say that semicolons are optional in JavaScript. But JavaScript will insert them for you if they don’t exist. So clearly, JavaScript thinks they’re necessary, otherwise it wouldn’t insert them for you. Besides, if semicolons were optional, it wouldn’t be called “Automatic Semicolon Insertion,” but instead something like “Automatic Handling of Semicolon-less Code.”

Semicolons are required in JavaScript; they’re just not required in YOUR JavaScript.

Quod erat demonstrandum.


Just now, I was having a conversation with a colleague about the complexity of dealing with unicode in JavaScript Regular Expressions. Basically, what he once thought of as a very simple topic has now become so incredibly complex that he is now overwhelmed, all because he made the mistake (out of necessity, of course) to learn more. In his words, “…and now stuff is all broken, I was blissfully unaware.”


Even though I initially released jQuery BBQ in late 2009, the plugin has actually been many years in the making. While it started out as a little snippet of code that almost every web developer, at one point or another, has written, over time it evolved into something much larger.. and much tastier.

In this article, I’ll not only explain how jQuery BBQ came to be, but I’ll also give you some things to think about, in case you’re considering writing a jQuery plugin.


I recently attended JSConf X, which as you can see from the schedule was so full of JavaScript badassery that the mind can barely comprehend the level of utter awesomeness therein.

One of the best parts was that I finally got to meet a lot of very cool developers, some of whom you can see in my JSConf X photos. Of course, I spent more time talking to people than taking photos, so while there are a whole slew of Adam Sontag dancing photos, you won’t find a “who’s who of JavaScript” this time around. Maybe next year! (Who am I kidding?) Oh, I nearly forgot.. I also got to watch Rey Bango h4x0r Pete Higgins’ iPad. It was pretty hilarious, and I’m sure Rey is still patting himself on the back.


Some of the regular #jquery guys have come to the conclusion that John Resig, creator of jQuery, is the JavaScript world’s equivalent of Chuck Norris, so we came up with some ideas and decided to pay homage to him in a blog post.

Note: he might actually be Chuck Norris, we’re not entirely sure.


I recently encountered an odd behavior in WebKit while testing jQuery BBQ on a page that lived in an Iframe. What I initially thought might be a bug in jQuery BBQ actually appears to be a bug in Webkit, so I set up an example page that shows how location.hash browser history breaks in an Iframe, in WebKit, Safari, and Chrome.


Today, when I started BBEdit, it asked me if I wanted to update to the latest version (9.3), and after it installed, I was greeted with a lovely surprise: there is now an option to set “Invisible characters” colors in the preferences!

Apparently, Rob Griffiths posted about this on Macworld shortly after I posted it to my blog and to Mac OS X Hints, which must have given it a bit of traction. Unfortunately, I didn’t get a link back to my original post, but the end result is the same.. the feature is now officially in the app!

Thanks, Barebones, for a great product!


A jQuery BBQ user came across a rather interesting behavior in Firefox the other day, so I set up an example page to test things out.. and it turns out I’ve either encountered a completely useless “feature” or a legitimate (and annoying) bug in Firefox when setting location.href in a remote XMLHttpRequest callback.


A while back, Paul Irish turned me on to gyazo, a very small, very simple, very free app that allows you to very quickly share screen captures over the web. It works by first using the operating system’s own screen capture tools to snap an image of a region you specify, then it uploads that image to, opening it in your web browser. The URL is even copied to the clipboard afterwards.

Perfect, right?

Well.. almost perfect. Because of firewall restrictions, I found that was blocked for some of my friends, so they couldn’t see my screen captures. Also, I really liked the idea of uploading the images to my own server, so that I’d have full control over them.

So, that being said, I decided to crack open (Right click, Show Package Contents) and see if there was anything I could do to change that.


So I’ve been working on a groovy new jQuery history / deparam plugin.. and in my testing I’ve encountered a rather elusive yet completely evil bug in Chrome (current, / Chromium: When document.location.hash is changed via JavaScript, new history entries sometimes are NOT created.


So I’m currently sitting in a room at the Microsoft NERD center, in a room with a few hundred other jQuery developers, listening to Yehuda Katz give a talk on jQuery best practices. I’ve seen some great talks this weekend. Steve Souders gave an excellent talk on maximizing front-end performance, John Resig gave a great talk on upcoming changes to jQuery 1.3.3, Paul Irish gave a few very successful talks on jQuery anti-patterns and custom web font usage, and Rebecca Murphey is coming up next with her talk on organizing your code using object literals.

I actually did a thirty minute breakout this afternoon, called “jQuery plugin creation: organization, generalization, minification, optimization, gratification,” which seemed to be well-received, even though I felt a little rushed. Either way, very soon I’m going to put it all together here as a series of posts (and eventually screencasts) for everyone.

Today was my first time speaking like that in front of a group of people, so that’s a great thing. And next year, I’ll definitely put more material together and try to do a “real” session in one of the big rooms. I’ve already got some great ideas.

In case you missed it, my presentation is available, after the jump.

[Edit: I just posted my conference photos]


What is Modernizr? Modernizr is a small JavaScript library that performs browser feature detection, allowing developers to easily enable or disable both JavaScript and CSS functionality based on what features are actually available in the browser. Modernizr isn’t my project, but recently, Paul Irish and I decided to attack the then-current 0.9 code base with gusto and rewrote it, optimizing a lot of the code and reducing the minified size by nearly 40%.

Our code, along with other improvements, has been incorporated into the now-final 1.0 release, so check Modernizr out now!

More Recent Geek News