High Performance Web Sites

A book written by a friend of mine at Yahoo!, for which I did a technical review last summer, was published earlier this month. High Performance Web Sites by Steve Souders is just crammed full of real-world, practical information on how to present a web site so that it loads faster for the user.

The main thrust of the book are 15 rules for better server↔browser performance. Although I've been doing web-related engineering since 1994, many of the rules were new to me.

Some of the rules are completely common-sense, such as to include an expires field in the response header where you can, such as with images.

The benefit of some other rules, though, is less clear until you get the explanation in the prose of the book. For example, if you refer to external style sheets, they should be referenced from near the top of the page, but external JavaScript should generally be referenced from the end of the page. This ordering can make a huge difference in how fast a page appears to load. Why? See Rules 5 and 6 of his book.

The book ends with a long chapter that looks in depth at the front page of a bunch of popular web sites: Amazon, AOL, CNN, eBay, Google, MSN, MySpace, Wikipedia, Yahoo!, and YouTube. (Oddly, the front page of my blog failed to make the cut.) You might be surprised at how bad some of the pages are.

I received a copy of the book today (signed by the author, no less — thanks Steve!) and am excited because it seems to cover something that wasn't covered much in the manuscript that I reviewed: a plugin for Firefox's Firebug, Joe Hewitt's most excellent page debugger and inspector. The plugin, YSlow (“Why Slow?”), analyzes a page with the book's rules in mind, generating a report indicating areas for improvement.

Steve's title at Yahoo is Chief Performance Yahoo!, a position that I think it's fair for me to say I informally created and held in the early days of Yahoo. Starting in 1997, I built “Jeffrey's Page Checker” in my spare time, an internal engineering tool which checked a web page for correctness, and reported various metrics about its fluff (wasted whitespace, image overhead, etc.). It's decidedly a “Web 1.0” tool, old and clunky, but I know that it's still at Yahoo because just the other day, a friend sent me a screenshot of it still alive. A note in an upper corner read “The what's new page was last updated 7 years, 0 months ago.” Ah, the nostalgia.

Although it is still at Yahoo, I doubt that it's in use at Yahoo. Nevertheless, current Yahoo! Employees can find it at http://checker.yahoo.com.

Sadly, way back then, the position was informal, so it didn't come with the buckets of cash, options, and accolades that I'm sure Steve is showered with on a daily basis. I can't speak to the first two, but he certainly deserves all the accolades he gets, as the book represents a lot of research, tool-building, and presentation that any web-related engineer can value greatly from. Highly Recommended.


Discovering Photoshop Internal Font Names

When programming scripts for Photoshop, you sometimes need to know Photoshop's internal name for a font. That name almost always differs from the name presented in the drop-down list of fonts. For example, the internal name for the Arial font is “ArialMT.”

A simple way to find out the internal name of a font is to create a text layer using the font, then invoking this Show Font Name.jsx script from within Photoshop. When executed, an alert will pop up showing the internal name of the font.

If you don't know how to install a Photoshop jsx file, mimic the install instructions provided on the page for my calendar-building script.


Kids’ Colorful Tea Bottles

The kids' tea bottles await their owners, at the preschool Sports Day this past weekend (more about which is presented here).

Racks of colorful kids' thermos bottles await their owner at a preschool Sports Day
Nikon D200 + Nikkor 70-200mm f/2.8 @ 160mm — 1/6000 sec, f/2.8, ISO 400 — map & image datanearby photos
Racks of Tea Bottles
Racks of colorful kids' thermos bottles await their owner at a preschool Sports Day
Nikon D200 + Nikkor 70-200mm f/2.8 @ 200mm — 1/6000 sec, f/2.8, ISO 320 — map & image datanearby photos
Colorful

Another View of the Rice Terraces
Terraces of Rice -- Otsu, Shiga, Japan -- Copyright 2007 Jeffrey Eric Francis Friedl
Nikon D200 + Nikkor 17-55 f/2.8 @ 31mm — 1/320 sec, f/7.1, ISO 200 — map & image datanearby photos
Terraces of Rice

On the little trip where I photographed the elderly couple harvesting rice, I was returning to the mountainous area with a lot of terraced riced paddies that I'd visited the week prior with Nils (where the kids had played). I'd returned to try to get some shots from higher up on the mountain, where I envisioned I'd be able look down at a wide expanse of rice paddies splayed out before me.

It turned out that the terrain wasn't that steep, so all but the few closest terraces seemed to blend into one. There were dozens of levels between the road and the top, but I could never really see them all at once.

View from the Top -- Otsu, Shiga, Japan -- Copyright 2007 Jeffrey Eric Francis Friedl
Nikon D200 + Nikkor 17-55 f/2.8 @ 55mm — 1/320 sec, f/7.1, ISO 200 — map & image datanearby photos
View from the Top

Various fingers of farmed land extended up into the mountains, accompanied by tiny access roads, that was fun to explore.

Here's an area fairly high up, away from civilization, that was suddenly very nicely manicured:


Nikon D200 + Nikkor 17-55 f/2.8 @ 20mm — 1/350 sec, f/8, ISO 200 — map & image datanearby photos
Well Manicured

There's a perfectly flat shelf of lush grass between the slope on the right and the hillside on the left, making it a perfect place for a picnic or barbecue.

One of the little access roads continued well past any farming, and became very rocky and almost impassable. It probably wasn't the best way to treat my scooter, but I took the road until it ended in the middle of nowhere, way up in the middle of the mountain (which turns out to have been 681m tall Mt. Daibi — 大尾山). By this time, the area had become very steep.

Steep -- Otsu, Shiga, Japan -- Copyright 2007 Jeffrey Eric Francis Friedl
Nikon D200 + Nikkor 70-200mm f/2.8 @ 200mm — 1/1000 sec, f/2.8, ISO 320 — map & image datanearby photos
Steep

With the high vantage point, I had a nice view of the mile-long “Rainbow Road” bridge across a particularly narrow area of Lake Biwa.

Bridge and Wheel -- Otsu, Shiga, Japan -- Copyright 2007 Jeffrey Eric Francis Friedl
Nikon D200 + Nikkor 70-200mm f/2.8 @ 200mm — 1/800 sec, f/5.6, ISO 320 — map & image datanearby photos
Bridge and Wheel

The main goal of my trip was to see the rice terraces, and indeed I saw plenty. Most hadn't yet been harvested, but some had.

See You Next Year -- Otsu, Shiga, Japan -- Copyright 2007 Jeffrey Eric Francis Friedl
Nikon D200 + Nikkor 70-200mm f/2.8 @ 200mm — 1/1250 sec, f/4.5, ISO 200 — map & image datanearby photos
See You Next Year
Otsu, Shiga, Japan -- Copyright 2007 Jeffrey Eric Francis Friedl
Nikon D200 + Nikkor 17-55 f/2.8 @ 17mm — 1/500 sec, f/7.1, ISO 200 — map & image datanearby photos

That last shot, another one from the top of one set of terraces, is nice in that you can see the lake and the mountains way beyond. (You can even see the ferris wheel, if you look closely enough). It has a sense of expanse that I enjoy, but perhaps it's one of those “had to be there” things.


D200 “Dead Battery Syndrome” )-:

Update: Nikon has issued a firmware update to address this situation. See the “D200” row on this page.

Today was “Sports Day” at Anthony's preschool, which is a fun event full of play, silliness, and dance. Like last year's Sports Day, it was very hot — 90s in the shade, but the entire event was in the sun — but this year I think the heat was worse for my camera than for me.

I was using my big 70-200/2.8 zoom and Nikon D200 on my monopod. After taking about 830 pictures, I was surprised to see the “battery empty” symbol. This surprised me both because I expected to get more shots from the battery (I can go weeks without having to change a D200 battery), and because there was no “battery getting low” warning in the viewfinder for the previous few-dozen pictures.

I swapped to a new battery, and after taking a shot, the camera again shut down with the “battery empty” symbol. This was highly distressing, because I knew the battery was full.

I was eventually able to figure out that if turned the camera off and on, I could get a few more shots before it happened again. The battery most certainly wasn't low, as I was able to get 400 more shots with it this way, and even after that, the “Battery Info” menu item still reports that it's 70% full.

When I got home, I posted about it on a Digital-Photography-Review Forum, and it was immediately suggested that I had Dead Battery Syndrome, something that I hadn't heard of.

I did a search for it and found a lot of people suffering from the exact same problem. Nikonians has a page that explains it well.

No one really knows what causes it, or what makes it go away, although there is a lot of speculation involving all kinds of things.

For my part, I slightly suspect that it's the lens overheating. (As I said, it was hot, and the sun was unrelenting.). Two hours after I got home, I pulled the lens from its carrying case, and was surprised to find that it was still decidedly warm. The carrying case is padded to the point of being an excellent insulator, I guess. Anyway, I put it on the camera and after one shot I got the “empty battery” symbol.

Yet, five minutes later — five minutes in my hyper-air-conditioned office — it was fine, and it's been fine since. I wonder whether I'll run into the problem again, and if so, when. It's an uneasy feeling.

[Update: a user with a similar-sounding issue with his D300 thinks it's related to dirty electrical contacts.]

Although I took 1,207 pictures today, sadly, I didn't get anything really great like last year. Hopefully when I give a second look through, I'll find a few keepers....