Michael J. Radwin

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


Migrating MVHS Alumni Directory data from BerkleyDB to MySQL

MVHS Spartan I recently rewrote large parts of the MVHS Alumni Directory to use MySQL instead of BerkleyDB. I’ve been on paternity leave from Yahoo! for 7 weeks now, and this is one of the few projects on my todo list that I have actually completed.

I’ve been maintaining this list of alumni for over 10 years. It began as a bunch of Perl 4 scripts and a single text file (colon-delimited, a la /etc/passwd) back when I was an undergraduate in college, and has morphed over the years as I have moved from ISP to ISP.

I was forced to port it to Perl 5 at one point when one of my ISPs did an OS upgrade, and although I got it to work, there was no way I was going to go through the pain to make it use strict. Later, I rewrote all of the DBM access routines to use DB_File::Lock to avoid race conditions that occasionally corrupted the data.

At the end of last year, my ISP (DreamHost) upgraded their Linux distro from Perl 5.6 to Perl 5.8 and everthing broke again. Plus, the BerkleyDB file format on their new distro was incompatible with the old files, so I had to recreate the files from a text dump. I got it working again with a little hackery, but still wasn’t ready to spend the time to dump BerkleyDB for MySQL.

Well, it’s finally done. The only new functionality is an RSS feed for each graduating class. It was fun to do a little bit of hacking.

The new version is about 7,000 lines of code, and it’s still very ugly, largely because I have tried to adhere to the Principle of Least Change, and I wasn’t such a great coder back in 1995. Download it if you so desire; it is released under the BSD License. The README needs a little updating, but the Makefile should actually work.

Changing default Yahoo! language from English to Spanish

My cousin is spending quite a bit of time in South America, and he wants to change his Yahoo! Mail account to display user interface elements in Spanish instead of English. He asked me for help, and sure enough, there was nothing useful at the Yahoo! Mail Help site. I tried it out on my account, and these are the steps I had to go through to get it to work:

  1. When you go to Yahoo! Mail, at the top of the screen next to the Yahoo! logo, you’ll see a link that says “My Account”. Click that link.
  2. The next page says “Review My Account Information” and it has a section entitled “Member Information”, right below the Name/Yahoo ID, Yahoo Mail Address/Password section. Click the “Edit” link to the right of the “Member Information” to go to the next page.
  3. This page should say “Edit Member Information for: johnsmith” at the top. The third section says “General Preferences”. It says “Preferred Content: Yahoo! U.S.”. Click the “Yahoo! U.S.” link.
  4. On this page, find the “New Setting” pull-down menu and pick the choice you want (“Yahoo! U.S. in Spanish” or “Yahoo Argentina” or whatever). Click the “Finished” button.
  5. Accept the new terms of service (which should be displayed in Spanish) by clicking the “Accepto” button.
  6. Click the “Terminado” button to complete everything and go back to Yahoo Mail. It should be displayed in Spanish now.

It’s good that you’re able to do this (I imagine that some webmail sites won’t let you change your language preference at all after registering) but it shouldn’t be this hard.

Leave of Absence

I’m taking a leave of absence from Yahoo to take care of Noam for a few months. Thanks to President Clinton for signing the Family Medical Leave Act in 1994.

My leave of absence from this blog is hereby over. At least for the next 11 weeks, I expect to blog at least once a week.

Here’s a picture of Noam in his stroller at the park by the California Ave train station, taken with my brand new Nikon D200.

Hacking Apache HTTP Server at Yahoo!

apache-feather.gif Tomorrow, I’ll be giving a talk entitled Hacking Apache HTTP Server at Yahoo!

Since 1996, Yahoo has been running Apache HTTP Server on thousands of servers and serving billions of requests a day. This session reveals the secrets of how Yahoo gets maximum performance out of minimal hardware by tweaking configuration directives and hacking the source code. Radwin will cover topics such as reducing bandwidth costs, extensible logfile format and rotation schemes, dumping core gracefully, and how to avoid the dreaded MaxClients, Max/MinSpareServers, StartServers configuration nightmare.

I love this topic. This is by far the most fun I have ever had preparing for a presentation. It’s a privilege to be able to speak to such a savvy audience. I only wish I had more than 60 minutes. 🙂

Hella dope Slang Flashcards

Slang Flashcards Ariella and Avital gave me a set of Slang Flashcards last night.

Here’s the marketing pitch:

“Do you want to be able to communicate with America’s youth? Does your proper English make you feel stuffy? Then you’ll be thrilled to see this set of 60 double-sided laminated slang flashcards. Combining the staid style of student primers with contemporary slang, these flashcards reverse to a pronunciation guide, full definition and sample sentence. Study up and you’ll be talking slang like ‘I can assure you that the Tupperware party will be mad (quite) crunk (entertaining).'”

One of my favorites is “Yo, lil’ dawg, daddy’s got to bounce.”

PHP at Yahoo! presentation from Zend/PHP Conference

zendphp_conf.gif Slides for my PHP at Yahoo! presentation from the Zend/PHP Conference & Expo 2005 are now online in PowerPoint and PDF formats.


In 2002, Yahoo selected PHP for Web site development and began to phase out its own proprietary server-side scripting language. Three years later, Michael Radwin reflects on how the switch to PHP offered both technical challenges and productivity increases.

The first part of the presentation offers a look inside Yahoo’s decision-making process to adopt an open-source scripting language. Radwin addresses why Yahoo selected PHP over other languages, focusing on the performance and stability required to serve billions of page views a day.

In the second part, Radwin discusses Yahoo’s PHP development methodology, which has enabled its engineers to rapidly implement features while still creating software that is maintainable over long periods of time.