Thursday, January 28, 2010

Bamberger Story on NPR, Probably this Friday

I'm happy to see my friends at the Preserve getting some more well deserved publicity, and to pass along advance word of it. This time, the publicity is from National Public Radio. Thank you, NPR.

Tuesday, January 26, 2010

Refracted Moonlight

Moonlight refracted in a passing cloud at about half-past midnight. The moon is too overexposed to be distinguished, and the cloud is blurred by its own motion during the moderately long exposure required to capture its subtle colors, but the rainbow of colors in the cloud is clearly visible. (A little saturation enhancement helped, too.)

I can’t recall having seen this phenomenon before. Maybe I just haven’t paid much attention to such things heretofore, or maybe there’s something a little unusual about the cloud. It’s cold here tonight, so perhaps the cloud is composed of ice crystals, each functioning as a tiny prism. Pure speculation on my part—this isn’t one of my fields—but, whatever the cause, it seemed to be worth trying to get a photo before the cloud passed.

Sunday, January 17, 2010

Maze Wars SVG version 1.0b3 Released

Maze Wars SVG, version 1.0b3, has been released. This version began as a minor revision to eliminate an asymmetry between the rules applied to the bots and to the human players. Specifically, for lack of a check to prevent it, bots were able to move and turn at the same time, which human players could not do. Making the bots separate their move and turn operations seemed like it would be a simple change. Instead, it turned out to be a little snowball that started rolling downhill, getting bigger and bigger, until it wiped-out an entire alpine village.

The essence of the problem was that the bots had to go from simply moving directly to the next location they chose in their traversal of the maze, to deciding on the location to which they wanted to move, determining whether they would have to turn to face in a new direction in order to move to that location, turning (if necessary), then moving to the desired location. So, they went from having to decide merely what they would do next, to having to plan up to two steps in advance (or more steps, if they decided they needed to shoot at someone at any time during that process). That one-to-many change forced a complete rewrite of the bots.

Other changes were also made, like a general clean-up of the game engine, and some of those changes introduced interesting bugs that in some cases took a long time to notice, or to fix, or both. But now it's done. The code's cleaner, the bots play fair, and, basically, you won't notice much difference.

Version 1.0b3 Change History

  • The bots have been completely rewritten, and are now bound by exactly the same limits on motion (and everything else) as the human players.
  • The bots traverse the maze a little more efficiently than before, because they don't waste time traversing dead-end corridors. Instead, they just look down such corridors, shoot at anyone they see there, and move on.
  • A general-purpose bot engine has been created that, hopefully, will make it easy to implement bots employing new strategies in the future.
  • Various minor syntax errors in the Javascript (unterminated statements) have been corrected. The bugs had no operational impact.
  • A workaround for the Firefox bug that prevented each player from having a unique iris color has been implemented (and the bug has been reported to the Firefox developers).
  • Lots of redundant synchronization has been eliminated from the code.
  • Logging levels for many logging statements have been adjusted downward, because the information they provide has declined in importance.
  • Added to the game engine periodic checks for some bugs that were a problem during the development of version 1.0b3 (and just might have been present in earlier betas); those bugs have been corrected, but these checks will ensure that they aren't re-introduced in the future.
  • The order in which the final scores are displayed has been changed. Now, when players' scores (kills) are the same, those who died the least will be ranked above those who died more often. (Previously the relative order of players with the same score was undefined.)
  • Altered the SVG in "client.svg" such that the player marker arrow in the maze map swells to a slightly larger size. (Of course, this only applies to browsers that support SVG animation, which currently only seem to be the WebKit-based browsers, at least in this case.)
  • The "bullet list" is now cleared when a game ends, which should eliminate any possibility of additional points being earned in the moments immediately after a game ends, due to bullets already in-flight striking other players.
  • Players are not placed in the maze until they have actually entered the game; previously they were placed in the maze as soon as they registered their name.
  • Minor improvements have been made to the communications between clients and the server.
  • Various improvements and optimizations have been made to the server.
  • Bullet hit testing is now handled in a manner such that, if a player is struck by bullets from multiple players at the same time, all of those players receive a point.
  • The game engine's code has been cleaned-up and made more object-oriented.

Saturday, January 16, 2010

Nest Boxes are “Go” – Squirrel is MIA

The conversion of my old bird roosting box to a squirrel box is finally completely complete. It’s one thing to finish the box itself; it’s quite another to iron-out all of the miscellaneous, but critical details, like how to mount the thing at a particular place in a specific tree, especially when the tree doesn’t have even one purely vertical limb. Also important, and thoroughly interrelated: providing access from the tree to the box’s entry hole. So, this week has seen me spend hours in the middle of a near freezing night standing on top of a ladder in a tree pondering how the heck to make the box hang vertically, and how to give the squirrel(s) a way in and out; going back forth from my workshop to the top of the ladder with yet another adjustment to a piece of scrap wood to try to pin down the mounting angle and geometry of the spacing plank that would have to be attached to the bottom of the box; cutting the final parts; getting at least two coats of exterior grade latex paint on every side of all the parts; touching-up the paint on the box itself; and so on.

The results can be seen below.

The height of the roosting box allowed it to contain many perches, which would be irrelevant to the squirrels, so the perches were removed, but it seemed a shame not to put all of that interior space to good use, so interior floors were added to divide the space into three stories. Holes in alternating sides of the rear corners of the floors allow movement between the stories. Similarly, access to the box is through a hole in the back-right corner of the box’s floor. I’m confident that climbing up into the box won’t bother the squirrels, but that it will deter the owls (if they’re going to nest somewhere it had better be in the camera-equipped box) and, hopefully, birds in general. It should also make it nearly impossible for raccoons or possums to reach into the box and grab a meal for themselves, especially when the would-be meal is occupying (or can quickly move to) one of the top two stories.

All of the holes in the front and sides of the box are actually windows. The two holes near the bottom of the front wall are leftovers from the box’s original design as a bird roosting box. Rather than plugging or ignoring them, I decided to turn them into windows, so a piece of acrylic is screwed to the inside, covering the holes. Small circles of painter’s tape have been applied to the center of the windows, in order to (I hope) tip-off approaching birds that those holes aren’t really holes. The three holes in the upper portion of the box are new. I added them to give the squirrels a good view (which experience has shown they like), and to let light into the upper chamber (and, by diffusion, into the middle chamber, too). Those are also covered with acrylic, and equipped with dots of painter’s tape.

In warm weather, the upper story may become unpleasantly hot. However, heating the air up there (which will flow up and out through a vent slot between the top of the front wall and the underside of the roof), should pull air up through the lower stories of the box, thereby moderating their temperatures.

If all of this seems like a bit much for one fox squirrel, it’s worth noting that I’ve known fox squirrel nests, in areas with rich supplies of food, to contain as many as five adults – presumably a matriarch, and a year (or more) of her fully grown children. The benefit of such an arrangement in cold weather is obvious. In warm or hot weather, they may disperse. I’ve never seen evidence of a female with pups sharing her nest, however. (Which is not to say that it doesn’t happen; my observations aren’t extensive.)

Anyway, it’s been a lot of work just to ease my guilt about evicting the fox squirrel from the owl box, but if a thing’s to be done, it ought to be done right.

And, having done all of that, this afternoon I set about the eviction/relocation. The first step was going to the local hardware store and buying a pair of welder’s gauntlets, since there was a very real possibility of having to directly handle the squirrel in the process of the transfer, and welder’s gauntlets are the toughest, widely available gloves that I know of. (If you’re trying this yourself, please be aware that I’m not claiming that welder’s gauntlets are sufficient to protect you against the claws and teeth of a distressed squirrel, I’m merely saying that I wasn’t willing to go up against those formidable weapons with lesser gloves.) The next step was bringing the owl box down, and positioning the opened squirrel box next to it. Then I opened the owl box, with the fox squirrel playing dead, as usual. I threw a towel over the top of the squirrel and the thick assembly of nesting material in which it was embedded, slid a sheet ¼" plywood under the nest materials, and then, with a hand held firmly over the towel, withdrew the entire nest, squirrel and all, deposited it in middle chamber of the squirrel box, and quickly closed the box. Success!

Unfortunately, I couldn’t get all of the nest materials at once (the interior of the owl box is wider than its front opening), so I went back to check the remaining materials to make sure there weren’t any tiny pups stranded in it. What I found in those materials, however, was the fox squirrel I thought I’d just successfully transferred. Apparently, it snuck off to the side while I thought I was lifting it out with the (majority) of its nest. So, I tried again, this time with the squirrel definitely somewhere in my grasp, but squirming madly to escape … which it did in short order, vanishing toward the next nearest tree like a fur-bearing bullet.

So much for all of my efforts to reclaim the owl box without having to feel guilty about picking on a harmless (and thoroughly sensible) squirrel.


I hung the squirrel box in the tree, anyway, with its middle chamber still half full of the squirrel’s nest materials, and put a few peanuts in the bottom chamber, near the entry hole. Once the terror has subsided, perhaps those smells will convince the evicted squirrel that the new box is worth checking-out.

That just left me with the (now empty) screech owl box to clean-out. Even with the squirrel’s clean-up efforts, there was still a lot of mess leftover from the bee colony that took over the box in the spring. I didn’t think bees could attach their combs to glass (the interior ceiling of the owl box is a plate of glass so the camera in its attic can look down into the nest), which is why I assumed I wouldn’t have bee problems with this screech owl box. I was wrong on both counts.

Removing the last traces of comb from that plate of glass turned-out to be surprisingly difficult. Windex and paper towels were useless. A putty knife, an extra abrasive dish scrubbing pad, soap, and a lot of hot water turned-out to be required. Even after all that, and a final effort with the Windex, I still hadn’t managed to remove all traces of the comb. However, I had managed to improve matters dramatically, and to make the center portion of the glass—the area through which the camera looks, and its infrared LEDs illuminate—quite clean, and that’s good enough. Then there was a lot of scraping of the interior walls and floor, and cleaning the glass of the thermometer’s face, and the side camera compartment’s window, both of which cleaned-up with far less effort than had the glass ceiling. Finally, a fresh layer of pine shavings was deposited on the floor, and the box was closed-up, and returned to its perch in the tree. In the absence of owls, I may do some cleaning inside the side camera compartment in the future, but things are vastly improved, and, if the owls moved in tomorrow, I wouldn’t loose any sleep over skipping the additional cleaning.

So, while I still haven’t sorted-out any of the owl box’s computer interfaces, at least the box itself is ready to receive any local screech owls looking for a nest site.

Fingers crossed.

Sunday, January 10, 2010

Owl Box Work, Sorta

As usual, I'm doing this later than I should have, but fans of Chris' Eastern Screech Owl Nest Box Cam' will be interested to know that—better late than never—I am in the process of preparing the box for owl occupation. At the moment, the major work is on fox squirrel eviction. As always, I hate kicking out the little mammals, especially when the weather has been so bad, and pups may be on the way (or arrived?), but fox squirrels have no shortage of nesting opportunities, since they can make their own nests, while screech owls depend on finding existing nesting cavities, so the owls need help and the squirrels don't. Except that the trees have now lost their leaves, so good nest building material is currently unavailable to the squirrels. Which brings me back to feeling rotten about evicting whatever sensible squirrel inevitably claims the owl box around this time of year. (Sigh.)

So, my squirrel eviction has, as of this weekend, been focused on converting a bird roosting box that I built 13(?) years ago, and that has been gathering dust in my garage for about as long, into a fancy fox squirrel nest box. I gave up on the roosting box, because, even in the coldest local weather, I never saw any indication that birds used it, and, worse, starlings would nest in it in the spring. Unfortunately, back then I was doing very simple nail & glue woodworking, not the proper woodworking of box- and dovetail-joints that I used on the modular, camera-ridden owl nest box that has served me so well for the past eleven years. So, the old roosting box needed reinforcing; refinishing (with multiple coats of exterior latex paint, instead of the so-called "waterproofing" agent I used way back when); a totally different internal arrangement; a new, relocated entryway; and so on. It also needed a mount in the relevant tree, and, because there isn't a straight limb anywhere in that tree, some means to keep the box vertical, and to provide a path from the tree to the box's entrance. Almost all of that is done now.

Also, I've brought down the owl nest box, and removed a fallen limb that had fouled the system of pulleys and cables that allow me to hoist the box in and out of the tree.

There are still plenty of problems, however. For one thing, my local owls may not be looking for a new nest site, or may have already selected another one. For another, I still haven't written the software, or added the necessary hardware, to integrate a new analog-to-digital converter to my computer and the box's infrared entryway sensor, so I'll have no way of knowing if the owls are checking-out the nest box. Also, Apple has dropped QuickTime for Java from their current system software (yes, it was always a rotten API seemingly built of bailing wire & spit, but, since they've provided no replacement, they've made this developer very unhappy). As a result, my custom frame-grabbing, noise reducing, image enhancing, image uploading and web page building code can't run on modern Macs. I'll have to bring an old Mac out of retirement, which is just that much more extra work I could do without. And, ultimately, it'll be a support burden. (Grumble.)

There's also the matter of transplanting the squirrel. It almost certainly won't cooperate with such an effort, and, yet, if all I succeed in doing is scaring it away, my recent work to create a squirrel nest box as a salve for my conscience will have been in vain. It's an imperfect plan—knew that when I started—but it's the only plan I've got.

And the cleanup job on the interior of the owl nest box is likely to be a much bigger issue than usual, due to the fact that a swarm of honeybees (or the highly misrepresented Africanized "killer" bees – who can tell which is which?), took up residence in the box this spring. By the summer they'd either moved out, or died off. In any case, the cleanup effort was begun promptly when the local squirrels raided the box for every bit of honey-laden comb they could carry off. Thank you, squirrels – good eating for you, and one less messy job for me.

Oh, and to top it all off, the punishing drought we endured this year may have killed the owl box tree, in spite of the fact that it's old, very well established, and has been through droughts before. Right now, all I know is that it dropped all of its leaves mid-summer. Maybe it went dormant at that point, and will make a comeback this spring. Or maybe it died. Not being an arborist, I know of no way to tell at this point. I'll just have to wait and see. If it died, that may not present a structural problem for years, but the owlets, after leaving the nest, tend to depend on the foliage of the nest tree for their initial shelter. If the tree is dead, there won't be any such shelter.

Problems. Always problems. (Sigh.)

Saturday, January 2, 2010

Gatekeeper Released 21 Years Ago Today

Twenty one years ago today, on January 2nd, 1989, I released version 1.0 of the freeware Gatekeeper anti-virus system for Macintosh. It would have been better to note its twentieth anniversary a year ago, what with twenty being a big round number and all, but, frankly, I forgot.

Anyway, it was 21 years ago today. For reasons now obscure, it wouldn't appear in "comp.binaries.mac" until the 13th. Those reasons may have included the need to be harangued by the legendary Werner Uhrig, who wanted to know why I'd released a Macintosh anti-virus product without first running it past the secret society of Macintosh anti-virus researchers. I actually had to explain that it's impossible to communicate with a secret group, when nobody has let you in on the secret that the group exists. Based on that technicality, I think he let me off with a stern warning. And he had me promptly inducted.

Egads, what an experience Gatekeeper was. To this day, it remains the most punishing software development task I've undertaken. As a sign of things to come, before version 1.0 was even complete, it had already been scoffed at by Apple, probably costing me the chance of a job there – but the interviewer was equipped with a priori certainty that such an anti-virus system was impossible, and no amount of explanation or demonstration would convince him otherwise. After it was released, Gatekeeper seemed to earn me quiet, unshakable contempt from Apple. I never figured-out why. It was true that I believed that I'd had to write Gatekeeper to bring a measure of control to the computational public health mess that Apple had created by overlooking basically all security issues in the design of the original Mac OS (not an uncommon failing in those days, especially in the microcomputer world), but I don't remember making pronouncements to that effect. I admired (most of) Apple's work enormously then, and in spite of everything, I still do.

Apple notwithstanding, Gatekeeper went on to win me an award from the then-existent and prestigious Boston Computer Society; to be almost completely ignored by the Macintosh press (I naïvely believed then that the trade press went looking for stories relevant to its subject matter, but realized years too late that the apocalypse would be hard-pressed to get a column inch unless it sent out press releases first); to get me an all-expenses-paid trip to Scotland to deliver a paper about it (never having seen papers delivered before, I had no idea what was expected, and the less said about the result, the better); to bring me so many picture postcards from users all over the world that my local post office started to reflexively deliver postcards to me, no matter to whom they were actually addressed; to give me the opportunity to get drunk as hell on cheap gin & tonics one night with John Norstad (author of Disinfectant, and clever issuer of press-releases) at some vendor's World-Wide Developer's Conference party; to get itself written-up in an honest-to-goodness book on computer viruses that must be around here somewhere; and, over four+ years of work, to build within me such a fierce case of burn-out that when a company offered me the chance to take Gatekeeper commercial, I couldn't bring myself to do it, even though an industry insider told me that such a deal ought to be worth around a million dollars to me over a few years. I think it was ten years before I had the energy to single-handedly take on another software project of that complexity. So, if your letter or email went unanswered, now you have some idea why.

And, to my initial surprise, in something like the last four or five years Gatekeeper has risen from the dead to take on a new life as prior art in patent cases. I'd hoped to be able to announce years ago that it had triumphed in invalidating some odious software patent or other, but the case I was assured would take no more than a year dragged on for something like four, and then was resolved out of court, as I understand it. That was an interesting experience (for one thing, I had a very fine dinner with Henry Spencer, inventor of grep), but mostly it was a whole lot of no fun. And the blasted lawyers seem to have lost a major portion of the postcards I'd collected from Gatekeeper users. Now, an inquiry from a CS professor turned expert witness, suggests that it is once again involved in a patent case, and not for the last time, I expect.

When I first had the idea for Gatekeeper I thought it innovative in a "why the hell is nobody else doing this" sort of way, and the verdict of time seems to be quietly trending in my direction. So, I'd like to take this opportunity to say something to everyone at Apple who scoffed at, cold-shouldered, or otherwise entirely failed to provide an iota of support for a free product that was saving their Macintosh from itself. And that something would be this: Screw you.