Tuesday, April 29, 2008

SVG Resurgent

I've been very pleased to see increasingly high-quality Scalable Vector Graphics (SVG) support built into browsers like Safari and Firefox in the last year or so. (And the recent Acid 3 browser test seems to have been coincident with a significant further quality increase.) I did some work with SVG when version 1.0 of the specification debuted in 2001, and found it useful and full of promise, so I was subsequently very disappointed to watch it become almost completely unsupported. My gratitude to the folks who've worked to incorporate it directly into Safari and Firefox (and any other browsers). SVG looks like it has a future again.

In accordance with that view, I've been working with SVG again lately; pounding the rust off of some of my old SVG-related code, and indulging my interest in clocks. The item below is this evening's experiment in using Javascript with SVG, something that I hadn't tried before. Current versions of Safari and Firefox handle the combination beautifully. What's more, both Safari 3.1.1 and Firefox even handle it as an embedded, in-line object in HTML, as this post demonstrates. It may be old news to you, gentle reader, but it was a surprise to me.

Ideally, you'll see an active analog clock here, rendered using SVG, and animated using Javascript. It works in Safari and Firefox, anyway.

Anyone wondering about the significance of the terms "scalable" and "vector" in SVG's name need only open the clock in a separate browser window, and play with resizing that window. Resolution independence is a wonderful thing.

Wednesday, April 23, 2008

Forgotten December

The presence of an unfamiliar species of sparrow at my bird feeder the other day prompted me to grab a camera, only to find that its storage card was full ... with I knew not what. I was on the verge of erasing its contents sight unseen, when I thought better of it. Below are some of those photos, all taken, it turns out, on December 4, 2007, on a visit to the Bamberger Ranch Preserve.

A female leopard frog awaits lunch in shallow water.

The richly distorted lens of water.

Water plants through ripples.

Water plants through ripples.

Oak fire.

The textures of winter grass.

I'm glad I cancelled the erasure of these photos, but frustrated that I never did get a picture of my mystery sparrow. It was an utterly unremarkable sparrow in all respects other than having parallel horizontal bands of pure white and black marking the sides of its face. As usual, nothing in my bird books quite looks like it. Identification suggestions are welcome.

Thursday, April 17, 2008

Your Birthright, Stolen by Light Pollution

The night sky. It's the birthright of every person on Earth, but how many of us have ever had the opportunity to really see it?

See also: The International Dark-Sky Association.

Saturday, April 5, 2008

Bats, Bambergers and Networking

With the kind permission of my boss, I took a day off from work on Thursday and slipped down to the Bamberger Ranch Preserve, to provide moral and technical support while another fragment of the 21st century took up residence there. In this particular case, satellite Internet access. If you're thinking "Satellite Internet? Huge latency, low speed? No, thanks." Well, yes, but try getting anything better in much of rural America, and you'll find that that's as good as it gets. It's as if rural electrification had only gone as far as providing every household enough power for one 15 watt light bulb, had declared victory, and stopped. For the purposes of this metaphor, the 15 watt bulb is a modem that probably can't achieve a connection faster than 24 Kbps, and that may drop its connection at any time. When that's your only alternative, the problems associated with satellite Internet access don't look quite so bad. But it's a lousy situation any way you look at it, and nothing for America to be proud of.

As usual, I drove down to the ranch in the middle of the night, after all the traffic had gone to bed. For a change, I left at a time early enough that I arrived there with several hours to spare before I needed to crash in the guest quarters so that I could get enough sleep to regain consciousness by noon. A cloudy night ruled-out using that time for night-sky photography, but I thought a visit to the chiroptorium might be interesting, even though I didn't think that the Mexican free-tailed bats that predominantly reside there had yet returned in full force from their southern wintering grounds.

Nonetheless, standing near the chiroptorium's mouth in the night's thick darkness, I found bats whooshing and flapping invisibly past me from every direction, as they hunted flying insects and came and went from their roosts. There's an actual wind that blows around you from all of their aerial exertions. It's an experience most people will never have in any form, and it's a shame that I can think of no good way to share it. I'll just have to count myself lucky (which I do) that I've had the experience, and join the Bambergers and others in encouraging the preservation of existing bat roosts, and the creation of artificial bat roosts to educate, to compensate for lost habitat, and to actively & naturally control insect populations.

Of course, I had to try to get some pictures. That turned-out to be both easier and harder than I'd expected. Picking a manual focus point and getting enough light from the flash was less trouble than I'd expected. Getting a usable shutter-speed was a problem I never did manage to solve. The trouble was that my Canon Digital Rebel XTi wouldn't allow the selection of a shutter speed faster than 1/200th of a second when the flash was used, even in full-manual mode. And 1/200th of a second is too long an exposure to freeze a bat in flight. In fact, it's so long that not only were the bats motion-blurred, but they were also consistently overexposed, even when shooting at f6.3. The camera's manual confirmed that 1/200th of a second was the shutter speed limit when using flash, but didn't explain why the limit was imposed. I hope it's not a case of Canon artificially limiting the features of their lower-end digital SLRs in order to make their more expensive models look better by comparison. (They've done this in the past, notably with the original Digital Rebel.)

Bearing in mind all of those problems, a few not-completely-awful photos were obtained, all of Mexican free-tailed bats, as you can see below.

I'll have to try building my own motion-activated shutter-release before I attempt this sort of bat photography again, and, more importantly, I'll have to investigate whether an external flash (or something) will enable much higher shutter speeds. If I can put such problems behind me, I think some impressive photos should be possible. (And if it'll work with bats, it'll work with all manner of critters, including my friends the owls....)

Anyway, after a few hours of being a nuisance to flying mammals, I had to pack it in and try to get enough sleep so that I could be useful by the time the satellite Internet installer arrived sometime that afternoon.

David Bamberger, even on the brink of eighty, is a morning person, if ever there was one. What's more, he's an energetic morning person. But I like him anyway. At least, I do until he starts moving his sheet metal collection back and forth across the car-port/office to which the guest quarters are attached. His wife, Margaret, maintains that he has no such collection, but, although I've never seen it, I know better, because I've heard it many times in what would otherwise have been my sleep. As something of a night-owl by nature, I'm accustomed to a certain amount of such conflict with the rest of the world, and, of course, I hate to be an ungrateful guest, but David Bamberger's phantom morning sheet metal collection deserves mention, I believe, if only so it can be added to the next compilation of David Bamberger lore. It exists. Somewhere. I swear.

So, being awake in time for the arrival of the satellite installer turned-out to be no problem at all, though subsequently maintaing a convincing impression of alertness, or even consciousness, was trickier than I ordinarily like. Nonetheless, the satellite Internet installation went smoothly enough, and the Bambergers were subsequently able, for instance, to use Google Earth for the first time. It's not like they don't know the lay of their land intimately, but they need maps, same as anybody, to keep track of where things are, to aid in planning, and to look at the land from perspectives unavailable to a person standing on it. And for a lot of those purposes, especially the latter, the interactive viewpoint provided by Google Earth makes even the nicest aerial photographs and topographic maps look kinda sad. So that was two big thumbs-up for modern technology, until, that is, we let their iMac start downloading the Apple software updates that had accumulated in the six weeks since I'd last brought them a disc of updates. About halfway through downloading the updates, we hit a bandwidth utilization limit imposed by HughesNet, and Internet access stopped dead, as far as we could tell. I understand the need to regulate bandwidth utilization, but Hughes' essentially all-or-nothing approach is throttling only in the sense of strangulation. So, it seems that the Bambergers have traded a metaphorical 15 watt bulb that can be used all the time, if they don't mind it flickering on and off at random, for a 60 watt bulb that shines steadily until it decides to turn itself off until some time the following day. If this was rural electrification, the history books would have written it off as a failure.

The abrupt uselessness of the satellite Internet connection notwithstanding, there remained the small matter of getting bits flowing from the office, where the dish and satellite modem were installed for the benefit of a shiny, new iMac, to the neighboring house where Margaret's iBook G4 was anxiously awaiting them. Using the iMac's wireless Internet sharing feature was the obvious solution, but the office sits lower-down on its hill than does the house, so the radio signals would have to penetrate a fair amount of rock and earth to reach the house, and past tests proved that that they had little inclination to do so. To work around this problem without buying a small flock of wireless routers, or trying to snake an Ethernet cable through the underground AC wiring conduits that connect the two structures, I'd purchased a pair of NetGear HDX101 powerline Ethernet adaptors in the hope of sending the Ethernet signals through that AC wiring.

Gentle readers, do not try this at home.

The HDX101 boxes were miserable failures. It's not that they didn't work at all, it's that they could only get a signal to a few of the electrical outlets in the house nearest to the point where the wiring from the office came in. And all of those outlets were on the opposite end of the house from the waiting iBook. And bandwidth tests (60-second runs of iperf 1.7, using TCP) conducted from the outlets where the box did work showed that no two outlets would provide the same amount of bandwidth, though they all had in common that they provided only a tiny fraction of the 200 Mbps claimed by NetGear. Specifically, they varied between 0.7 Mbps and 8.1 Mbps. I knew the 200 Mbps claim was marketing fiction when I bought the HDX101 boxes, but I'd hoped to get at least a quarter of the rated speed. Instead, the best case was a mere 4%. Of course, the boxes impose some quality-of-service (QoS) limits on the traffic they carry, and configuring the QoS settings might have made a little difference, but the easy, browser-based configuration that was promised, turned-out to be available only on Windows machines. Oh, thank you, NetGear.

So, I'll be returning those pricey little gadgets. That's a hassle I could definitely live without, but at least I knew enough to be able to nail-down specific performance numbers on which to base the keep-'em/take-'em-back decision. I worry that other consumers would not know how to do so, and would assume that the devices were working properly just because their nifty little blue LEDs lit-up, and some data struggled its way between them. The fact that the data rate would seem a bit low in some (or many) situations, might not tip-off the unsuspecting consumer to just how poorly the devices were delivering on their expensive promises. If the unlucky consumer is getting only 4% of the alleged 200 Mbps performance of a $170 pair of these devices, they're getting the equivalent of just $7 of the performance for which they paid. If the devices sensed their own performance shortcomings and, say, automatically issued a $163 refund in such a case, these devices could be worth the trouble. But NetGear would probably find a way to implement their refund mechanism such that it only worked in Windows, too.

Next time, I'll try a small flock of wireless routers. They'll be hard-pressed to perform worse, or to be more idiosyncratic (and that's saying something), and they should be less expensive, too. Heck, their browser-based configuration might even manage to be non-platform specific. Such miracles.