Friday 29 June 2012

jQuery Conference 2012 San Francisco

John Resig created something amazing 6 years ago.

A javascript library that would reduce the pain of programming websites; that would on all browsers. Instead of writing and maintaining separate branches of code to run in different browsers, developers could write one version of their javascript that would just work.

For anyone who's had to debug cross-browser issues, this was like showing us the path to The Promised Land.

Throw in some syntactic sugar, add convenience methods, and add some pretty awesome tools to handle asynchronous programming challenges, and you have jQuery only 6 years later -- the de facto javascript library for every browser and every platform

Today, I'm at the second day of jQuery Conference 2012 in San Francisco with 600 fellow coders. After a marathon day yesterday that went on until the hackathon ended at 10pm, here's some of the highlights:

  • jQuery 1.9 will be released in early 2013
  • jQuery 2.0 will be released in early 2013
  • what's the difference? Well, 2.0 no longer supports IE6, IE7 or IE8! It is promised to be smaller, faster, and smarter. Need to support IE6/7/8? Keep using 1.9. The API's will be identical, so you can simply conditionally load 1.9 or 2.0.
  • thanks to shorter codepaths to querySelectorAll and matchesSelector, the Sizzle selector engine has made a 5-10% improvement in overall speed, which is great, because that's where most time is spent.
  • Sizzle's find('#byId') function has achieved a 300% improvement in speed!
  • might be wrong here, but I think that it's the node.js grunt build system that is used to slim down the jQuery.js file so you can removed modules that you don't use; anyways, documentation is in the README
  • on that note, there's some improved support for hand-rolling customized versions of jQuery so you can weed out what you don't need. Be sure to check out the alpha at http://jquerymobile.com/download-builder to hand-roll your own jQueryMoble.js file. Modularity!
  • jQueryMobile has faster listviews, and a new highly flexible popup data-role
  • jQuery-ui 1.9 will have an accordion, autocomplete, tabs, better menu items, tooltips, and a spinner (numerical chooser)

Finally, consider joining the jQuery Foundation. As we all know, free software isn't really free, and a buck or two from each of us 7,000,000 developers who visit http://api.jquery.org each month surely get a boost in their daily productivity at work, so why not give back a bit?

Or, better yet, convince your boss to pay for it and plant a cool jQuery sponsor icon on your website.

Monday 4 June 2012

Lenovo W520 Thinkpad Review

I bought this laptop a few months ago, mainly because of its full-sized keyboard and its reputation for quality. Here's some notes if you're considering one.

First, a few details. I got a dual-drive RAID-ed model, with the second drive in the DVD drive bay. It's got a quad-core i7, and takes up to 32GB of RAM. Crazy. I ordered it with 4GB of RAM, and bumped it up to 16GB of RAM after purchase. 32GB is a crazy amount of memory, and those 8GB sticks are quite expensive right now. I did splurge for a 128GB SSD drive that fits into a peripheral mSata slot, once shipped to Canada it was about $200. I renstalled Windows 7 on it and it smokes.

The biggest problem I have with Windows 7 on this machine is that it often fails to come out of sleep mode. I'll be moving to a Debian Linux very soon, though I'm not confident this problem will disappear.

The biggest plus is that with the SSD, the battery lasts eight hours. The screen is great. The keyboard is awesome, though I can't understand why the lower left corner Fn and Ctrl keys are reversed (there is even a BIOS option to revert these to normal). Some sort of IBM legacy strangeness happening here.

The weirdest feature is how much the battery sticks out of the back of the machine, a full inch. It hasn't really been a problem for me, but it is something to pay attention to when buying a sleeve or bag.

The fan hardly ever comes on, and my hard drives hardly ever spin, because I'm working off the SSD the majority of the time. I've read complaints about fan noise and heat, but I have not experienced any of this. Quite the opposite, it's cool and quiet. (Disclosure: last laptop a Dell 6400 15.4", for about 7 years, and my only laptop. Loved it, replaced the mousepad and three keyboards, but it still works fine. Though it never bothered me the Dell got hot and the fan blew often.)

In time, I imagine I'll replace the two RAID-ed spinning drives with SSDs, but I've put enough money into it for now. I feel like the capacity of this machine has me ready for another decade of laptop computing, and I am quite happy with my purchase.

I have read some negative reviews of Lenovo products, and the W520 in particular, before I purchased it, so just wanted to put this out there. I'm not a fanboy or an employee, just a programmer who was looking for a kick-ass machine. In my opinion, the W520 is it.