Thursday, May 31, 2007

Google street maps easter egg

Found this when exploring the streets around Google HQ: 1648 Charleston Rd, Mountain View, CA

Wednesday, May 30, 2007

Image archiving and digitizing

After my grandmother passed away, I volunteered myself to digitize the family slides so everyone could enjoy them.

I acquired a Nikon film / slide scanner, and began to work on the mountain of slides. And soon lost interest and stopped.

Recently, my mom made several pointed comments to me about finishing the job, or returning the slides so she can do it. Of course, my ego wouldn't allow for that, so I've been trying to finish scanning these things.

Today I just finished scanning another 100-slide carousel. I'm saving the slides as tiff images, and each file is about 67M. (5782 x 3946 pixels)

On average, each carousel is going to take about 6700M (or about 6G). To back these pictures up, and distribute to the family, I've been burning them on DVDs (and down-sized sets to CDs).

The cool thing about scanning all these slides is that I can literally see the difference quality makes. Some of the slides are on generic drug-store film-de-jour, and some is on Kodak Kodachrome. The Kodachrome slides have retained their colors much better than the other slides, and are much sharper when scanned.

Which got me to thinking about longevity of my digital images. These film prints are about 50 years old, and some of them (the Kodachrome) look great. I really doubt all my digital camera photos are going to last for 50 years on a CD or DVD disc.

I'm starting to think that converting my digital images to film might be the best way to go. Doing a google search for "print slides from digital pictures", you can find lots of companies offering digital->film services. From a quick perusal, $2.00 seems to be the ballpark per slide.

Now all I have to do is figure out what I'm going to do with my .avi movie clips from my camera. Super-8? :-)

Friday, May 11, 2007

Searching for common bugs

Google Code Search isn't anything new, but I had fun with it today to search for a bug that I ran into in my project's code base.

Its a simple error to make:

if ( s == "" )

Correct usage would be

if ( s.equals( "" ) )

The tricky thing is that the first (incorrect) usage will work a surprisingly large percentage of the time.

Most strings will be empty because they were initialized to "" somewhere, rather than the result of a string operation that returned an empty string:
s.substring( s.length() ) // returns an empty string

Being initialized to the constant "" means that s will be pointing to the same jvm object that will be used in the equality comparison in the first if() statement.

Anyway, here is a link to the results of a code search for == ""

google code search for == ""

Interestingly enough, some of the first hits are valid uses of == "" (at least from their comments), because the string was interned first before being used in the comparison.