30 August 2007

Work smarter, not harder... and faster!

Maybe it's obvious. When you try to do things really fast, it can actually be slower.

I always thought "A stitch in time saves nine" meant that you should stitch as fast as possible. I think I just assumed that, which I need to be careful of, because when you ASSUME, you make an ASS out of U and ME.

It's certainly true with programming. When it comes down to it, if you look at a finished application, it's conceivable you could just type the code for it in an afternoon, especially if you have good tools that let you express your intent quickly. Of course, you don't know exactly what the code will look like until you start to create it, but let's ignore that for a sec.

So... taking my time and thinking for a second to save time. I was too frantic for the last couple years, and wrote a lot of Log object instantiations.

public static final Log log = LogFactory.getLog(NiceObject.class);

I wrote that a lot, and got a Das Keyboard so I could type it even faster. I knew that Eclipse could do this for me, but there's that nagging startup cost, where the first time I set it up, it would take longer, and I might go looking around for more of the same (or blog about it), making it much longer than typing it out.

Well, lo and behold, I am happy I took the 30 seconds to:

24 August 2007

Correction!

Well, I learned that what I said yesterday isn't quite true. It IS true that the geocoder.us site does a bad job geocoding on this street. You can see their map here:
http://geocoder.us/demo.cgi?address=4050+BEN+LOMOND+DR+PALO+ALTO%2C+CA+94306

BUT, if you zoom in, you see the shape of the street is right, they just have the pin in the wrong place. The maps come from the TIGER/Line data as well as the geocoding. The problem is that the Perl module, Geo::Coder::US, doesn't use one of the data files in the TIGER set - the RT2 "type 2" data. This file is Complete Chain Shape Coordinates which means it has midpoints for some street segments. I found the two midpoints for the street I showed yesterday, and put some pushpins at those spots - and behold, the curvy street problem would go away!

Now, too bad I can't find any libraries (in any language!) that do the same thing as the Perl library, but use the RT2 data...

23 August 2007

Why TIGER/Line can be a bad source of geolocations

I came up with this neat map in Google Earth, showing the difference between Google's coordinates for some addresses in Palo Alto, CA, and a line connecting those to the TIGER/Line-backed geocoder.us coordinate, colored blue-to-red based on how far off it is. The TIGER/Line data only has endpoints for a range of addresses, and the geocoder.us Perl module tries to do a linear interpolation to get addresses in the range. Obviously this doesn't work well for non-linear streets like this one...

17 August 2007

FeedBurner, finally!

I have sort of known in the back of my head that I ought to have my feed managed better. It would be nice to see who is subscribed, both because I don't really want to blog to hear myself talk, and also because you get an incentive to write more interesting and useful stuff if there's an audience.

So I hooked up feedburner, and was pleasantly surprised by how useful it is. Not only do I get my basic readership metrics, it also manages the trick of getting existing subscribers under the metrics (by telling blogger to redirect requests for the feed URL) and lets me fold in daily bookmark digests and photos.

Hopefully my 2 readers (?) will also enjoy my random API and documentation bookmarks (?) and at the same time, my attempts to do film photography (?).

Now I am wondering how to advertise my Twitter and Skype and Facebook and so on. I guess it's good to make them widgets on the right side of the blog, and just assume that one URL will give away my complete identity. Maybe hCard is good for this? I do feel like my "Card", whether it's vCard or whatever, should have my contact info including many URL's, and should be easy to broadcast my card to *everyone*, not just online friends. Then the offline people like grandma get my new phone number, and online people get the skype ID, and all is well.

That would be another reason to try out one of the email->snail mail gateways - I can subscribe my grandmother to my vCard feed and she'll get it via postal mail... slick. Except then she'll call me wondering why I sent her a letter, just because I added a web 2.0 service to my card... maybe I should think about that some more.

11 August 2007

liveblogging from barcampdc

I saw the technorati page over justin's shoulder so I should probably contribute. The conference is cool, it's a little presentation-heavy rather than interactive, I guess that's just because it's hard to get people comfortable with other participants when there are 9 sessions in 8 hours.

I was thinking about how attendees at this sort of conference are into scripting, web 2.0, design, user experience, "lightweight", fun stuff. There isn't much community forming around enterprise, Java stuff anymore. The NoVA JUG has been trying to recover from near-death, as far as I can tell from the mailing list. Maybe dynamic, smart people just want to spend their free time on the fun stuff that's hard to get paid for.