Michael J. Radwin

Tales of a software engineer who keeps kosher and hates the web.


Adding EXIF data to Treo 650 cameraphone pics

I just got a Flickr Pro account and I’ve been uploading my digital photos. My Treo 650 doesn’t stick EXIF data in the JPEG images it captures, so Flickr assumes that the “posted on” date is the same as the “taken on” date.

The file attributes of the Photo_MMDDYY_NNN.jpg files accurately reflect what time the picture was taken, so here’s a short Perl script to embed that data into the EXIF part of each file:

#!/usr/local/bin/perl -w

use strict;

use POSIX ();

foreach my $file (@ARGV) {

my $mtime = (stat($file))[9];

my $ts = POSIX::strftime("%Y:%m:%d %T", localtime($mtime));

system("exiftool", "-P", "-DateTimeOriginal=$ts",

"-Make=PALMONE", "-Model=Treo 650", $file);



I tried using the jhead tool to do this, but it won’t create an EXIF header if one doesn’t already exist. The Image::ExifTool perl module had the functionality I needed.

There’s certainly a way to use the Image::ExifTool perl module directly, but it was easier to just shellout to the command-line utility.

Burton Group report on P-Languages for Enterprise Scripting

The Burton Group published a report entitled The P-Languages: PHP, Perl, and Python for Enterprise Scripting yesterday. I’m quoted twice in the article.

Page 11 (PHP in Web Development):

Not only is PHP used extensively throughout the Web, it is also used by some of the busiest websites in the world. For example Yahoo!, which serves up 2.85 billion page views a day and supports 345 million visitors a month, uses PHP for all its presentation logic. For Yahoo!, searching and delivering web content quickly is a mission-critical issue, as is the ability to quickly add new features and maintain existing code. According to Michael Radwin, engineering manager in the Infrastructure Group for Yahoo!, “All of our presentation logic is in PHP. We avoid putting presentation logic in C/C++ because of the longer code-compile-debug cycle.” Other busy websites that use PHP include the social networking site Friendster (http://www.friendster.com/), which switched from JSP to PHP in 2004, and Freshmeat.org, an open source resource site that uses PHP to process between 600,000 and 700,000 page views a day.

Page 12 (Perl in System Administration and Integration):

Burton Group found that Perl, more than any other language, is heavily used in UNIX and Linux system administration. Ford Motor Company, for example, has been using Perl with their UNIX systems in this capacity for years. In fact, it would be difficult today to find an organization that has a number of UNIX boxes that do not use Perl in some capacity. Michael Radwin of Yahoo! told Burton Group: “We use Perl all the time here for almost everything that’s not web-related and not super performance-related. It’s a superb general-purpose scripting language. We use it for all of the typical uses (text processing, system administration, algorithmic prototyping, automation, light data crunching, report generation).” Yahoo! owns 90 web properties (Yahoo! Mail, Yahoo! Store, etc.) and supports 345 million visitors per month.

Those Yahoo! statistics (pageviews, visitors per month) are from December 2004.


Ever since we moved up to the San Francisco Bay Area, one of my favorite places to eat has been Amber India Restaurant in Mountain View. I was delighted to find papri chaat and pav bhaji on the menu. My colleagues in India call it “Indian junk food”. I call it delicious.

This past week’s Chronicle has an article entitled “It’s time to have a little chaat” which lists a half-dozen local restaurants that specialize in chaat. Next time we’re in Berkeley we’ll have to check out Viks Chaat Corner and see how it stacks up to Amber.

In the meantime, I can always remind myself of the goodies I ate last May.

Battleground, MN

battleground-minnesota-dvd.gif I just watched the 8-minute web video of Battleground Minnesota. It’s a Get Out the Vote documentary aimed at young voters which aired on public television last fall.

We didn’t know why Gabriel had been so delinquent in updating his blog last year. We figured he was working on some other project. Now we know he was busy directing a rather cool documentary and inspiring Drew Barrymore to do the same.

If you like the video, vote for it at INdTV.

Or buy the video of the 30-minute version for $14 plus shipping & handling.

La Fondue

fondue.jpg Gabriel and Rachel are visiting from the Twin Cities, so we went out to dinner at La Fondue in Saratoga. Ben & Lisa arrived late, but there was plenty of cheese and chocolate leftover.

We ordered a la carte since dipping vegetables in hot oil didn’t appeal to us (I suppose that phase of the meal is more appealing to meat eaters) and we were more focused on the “appetizer” course of the meal (dipping veggies and bread cubes into pots of hot cheese) and the dessert course (dipping fruit, cake, cookies and marshmallows into pots of hot chocolate). Very yummy. We’ll probably go back for dessert the next time we have out-of-town visitors

. After 10pm you can get seated just for dessert for $8/person.

Ten years of Yahoo! Inc

The 10-year anniversary of Yahoo! Inc’s incorporation is this week. We’re having a party at work on Wednesday to celebrate. They put a big tent up on campus this morning. Apparently Sugar Ray is going be giving a private concert, and the weather has been threatening rain. Rumor has it that the www.yahoo.com site will have a special look on the anniversary. In the meantime, you can read about the company’s history.

I heard another rumor (so far unsubstantiated) that as part of the 10-year celebration, the company would be offering sabbaticals for long-time employees. SGI, for example, offers 6-week paid sabbatical every 4 years. Alas, we don’t have that perk (although we do have three espresso bars staffed with full-time baristas).

I’ve been at Yahoo! for more than half of its 10 years. I’ve often dreamed of taking a short break to try something else for a change of pace. If the sabbatical rumor proves to be true, I’d be sure to use mine for a semester at the Jerusalem School of Kosher Culinary Arts.

Yahoo == Yet Another Hierarchical Officious Oracle? I don’t know.

Perl or PHP modules for XLIFF?

Do you know of any good Perl or PHP modules for parsing XLIFF?

I’ve gotten a couple of emails from folks asking about making a French version of my Jewish Calendar Tools website. They’ve volunteered to do all of the translation work themselves if I send them a file to be translated.

Most of the site uses Perl CGI.pm, although parts of it are written in PHP.

The way I see it, I have a few options:

  1. GNU gettext message catalogues. Easy interface with CPAN Locale::gettext module and PHP gettext extension.
  2. Hack something together myself. Send the nice French people an Excel spreadsheet of all of the strings on the site and have them send it back to me. Export to CSV file, then import into whatever format I want (probably BerkleyDB or maybe some custom XML format). Repeat the exercise for a future Hebrew version.
  3. Use XLIFF (XML Localisation Interchange File Format), which is a hip new standard and happens to be what ICU (International Components for Unicode) uses for its message catalogue format.

Option #1 has been around for a long time, but has its warts. Option #2 is what I would’ve done back when I wanted to write everything myself. But I want to learn more about ICU anyways, so I figured XLIFF would be the right place to go.

I expected to find a Locale::XLIFF module on CPAN or a Translation_XLIFF package on PEAR, and was surprised when my searches turned up 0 results.

Cygwin vs. UWIN

I got an email last week from AT&T Labs saying that UWIN 4.0 had been released.

I must’ve signed up for the uwin-announce mailing list a long time ago, because there hasn’t been a message sent to that list in over four years. Last I remember, UWIN 2.2 was hot off the presses during the summer of 2000.

Does anyone actually use UWIN anymore? At one point, you had to pick between UWIN, the MKS Toolkit, and Cygwin. They were all brand new technologies, and all competing for mindshare. But it seems to me that Cygwin has developed the largest community over the years. It’s what I still use on my Windows laptop.

Someday I’ll be like all of the other cool kids and have a Mac laptop. Then I won’t care about things like Cygwin or UWIN.

A new spin on Yellow Pages

A9 launched a beta of Yellow Pages this evening. They’ve got the same DHTML interactive map that Yahoo has, but differentiating feature is an image of every business listed.

For example, one of my favorite LA restaurants is Real Food Daily. Apparently they acquired these images by driving trucks with digital cameras and GPS around 10 major US metros. [Read more…]