h1

First Toronto Ajax Pub Nite Mon Jan 14 2008

December 5th, 2007

Ajax Pub Nite is coming to Toronto.

We always find people at tech gatherings who are interested in talking about Ajax. We decided to start a regular Ajax Pub Nite to see where it goes. I’ve registered AjaxCamp.org on the chance that it grows into something bigger.

The first one is in January, hope to see you there!

h1

Bundled crap is a big part of Vista’s downfall

November 30th, 2007

I have set up two new systems lately for friends and family. Each was a brand new low-end base Intel system with a current processor of decent speed, 1Gig RAM and a large hard drive. Each came with Windows Vista Basic pre-installed with a number of OEM utilities and third-party software. One was a second-tier desktop, the other a first-tier laptop.

Each of these machines out of the box ran abysmally slowly. Over 750M RAM was consumed at all times, and CPU rarely dropped below 25%, even after a day of being plugged in, getting updates, and finishing its Vista disk indexing (and the superfluous Google Desktop indexing on one of the machines).

On both of these out-of-the-box installations, waiting for a program to load and initialize was tedious enough to remind me of the days of 32Meg memory and the era before disk cache.

The number one solution for both of these installations was to remove the Norton security suite and replace it with the free AVG anti-virus solution. This reduced memory consumption by at least 200MB and allowed the CPU to actually go to idle. I also stopped a bunch of unnecessary utilities from preloading (they can still run, they just don’t load up on boot and take up resources until you need them).

While I’m not fond of Vista – its value over XP is negligible and the differences that could matter are not enough to outweigh the effort to change – I’m convinced that Vista’s reputation as a bloated resource hog, while deserved to some extent, is vastly inflated by the poorly optimized OEM builds that most of the user community by their lack of tech knowledge is forced to accept.

The only way to get a decently performing machine is to modify your default installation so much that you will never get support on it. When my friend’s built-in video camera stopped working due to a driver conflict with a Windows update, he returned it to the store and upon seeing that it had been optimized, they told him this configuration was unsupportable and reinstalled their original setup, fixing the video but making the machine otherwise practically unusable.

Microsoft can’t even fix this problem at the source, because if they were to mandate that their OEM partners optimized their builds, it would be construed as a monopolistic play to block third party software.

Sure, Vista has its problems, but it’s not a completely unusable hunk of crap. An OEM install of Vista, however, is.

h1

Security Education Conference – Toronto, Nov 2007

October 30th, 2007

Security expert Eldon Sprickerhoff of eSentire whispers to me from the shadows that Toronto will be the scene for a major conference on security in November.

SecTor has a stunning lineup of speakers from the cream of the security community – representing hackers, law enforcement, vendors, organizations and corporations – looks like the hats will be a mixture of white, black and all shades of gray.

[Addendum: Woohoo! If you use the discount code: “ESENTIRE” you will receive a 10% discount when signing up for SecTor – thanks, Eldon]

h1

Ajax Experience: Wrapup

October 26th, 2007

Ajax Experience 2007 East is done. Another great show with really great content and really engaged attendees.

The final day started out with a keynote from Aza Raskin of Humanized fame, who among other things highlighted the Endless Pageless pattern that fellow Canadian Pete Forde talked about in an article last year.

I gave my Ajax Transport Layers talk to a modest yet receptive audience.

Doug Crockford‘s JSON talk was up to his usual standard.

In the afternoon there was an animated panel discussion on Ajax Futures, with John Resig from Mozilla, Andre Charland of Nitobi, Douglas Crockford and Aza Raskin.

Kris Zyp followed with a great talk on Advanced JSON. Some of the JSON-RPC stuff he talked about was very similar in concept to the Jester stuff covered by Pete and Eric yesterday. I have to say that Kris strikes me as the one guy who deserves the “smartest-guy-of-the-conference” award.

Here is a pic of the Ajax Experience Canadian speaker contingent – left to right: Andre Charland and Dave Johnson of Nitobi, and Pete Forde of Unspace.

Andre Charland, Dave Johnson, Pete Forde

And here’s a picture of yours truly, with my new t-shirt from The Dreaming. No relation, honest.

Brent Ashley, but not the one in The Dreaming

h1

Ajax Experience: Stuart Halloway – Javascript Refactotum

October 25th, 2007

Stuart Halloway speaks again, and it’s entertaining as usual. Get the presentation slides on his blog.

Stuart’s Refactotum presentation encourages the audience to take the leap to make a contribution to an open source project.

How to be a Refactotum

  1. Set aside 4 hours
  2. Choose an open source project
  3. Get edge (the latest source from the repository)
  4. Get metrics
  5. Analyze
  6. Contribute
  7. Submit

Stuart walks us through a Refactotum project in which he made a small change to YUI’s DomCollapse. Along the way, we learn how to use TheFrontSide’s CrossCheck for Javascript unit testing, and get a great refactoring tutorial.

h1

Ajax Experience: Ryan Breen – Ajax Performance Analysis

October 24th, 2007

See Ryan’s presentation slides in PDF form.

Ryan Breen is VP Technology at Gomez. He blogs at his own site at ajaxperformance.com

Ryan divides performance monitoring tools into two categories:

Network Visualization

  • Firebug
  • Webkit Web Inspector
  • IBM Page Detailer

Client Side Profiling

  • JSLex
  • Firebug and Firebug lite
  • Dojo.Profile

“The largest opportunity for optimization exists at the network layer”

Latency is the target for best optimization ROI. Techniques include:

  • fewer requests
  • pack more info into each request
  • reuse connections
  • increase connection parallelism
  • minimize bandwidth use
  • respect caching but don’t rely on it

Fewer Requests
A great way to make fewer requests is with image concatenation, whereby a bunch of images are bundled into a single larger image, and lay out the sub-images via css viewports into the large image.

Another way is to bundle multiple Javascript and CSS files together.

Connection Persistence
usually broken by firewall configs – test from outside your environment.

Connection Parallelism
HTTP spec allows two concurrent browser connections to each server.
Using multiple hostnames per server, you can get two connections per hostname and increase the number of parallel connections allowed.

Bandwidth

HTTP Compression (gzip, deflate)
JS Obfuscation

Don’t overlook the simple things
when linking to a directory, remember the trailing slash so the server doesn’t have to redirect the browser

There’s a bit more as you will see when you look at the presentation PDF, and he gives some demos of code profiling in action – I imagine you can tell already that Ryan is extremely knowledgeable about and experienced with browser application performance analysis.

h1

Ajax Experience: Stuart Halloway – Advanced Prototype

October 24th, 2007

Stuart Halloway is one of the most engaging speakers you are ever to likely to see. He knows his topics well and he presents in a very entertaining and often tangential style.

I won’t bother to comment on the Advanced Prototype part of his talk – you can find prototype discussed in many places. I’ll try instead to follow some of the tangents.

Stuart expresses a strong opinion about Javascript 2.0 – to wit that it is an abomination up with which he will not put. He says that it seems to consist of a bunch features added by people who don’t “get” how Javascript 1.x should have taught them to program, all imposed from on high by the ActionScript camp (a charge I’ve heard from others in the ECMAScript observer community).

Recommended tools:
Crosscheck.js
Javascript Shell

Random rant: “a Domain Specific Language is a way of dressing up your crappy IDE so it looks nice”

I look forward to his “Refactotum” talk tomorrow, which will be about how to contribute to an open-source project.

h1

Ajax Experience: Chris Schalk – Google Gears

October 24th, 2007

Chris Schalk is a Developer Advocate at Google. His talk is called Beyond XHR: Taking Ajax Offline With Google Gears.

Google Gears is a browser plugin that provides offline storage and other supporting functionality. It is supported in most popular browsers.

With Gears you can completely decouple communication from UI actions. The communication happens periodically when connectivity is available.

The three APIs that Gears provides are:

  • LocalServer – to access the application offline
  • Database – a powerful relational db (SQLite) for storage
  • WorkerPool – a way to dispatch chunks of code to run in separate thread-like pools that don’t impact your app

LocalServer

  • ResourceStore – capture individual online resources for offline use
  • ManagedResourceStore – capture entire applications for offline use (using a manifest file)

Chris’s presentation is itself an offline app created with Gears (no link, I’m afraid although a variant of it comes with the gears download). It works equally well online or offline.

LocalStorage

  • SQLite – Open source, mature, small, fast full featured relational db
  • Gigabtes of storage

WorkerPool

  • thread-like functionality
  • no more blocking the browser UI
  • communications via IPC – no shared state

Chris is showing us some Full Text Search code samples that leverage the FTS3 features of SQLite

What’s Next

  • Support Google Apps going offline
  • Support External app developers
  • FTS3 in languages other than English
  • Cross-domain API and other WorkerPool enhancements

Chris encourages us to visit http://code.google.com/ to discover the cool things google is working on and learn how to use them.

I’m going to subscribe to the Google Code Blog RSS feed right now.

If you have Gears loaded up and want to try an example app, have a look at the blog.gears sample app.