Thursday, March 3, 2005

Blue Hancock


Hancock Building, Boston


One of the appealing things about the higher resolution cameras is that I can crop fairly extremely and still produce a nice image.

Wednesday, March 2, 2005

Federal Triangle Flowers

(Preface: I enjoy photography. I take a great deal of pictures, exclusively digital. Many of them are obviously family pictures and photos of my beautiful baby and other things that are of marginal interest to my blog reading public at large. But, sometimes I take some that seem worth sharing. I've thought about adding slightly more regular photos to this blog, but never got around to it. I just recently got a new digital camera, a Fuji FinePix E550, and that seems like a good excuse to start posting some. I've tried to tweak the style info so it looks right in aggregators and the like, but if it looks wonky or otherwise has issues, please let me know, either in the comments or via email. I've tried to make the linked image large enough to include nice detail, but small enough to download a reasonable time. I'm more likely to make future photos smaller, rather than larger.)


Federal Triangle Rose


I was in DC for a wireless conference for work at the Ronald Reagan Building and International Trade Center, when I came across this sculpture by Stephen Robin. Somehow the oddly awkward but literal name of the piece "Federal Triangle Flowers" adds to it. The sculpture also includes a lily, not shown.

Thursday, February 17, 2005

Heroscape Combat Simulator

I wrote and have made available a very straightforward Heroscape Combat Calculator which allows you to calculate the probable outcome of toe-to-toe battles between two hypothetical units.

Enjoy.

Wednesday, February 16, 2005

Greasemonkey for Google Maps

Google Maps is very nicely done. If you haven't tried it out, you should. But, there's a couple features it doesn't have that I wish it had. This is where Greasemonkey can really shine. The two ideas: Automatically follow a plotted route and add more address markers to an existing map. Today, someone posted an implementation of a userscript that adds the route following feature to Google Maps. Another Google Maps userscript, this one to generate a map with predefined set of points on it, was also posted.

So, all of this activity inspired me to implement my second idea (since Prakash pleasingly did the first one for me). I present yet another userscript: Google Maps: Add Waypoint. It adds a second text entry box which if an exact address is typed into it, it adds a point on the map. In "local search" mode, there is no description of the point, but in the standard maps mode, the address is shown.

Friday, February 4, 2005

XPath API

XPath is useful. To some extent, it is addressing a problem (XML is
annoying to navigate) that might not be there if XML wasn't
gratuitously over-applied to technical problems, but it does what it does reasonably nicely and clearly. If XML is going to be used as a data description language, XPath is useful to have.

Unfortunately, the XPath API, as defined in href="http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html">DOM Level
3 and as implemented in Mozilla, is not designed for anyone who
actually wants to use it. It's perfectly fine if you want to
look at it and admire it, but if you actually want ot use it, it's
rather annoying. I understand there can be the attitude in API design
that "utility functions" that duplicate existing (more complete, but
more complex) API functions need not be included. Get over it, they
should be included. One or two well conceived utility functions can
dramatically improve usability. Java got a lot better when they added
String.split() rather than having to wade through the irritation of
StringTokenizer. For that matter, an overabundance of utility
functions is, at worst, a documentation issue.

With XPath, you're using it to fetch a node or nodes of an XML
document. You can also use it to count nodes, get strings, etc, but
when it comes down to it, you're identifying nodes in an XML
document. So, if I want to get say, the first image element with a
class of "big" that is nested underneath a div somewhere in an HTML
document, I use the xpath expression:
//div//img[@class="big"] Unfortunately, the API requires that
I call document.evaluate with 5 parameters, two of which are null and
one of which is an annoying long constant name, something like:
document.evaluate(p,context,null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
Ok, that's a
bit annoying, but it's not so bad, right? I get an array back and I
just take the first element. Wrong. I get an "XPathResult"
back which has its own little iterator interface. So, instead I find
myself using this utility function:



mkgray.xpath = function xpath(p, context) {
var arr = new Array();
var xpr = document.evaluate(p,context,null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for(i=0;item=xpr.snapshotItem(i);i++){ arr.push(item); }
return arr;
}



I'm hoping there's something in the API I'm simply overlooking that someone will point out to me, but in the meantime, I'll continue hoping for utility methods.

Sunday, January 23, 2005

Blizzard of January 2005


View from a second floor window

Wow. My family lived in Alaska when I was young, so I am no stranger to huge amounts of snow, but this blizzard has been an impressive amount of snow in a rather short time period. The NWS now says we're going to net about three feet of snow, but with drifts some spots are already well over that. Before the snow started yesterday afternoon, there was only a couple of inches on the ground. The wind was rather impressive as well. Last night, there were several occasions where you could hear the house shake as the wind blew. That's a little disturbing. The good news is no snow seemed to make it into the house.

Wednesday, January 19, 2005

Heroscape Unit Creator improvements

I've added some improvements to the href="/cgi-bin/heroscapeunit">Heroscape Unit Creator, including a
slightly cleaner layout of saved units and most importantly, the
ability to rate user created units. Hopefully this will make finding
the well done ones easier and will make the incomplete/flawed ones go
away. At some other point I hope to add the ability to view and sort
by other parameters, but until then, go
rate some units
.

Sunday, January 16, 2005

Userscript: Delicous Sort

Another greasemonkey userscript: Sort del.icio.us pages. It sorts the links on any del.icio.us page by the number of people who have marked it. At some point, I'll probably have the userscript add a button to del.icio.us pages to revert to the usual time based sorting.

Also, I updated my userscripts page to have a brief description of all of my current scripts.

Saturday, January 15, 2005

Greasemonkey 0.2

I am now an "active developer" on the greasemonkey project. I made some fixes to it so it now correctly works with background tabs, frames and iframes. The new release also doesn't blow away your old userscript config like the the old releases did. You can download the new release from greasemonkey.mozdev.org.

Friday, January 14, 2005

2004 Games Report

Summary



  • 470 Games played (80 new to me)
  • 212 Titles
  • 112 Sessions
  • Played with 216 different people


Last Year's Hits



Two games from last years top games, Amun Re and
RoboRally, didn't get played at all in 2004. Amun Re because of a bit
of burn out and RoboRally because of insufficient opportunity.

Five games got played, but fell out of the top ten. "6 nimmt!" only fell to #18 while Puerto Rico, Attika, Finstere Flure, and Balloon Cup fell more substantially. Most of these fell due to some amount of burnout and will hopefully get picked up again soon.

Three games, Crokinole, Electronic Catchprase and Princes of Florence retained spots in the top ten.

Year to year comparison



If you want to maintain a high rate of playing games and get a healthy amount of sleep, I recommend against having a baby. In every other regard, I highly recommend it.
This years gaming dropped substantially along all axes except number of different people.


Year Games New Diff Ses Ppl
1997 ~30
1998 ~100
1999 ~150 63
2000 301 112 141 126 129
2001 712 172 266 175 165
2002 650 161 279 163 241
2003 552 128 272 129 180
2004 470 80 212 112 216