Recent 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.


|

“If you’re gonna hate, hate with some consistency.” (source)

Earlier today, one of my coworkers was contributing to a cool new JavaScript lib, and complained that while he loves contributing to open source projects (who doesn’t, right?) he finds it annoying to read JavaScript code without semicolons.

Not just that, but he mentioned that he finds it amusing when, amidst hundreds of lines of otherwise pristine semicolon-less code, there is a single line that starts with a semicolon.

So I tweeted about it, then someone tweeted back and I decided to work up an example.

Then I decided to write a blog post. Although that’s mostly because I have a lot of work to do, and I’m an expert procrastinator.


|

Unless you've used another functional programming language such as ML or Haskell, concepts such as partial application and currying in JavaScript may be foreign to you. That being said, once you understand these concepts, you can put them to use in your own code.


|

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.


|

I’m not sure where or when it happened, but at some point the JavaScript community decided that multiple, individual var statements were superfluous, instead opting for a single, combined var statement with a comma-separated list of variable declarations and assignments whenever possible.

Just in case you don’t know what I mean, I’ll illustrate:

// Single, combined var statement.
var foo = 1,
    bar = 2;

// Multiple, individual var statements.
var foo = 1;
var bar = 2;

I’ve asked a number of talented JavaScript programmers why they prefer a single, combined var statement with multiple declarations and assignments to multiple, individual var statements, and the only responses I’ve been able to get seem entirely subjective:

  1. Multiple var statements are superfluous.
  2. Multiple var statements are noobish.
  3. Combined var statements look better.

While I can’t argue with the last point, in JavaScript, multiple var statements aren’t superfluous and they aren’t noobish. They reduce the effort it takes to maintain code.


|

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.


|

For the last few months, I’ve been working hard on grunt, a task-based command line build tool for JavaScript projects that facilitates creating new projects and makes performing repetitive but necessary tasks such as linting, unit testing, concatenating and minifying files (among other things) trivial.

Earlier today, I posted an article to the Bocoup Weblog introducing grunt, explaining why I created grunt (to make my life easier), how it was created (in Node.js JavaScript), how you’d go about using it (by typing grunt on the command line), who is already using it (the jQuery project for starters), and what its future looks like.

In addition, I’ll be in Phoenix, AZ next week for JSConf and will be talking about grunt for 15 minutes next Monday, on the “Twitter Track.” So if you want to learn more about how grunt works, first read my introducing grunt article. After you’ve done that, if you’re going to be at JSConf, come to my talk. And don’t be afraid to find me and ask me all about it!


|

This is by no means a complete list, but I just thought I’d share some of the cool NON-computer games I’ve been playing lately.

Off the top of my head, I’ve played Ticket to Ride, Dominion, Ascension, Carcassonne, 7 Wonders, Pandemic, Forbidden Island, Set, Lost Cities, Neuroshima Hex, Ingenious and Robot Master recently. I own physical versions for about half, iOS versions for the other half, with plenty of overlap somewhere in the middle.


|

I’ve been playing Battlefield 3 recently, but the new Battlelog service has a few issues surrounding refreshing and joining servers that are driving me crazy.

I’ve attempted to address these issues with a new userscript called Battlelog Hacks, so check it out and let me know what you think!


|

Earlier this month, I spoke at the Boston jQuery Conference, where my talk on “Plugin Authoring Best Practices” was well received. It went so well that I’m going to be giving it talk again, but this time online, at the jQuery Summit!

Like last year, I’ll be giving two talks. On the first day, I’ll be giving the aforementioned Plugin talk. On the second day, I’ll be giving a talk on JavaScript Unit Testing with QUnit.

Continue on for more information about my talks and a 20% off coupon code!


|

I’m very excited to be speaking at this year’s Boston jQuery Conference. I’ll be giving a talk entitled “Plugin Authoring Best Practices,” so be sure to sign up for the conference, come to my talk, and say hello!

Also, the day before the conference, I’m going to be giving our full-day Bocoup Beginner jQuery Training. If you’re new to jQuery, this training will help get you prepared for all the great talks that you’ll see over the weekend. The training is a good value, with all proceeds benefit the jQuery project.


|

I recently attended the jQuery Bay Area Conference, which was held at the Microsoft Silicon Valley Campus Conference Center in Mountain View, California. I decided to go not only from a personal “want to hang out with cool people” perspective, because I know many people who are active in the jQuery community, but also from a “Director of Training at Bocoup” perspective. The former is cool because it’s always nice to interact directly (ie. drink beers) with people with whom your only typical interaction is IM or IRC. The latter is cool because on the day before the conference, Bocoup donated a full day of Beginner jQuery training to a very appreciative group of attendees, with all proceeds going directly to the jQuery Project.


|

Tomorrow night, February 17, the Pollotronik All*Stars are playing some killer funk at Toad in Porter Square, Cambridge.

And since Steve Giannaros just sent an email out to his mailing list promoting the gig, I figured I’d just quote him here, verbatim, and save myself the effort of saying the exact same thing:

As some of you may know, the Pollotronik All-Stars have taken a bit of a hiatus, as the band’s founder and fearless leader, Yahuba Garcia, has been extensively touring with the Ryan Montbleau Band, Martin Sexton, among others… On Thursday, 2/17, the Pollotronik All-Stars will be back in full force at Toad in Cambridge! No cover, usually things get started sometime after 10, and we will play late into the evening - http://toadcambridge.com. You will witness an obscene amount of jamming and hear improvisation at its finest, as well as songs by artists such as Herbie Hancock, John Coltrane, Mongo Santamaria, and Robert Glasper, to name a few.

The lineup:
Yahuba Garcia - congas and Percussion
Peter MacLean - drums
Jason Cohen - keys
Ben Alman - bass
Dan Abreu and Myself - dueling tenor saxophones and EWIs.

The secret ingredient, and the basis of this band, is that we have never once rehearsed and wouldn’t have it any other way. So, if you didn’t know, now you know.

So that’s what Steve had to say. Killer funk, killer lineup.. and because it’s Toad, killer beer. I’ll see you there!


|

Just over a year ago, I blogged that jQuery BBQ was going into version 7 of the popular open source Drupal CMS, as a crucial part of the overlay module.

The overlay module allows the Drupal admin interface to appear seamlessly, as a modal window, on top of the current page, while maintaining that page’s context. This was, of course, a great idea, and one that jQuery BBQ made easy, with its built-in cross browser HTML5 onhashchange event and fragment management functions.

And now that Drupal 7 has finally launched, jQuery BBQ provides back button support in over 20,340 sites, not to mention the sites where it was already being used, of course.

Pretty sweet, huh?

More Recent News