Thursday, May 29, 2008 

http://blogs.cozi.com/photos/uncategorized/2008/05/27/preloadajaxdata.png

Preloading Ajax data as JSON has helped improve the load time and perceived performance of our family software application. Most of the pages in our web client are dynamically generated in the browser from a complex set of JavaScript and CSS, so we're always looking out for ways to make them appear more quickly.

More at the Cozi Tech Blog.

posted on Friday, May 30, 2008 6:27:17 AM (Pacific Daylight Time, UTC-07:00) 
#    Comments [0]
Friday, March 21, 2008 

http://www.fingermarks.co.uk/gifs/expelled2.jpg

Time for another Odds & Ends.

Well-known evolutionary biologist PZ Myers (Pharyngula) was expelled from a viewing of a new creationist documentary, Expelled, last night. Wait until you read the punchline. There is a God!

Lost, one MacBook Air: Steven Levy explains just how he (thinks he) lost his MacBook Air.

It was St. Patrick's Day on Monday. Peter sent me the Muppets' Danny Boy video. Andrew told me that the Irish bishops had moved St. Patrick's Day. Monday was a holiday in Ireland, as is today (Good Friday) and next Monday (Easter Monday), so many people took Tuesday, Wednesday, and Thursday off this week. Bastards!

Emma and I walked with the Wild Geese Players in the Seattle Parade last Saturday. I walked into a fire hydrant afterwards, while preoccupied with my camera, leaving me with a deep bruise on my thigh. I must get around to posting those photos to Flickr soon (along with many others).

In Martian Headsets, Joel Spolsky discusses Microsoft's recent decision to make Internet Explorer 8 be standards-compliant by default, which reversed their earlier decision to be backwards-compatible. He remarks that they're damned if they do and damned if they don't.

In my opinion, Microsoft has erred too often on the side of backward compatibility. I'm firmly in the camp that wants IE to be standards-compliant by default. After struggling for months with IE6 (and IE7 to a lesser degree), I believe that we badly need to raise the level of standards compliance in browsers. As Jeff Atwood put it three years ago, IE6 is the new Netscape 4.7x: "the browser that we all wish would go away. The one that's a pain in the ass to support."

Confused about the current financial crisis? Watch Clarke and Dawe on subprime meltdown. And read Can’t Grasp Credit Crisis? Join the Club.

posted on Friday, March 21, 2008 5:18:51 PM (Pacific Daylight Time, UTC-07:00) 
#    Comments [0]
Wednesday, March 19, 2008 

http://blogs.cozi.com/tech/images/2008/03/19/vwdscreenshot_2.png

It's not at all obvious how to use Visual Web Developer 2008 Express Edition to debug JavaScript in Internet Explorer. So I wrote it up at the Cozi Tech Blog.

posted on Wednesday, March 19, 2008 8:34:22 PM (Pacific Daylight Time, UTC-07:00) 
#    Comments [0]
Thursday, March 13, 2008 

http://www.georgevreilly.com/blog/content/binary/js-date-dst2.png

The JavaScript engines in Firefox 2 (Windows) and IE6 can't handle the new Daylight Savings Time rules in the U.S. The Date() function returns a value that is off by an hour if the system time is between the second Sunday of March and the first Sunday of April.

More at the Cozi Tech Blog.

Update 2008/03/14: Mea culpa. This is not a widespread problem. It is caused by the presence of set TZ=PST8PDT in my C:\AutoExec.bat. Per KB932590, the existence of the TZ environment variable will cause the CRT to use the old DST rules. (I can't remember why I set TZ several years ago. It's part of the accumulated mess of files that I bring everywhere with me.)

posted on Thursday, March 13, 2008 8:58:27 PM (Pacific Daylight Time, UTC-07:00) 
#    Comments [0]
Monday, March 10, 2008 

http://www.georgevreilly.com/blog/content/binary/deadlock_thumb.jpg

Over at Cozi, we've started a new technical blog. I just put my first post up, describing a nasty problem we had late last year.

Here's the summary:

Internet Explorer 6 does not support transparency in PNG images. The best-known solution is to use the DirectX AlphaImageLoader CSS filter. It's less well known that using AlphaImageLoader sometimes leads to a deadlock in IE6. There are two workarounds. Either wait until after the image has been downloaded to apply the filter to the image's style, or use the little-known transparent PNG8 format instead of the filter.

More here.

posted on Monday, March 10, 2008 9:47:32 PM (Pacific Daylight Time, UTC-07:00) 
#    Comments [0]
Thursday, October 11, 2007 

http://www.wired.com/wired/archive/13.09/images/ST_34_monkey1_f.jpg

I've been meaning to play around with Greasemonkey for a couple of years. Greasemonkey is a Firefox extension that allows users to install scripts that make on-the-fly changes to the look and feel of third-party websites. For example, adding price comparisons to Amazon or thumbnail images to Google search results. UserScripts.org has a large repository of Greasemonkey scripts.

I finally built my first script the other day. We're putting together a new feature at Cozi that integrates partner websites with our site. Since the feature is not yet announced, I'll just say that partners will add a link to Cozi on many of their database-driven pages. That link has a complex, page-dependent querystring. Until the partners do the work to add the link to their sites, we were limited to testing and demoing with hand-modified pages.

I wrote a little Greasemonkey script that finds the right spot on the partner pages to place the link, scrapes some context to construct the querystring, and inserts the link. Now we can test against the real sites and show a compelling demo. Of course, it only works on Firefox and it requires you to install both Greasemonkey and this script. Our partners will have to make minor changes to their sites before ordinary users can take advantage of the feature.

Some gotchas with Greasemonkey. Inserting, say, <b>Click here</b> is as simple as document.getElementById('spot').innerHTML = <b>Click here</b>. However, inserting a <script> node requires:

 var scr = document.createElement('script');
scr.type = 'text/javascript';
scr.text = 'createLink(' + p1 + ', ' + p2 + ', ' + p3 + ');';
document.getElementById('spot').appendChild(scr);

Greasemonkey will definitely become part of my repertoire.

posted on Thursday, October 11, 2007 7:05:48 AM (Pacific Daylight Time, UTC-07:00) 
#    Comments [0]