A kindred spirit at Google, Joshua Bloch, delivers a Google Tech Talk: How to Design a Good API and Why it Matters. If any part of my Programmers Hate Programmers anti-hypothesis resonated with you, you'll appreciate his presentation with its much greater detail.
Monday, June 25, 2007
Tuesday, June 12, 2007
The Lost Tank of Brownsville
I visited the Bamberger Ranch again on Saturday. Generous folks that they are, the Bambergers allowed me the use of the guest quarters once again, so I could drive down in the middle of the night when the roads are free of traffic, get some sleep, then go out and take photos whenever I regain consciousness. If I happen to be present around lunch time, they usually throw in a sandwich and related hospitality. It's a helluva deal.
With the summer heat settling itself in nicely, I did notice one odd thing about this arrangement, however: the guest quarters aren't air conditioned. OK, I already knew that, and I've been through Austin summers without air conditioning in years past (long past, thankfully), so the idea of life without chilled air isn't utterly absurd to me. What made the absence of air conditioning stand-out this time was the fact that I kept hearing the air conditioner in their office kicking-in just outside the open window I was trying to sleep under. Like it was taunting me. It's not hard to understand that an office would need air conditioning. What had me stumped as I lay there in the too-still night air was why one would spend the money to air-condition 80% of a building, but not the other 20% of it. The guest quarters, you see, are part of the same building as the office. Maybe the architecture of the structure contains the explanation, or maybe it's a test. Knowing David Bamberger, it could be a test. If so, I passed this time, but summer is just getting started. If they keep extending their hospitality to me, I may have to donate a fan to the ranch. It'd be a bargain at twice the price, of course.
I was lucky enough to get a free lunch with my visit (and they say there's no such thing), along with pleasant conversation with David, Margaret, her daughter Margie, and various friends. Afterward, Margaret and co. went off for a swim, which I foolishly declined in the name of photographic necessity. I talked with David a bit about some of the areas of the ranch that I'd already visited, and asked him about other noteworthy places. He picked-out two on a map of the ranch; one was an earthen-dammed tank in the "Brownsville" region of the ranch, the other an overlook in the "airstrip" section (so-named because a small aircraft once landed there to the detriment of all concerned). I headed out for the tank, figuring I'd have plenty of time for airstrip afterward.
As far as I know, that tank in the Brownsville section, like several other tanks on the ranch, has no name. I hereby rectify that situation by dubbing it the "lost tank of Brownsville." I take David at his word that he built it out there, somewhere, but I spent hours carefully going back and forth on hot, dusty gravel roads—roads that I'd been warned had eaten trucks which, from the sound of 'em, could have comfortably carried mine in their glove compartments—and carefully picking my way on foot through fields of rocks to descend, with still greater care, into the valleys below to look for that tank, and I never did find it. It's not even a big area of the ranch, but it's very slow going on foot, and bears only an eccentric similarity to the maps, at least if you don't already know where you're going. On the plus side, I did stumble upon a few spots of photographic interest in the valleys I explored, and shot a few panoramas, clouds permitting. I also found where they keep all of their chiggers and was able to give them a good feeding. (Note to the afflicted: doctors can prescribe anti-itch lotions far superior to the over-the-counter rubbish. Believe me.)
By the time I'd given up my search for the lost tank, there was no hope of getting to Airstrip, at the far other end of the ranch, before sunset, so that was that. That'll give me something to do on a future visit; not that I felt I was in any danger of running out of material out there.
Anyway, I'm months behind in assembling panoramas, so I don't have any panos, new or old, to show, but this trip did produce some readily displayed conventional photographs, which I hereby include below for your amusement and possible edification. (And if anyone can identify that dragonfly or the unidentified plants, I hope they'll edify me.)
Monarda citriadora (Purple Horsemint) near Madrone Lake.
Danaus gilippus (Queen) butterfly on Eupatorium greggii (Greg's Blue Mistflower) near Madrone Lake.
Odocoileus virginianus (White-tailed deer) among grass and wildflowers. The wildflowers are primarily Zexmenia hispida (Zexmenia).
Unknown dragonfly on unknown plant at the edge of the thistle field near the windmill.
Papilio glaucus (Tiger swallowtail) feeding from the flower of an unknown variety of thistle in the thistle field near the windmill.
An icon of rural America, an Aermotor 702 windmill, the only windmill left on the ranch, stands just to one side of the highest point on the ranch. Remarkably, the 702 was in continuous production from 1933 until at least 1981. (It may still be in production; the company's history page is not entirely clear on that point.) I've been saying that I needed to shoot a panorama with one of these in it for so long that a friend had suggested that I carry an inflatable model of one, so that I could add rural color to any scene.
My first entry in the Jay Lake Artifacta Americana photo contest.
Rana berlanderi (Rio Grande leopard frog), probably female, at the windmill pool.
Rana berlanderi (Rio Grande leopard frog), probably male, at the windmill pool.
For reasons best known to themselves, these frogs not only come out at the height of the afternoon heat, but regard a photographer standing twelve feet away as a threat from which they have to retreat, while accepting as harmless that same photographer crawling on his elbows and belly at a mere five feet. I suspect that this species likes to humiliate its prey before moving in for the kill. I was probably lucky to escape with my life.
Friday, June 1, 2007
Qwicap 1.4b9 Released
Qwicap version 1.4b9 was released on May 31. It includes the minor enhancements of the unannounced beta 7 and 8 releases (logging in Qwicap.reportException, and more informative exception messages from the MutableMarkup class, respectively). The work on beta 9 is of a whole 'nother order, hence this announcement.
Last Friday, after lunch, I was looking forward to a quiet afternoon, and was reading my usual collection of computing-related web sites when I arrived at Elliot Rusty Harold's blog, Cafe au Lait. As usual there was a lot of material there, and, also as usual, I wasn't even going to try to deal with it all; I was just there for the quote of the day, which turned out to be about character set support in various web application development systems. And it included a harmless looking little link attached to the word "Unicode" (just like that one, in fact). I clicked the innocent word and that was the end of my peaceful Friday afternoon. The link was to Joel Spolsky's 2003 article The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!). If you haven't read it, consider it recommended. If you're in a hurry, just read the bit at the end about the problems faced by web browsers when they need to interpret the bytes of a web page. That gives you the flavor of many of the problems posed by character set handling. And they're fairly obvious problems, if you happen to think about them. Unfortunately, I hadn't.
I wasn't exactly unaware of character set issues (I sorted out EBCDIC to ASCII translation issues back in the days of the IBM 3033 and the original IBM PC - issues that had IBM's support engineers embarassed and stumped), and I've been a big fan of Unicode, but while reading that I article I quickly realized that I'd failed to grasp just how significant character set issues are, or can be, to everyday software development. Specifically, in the case of Qwicap, I realized that I'd ignored character set issues when I wrote Qwicap's XML engine. I knew that, having emerged from Reader objects, the characters in memory were Unicode (sort of) and I'd just left my concern at that, without thinking about the encoding of the source materials that went into those Reader objects. I'd also neglected an issue associated with transmitting web pages to clients: They were always sent as UTF-8, regardless of what the document markup called-for. (In a way, that's OK because a character set specification in the HTTP "Content-Type" header, which Qwicap was in the habit of supplying, takes precedence over any specification in the markup, but it's both rude and confusing to ignore the document author's wishes as expressed by their markup.)
So, seeing all of those basic oversights at once was quite a kick in the teeth (self-inflicted, no less). And, of course, one of the great things about open source development is that you have the opportunity to make big, embarassing mistakes in public. On the bright side, if I knew how difficult it was going to be to develop Qwicap when I started, I might have come to my senses and found something less painful to occupy my time, like hitting myself in the head with blunt objects. So, since I still think Qwicap is a good idea, and I yet cling to the hope that it'll find a niche for itself beyond the bounds of my worthy employer, The University of Texas at Austin, (and for all I know, perhaps it already has) maybe it's just as well that I didn't fully appreciate what I was getting myself into when I first had this idea.
Anyway, with the release of version 1.4b9, Qwicap is now character-set aware, and I can take some comfort from the facts that (1) nobody but me ever noticed this problem in Qwicap, and (2) there are vastly more popular web application development schemes that still neglect character set issues. In the latter case, though they were absurdly late in coming, the fixes in 1.4b9 do become one more feather in Qwicap's hat. Of course, I still feel plenty stupid.
Wednesday, April 25, 2007
Qwicap 1.4b6 Released
Version 1.4b6 of Qwicap is a trivial release, correcting a serious bug in a method, in the non-public API, which Qwicap doesn't even use. (Qwicap does use other methods in the same utility class, however, which is the only reason that this issue is relevant.) I've also tweaked the markup of the pages in the example applications such that Eclipse won't choke when trying to load them anymore. So, this release is a big yawn, but that's good news late in the beta process.
"For the Love of Light"
Jim Austin's article on high-dynamic range (HDR) photography, "HDR For the Love of Light", features my work "Hamilton Pool Panorama no. 2". Thanks for the kind words, Jim, and the excellent article. Anyone who wants an introduction to high dynamic range photography, or impressive examples of its use, will find that article worth a look.
Ironically, I recently discovered a problem in my panoramic workflow that has been muting the colors in my work for some time. Most of my panoramas, including that one, need to be recomputed to bring out the true quality of their color. I'm in the process of doing that in between work on my ongoing Spring panorama project at the Bamberger Ranch Preserve. Unfortunately, recomputing the panoramas, and then processing them as HDR, is very time consuming, so I don't expect to have everything fixed any time soon.
To elaborate on the problem, Apple's Aperture application, which I use for managing my photos (when it works, it's great; when it doesn't, it reminds me of Photoshop), has a preset export option labelled something like "Original Size, 16-bit TIFF". Because that was the only preset export option that suggests that it preserves all of the information in RAW originals, and because Aperture is designed for professional photographers, I naively assumed that it would also preserve the color space of the images. Not so. In fact, it converts the image to the sRGB color space, a big step down from the AdobeRGB color space of my originals. This isn't a bug, but I do think the name of that preset export option should be changed to something that makes its behavior explicit, like "Original Size, 16-bit TIFF, sRGB".
Once I noticed that problem and fixed it, I was bit by another. I needed a utility that would let me assign a color space to the non-color-managed 16-bit TIFF images produced by the software I use for assembling panoramas (PTMac). I tried doing it with Photoshop CS, but it launches so slowly that it created a strong incentive to find a lighter-weight tool for this job. (Aperture, frustratingly, provides no mechanism for assigning a color space to an image.) After a bit of Googling, I found an article in Apple's "Pro" area titled "Image Editing in ColorSync" which told me that Apple's "ColorSync Utility" was precisely what I was looking for. I started using it, and, for a while, I thought it was a great tool. Then I realized that when it saved my 16-bit TIFFs with their newly assigned color spaces, it was saving them as 8-bit TIFFs. Put simply, this "Pro" tool was automatically throwing away half of the data in my images without a single word of warning. I'm still dumbstruck by this behavior. And there's no way around it; while its "Save As" dialog offers an enticing pop-up menu that allows the image bit-depth to be specified, the only option it offers is 8-bit.
So, I'm back to Photoshop for my color-space assignment needs. (Sigh.) If anyone can suggest an alternative color-space assignment tool for Mac OS X, please do.
Thursday, April 19, 2007
Qwicap 1.4b5 Released
Qwicap version 1.4b5 eliminates a case in QwicapServlet in which HttpServletResponse.sendError could throw an IllegalArgumentException, because an Auth2Scheme implementation had refused access to the web application, and had already caused the response to be committed (for instance, by redirecting the user to an authentication page). QwicapServlet now invokes sendError only when the response has not been committed. And that's as exciting as this release gets, which is good news, because it means the beta cycle is winding-down toward a true release.
For those unfamiliar with Qwicap, allow me to throw in the standard blurb:
Qwicap is a Java web application development API that discards the traditional hit-run-exit CGI model, automatically provides rich state, and supplies a powerful, extremely easy-to-use XML "templating" engine to avoid mixing code and content. It builds on Servlet, XHTML and CSS technologies.
Tuesday, April 17, 2007
Bamberger Ranch, Unnamed Tank
My visits to the Bamberger Ranch continued this last Saturday. Conditions for photography were not favorable, with cloudy skies and high winds, but. if you don't show-up, you can't get lucky. I drove down before dawn, caught a few badly needed winks, and met up with David and Margaret in time for lunch. Margaret told me she'd found me another waterfall, and off we went in David's old pickup with Corey, the Bamberger's dog, enthusiastically riding along. (It's not that I'm obsessed with waterfalls, it's just that some of them are seasonal, and, this being the season, I want to catch them while I can.) After checking in with the visiting turkey hunters, we headed up a dirt road into High Lonesome. Soon after, we arrived at the tank shown above and began walking up the creek that feeds it—the dog leading the way from somewhere invisibly far ahead—to a very nice little waterfall and pool.
As Margaret and I chatted, I setup my pano rig at the edge of the pool, and began waiting for moments when the air was still and the sun was shining between the clouds. There weren't a lot of those, and, unaccustomed to the waiting and the boredom that are such a large part of multi-frame panoramic photography, Margaret and Corey went off to explore further upstream. Somewhere in there, I realized that, unaccustomed to the pleasant distractions of company on my photographic jaunts, I'd setup my pano rig incorrectly, thus rendering useless all of the would-be panoramas I'd shot so far. I reset the rig, and eventually managed to get enough plausible takes that I couldn't see spending any more time on that location. I strolled back to the tank, setup on the shore, and began waiting for the wind to die and the sun to shine. That spread of earth, water and sky had to have a good pano in it. And, eventually, it provided the one seen above. Happily, that was also the moment that Corey, the dog, caught up with me, and just happened to stand dead still while the three exposures of his segment of the pano clicked away. He is, therefore, immortalized in a very small way near the right-hand edge of the panorama. Good dog.
Margaret arrived shortly afterward, and we returned to the truck with no clear destination. Remarkably, she hadn't had her fill of panoramic boredom, so I asked her to take me to the overlook of Jacob's Ladder tank on which she'd drawn David for Water from Stone (page 46). I thought it would be interesting to capture the view from David's perspective. Quite apart from providing charming company, and commentary on the ranch and its flora and fauna, Margaret was indispensable as a guide. Without her, I'd've wasted a lot of time stumbling around on boulders looking for that vantage point, and I might never have been sure I'd found it. With her, it was a breeze. I setup my rig as far out on the edge of David's boulder as the tripod could go, and at a seated person's eye level. "Is that safe?" she asked. "Not completely, but it'll be worth it if this works."
Thus began the waiting for the wind and sun to cooperate at the same time. Corey scrambled deftly over the boulders, exploring countless scent trails with perfect dog dedication, while I waited and Margaret waited on me. I started the pano many times, but never captured more than half the segments before the wind would return. I had the suspense of waiting for the next lull to arrive, listening carefully for the sound of its approach on the surrounding hills. Margaret had to settle for watching me wait, and an occasional conversation. ("We could cut down that willow tree that's blocking the view." Nobody had ever offered to cut down a tree for me before. I politely declined—it seemed like too much generosity to accept—although I couldn't help but think from then on that it really would be a lot easier without that damn tree.) Good natured soul that she is, she held-out a lot longer than I would have managed to do before she headed back up the boulders to go for a walk with the dog.
I crouched on the boulder, next to the camera, waiting with the shutter release remote in my hand, feeling the breeze die down, watching the willow's limbs sway less and less, until they stopped, and the whole scene was still, and as I depressed the shutter release to capture the pano's first segment, heard the breeze rising up through the trees, rotated the camera for the next segment, and watched the willow's long, graceful branches begin to sway, and then all of the other trees following suit. Not that it was their fault; that damn willow had to be the ringleader.
And so I would begin the wait for the next lull with good light, telling myself that if it didn't come along in the next sixty seconds, I was going to break-down the rig, and go find Margaret. Well, make that, ninety seconds. Wait ... yes ... I can hear the next lull on the way .... No, not good enough. But if I go another sixty seconds without a lull, I'm definitely done. Make that ninety....
That went on for a while, but eventually I did give-up. If I'm very lucky, I captured half of a usable panorama at some point, but I doubt it. Up the boulders and down the hill to the dam, I found Margaret and Corey. The dog still seemed to be having a fine time, but I expect Margaret was relieved that I'd finally quit. She drove us back to the ranch house where we found David, and I learned to my surprise that I was joining them at a neighbor's party that night. The yearly "swamp angel" party, no less. That wouldn't have meant a thing to me a week earlier, but having spent the week reading Water from Stone, I felt as though I was following in Jeffrey Greene's footsteps - the new year's new stunned guest. "Swamp angel" isn't in the index, but it's in the book, and I'll leave it to Jeffrey to tell that story.
We headed over to the party with David at the wheel of his old pickup, the three of us sharing the big bench seat. I was offered the middle position, but suggested that Margaret would be the better choice, as she had years of experience snuggling up against David, whereas I'd need training. So Margaret took the middle, and I took the end. With it, I acquired the responsibility of opening the various ranch gates we'd come to, waiting for the truck to pass through, then securing the gates behind us. There's not a lot to that job, but having left the passenger side door open at the first gate we came to, I was duly chided by David for my lack of gate etiquette. I struggled to redeem myself the rest of the way to the party, and back again later. Enjoying the situation plenty, David told me that he'd had the Lord Mayor of London (retired) along on this same trip some years ago, and that he'd made the same mistake.
It was on the return journey that I, at last, managed to clear my name by successfully passing not one, but two, trucks through the gates on the way back to the main road. David finally allowed that, like my predecessor, the Lord Mayor, I'd learned my gate etiquette, and passed the exam. Let no one doubt that the mission of the Bamberger Ranch Preserve is education, or that it works.
