Hebcal by Phone beta

speaker.gif Well, it turns out it wasn’t that hard. After just a couple of hours of playing around with VoiceXML, I managed to create a Tellme extension that works.

  1. Call Tellme at 1-800-555-TELL
  2. Say extensions
  3. Dial 00613
  4. Dial or say your 5-digit zipcode
  5. Listen to the candle-lighting times for your area

If you want to see my VoiceXML code, check out shabbat.vxml (the main voice menu) and see the CGI-generated results for 90210.

Next thing to do would be to write a Tellme extension that reads my email for me. Actually, looks like the guy who invented Bugzilla has already done that.

VoiceXML for Hebcal

voicexml.gif I just thought of a new project for my Jewish Calendar website. I want to create a Tellme extension so people can call an 800 number to get candle-lighting times.

Over the past 4 years, I have used my hebcal.com site as an experimental test-bed for various web technologies. It all started when I wanted to learn Perl CGI.pm, so I created a web interface to the hebcal for Unix command-line app. Then I decided to add hebrew text, so I had to study up on Unicode and UTF-8. I even decided to learn PHP by adding an email subscription feature (might’ve been a little easier if I had written it in Perl like the rest of the website, but I wanted to learn a new language).

One particularly useful part of the website is the Shabbat Candle Lighting Times section (which tells you when the Jewish Sabbath begins each week). In addition to the regular HTML output, I have created JavaScript, WML, and even RSS versions of the same content.

The next obvious format to support would be VoiceXML. It looks pretty easy to hook into Tellme Studio so people could get candle-lighting times by telephone when they’re travelling. Instructions could be as simple as:

  1. Call Tellme at 1-800-555-TELL
  2. Say extensions
  3. Dial 00613
  4. Dial or say your 5-digit zipcode
  5. Listen to the candle-lighting times for your area

No fancy WAP-enabled cellphone needed. No clumsy embedded browser interface. Just a normal 12-button telephone and your voice.

Just gotta find the time to code the thing. It’ll probably get done before other ten hebcal feature requests that are in the queue.

Jury Duty: Day 2

blind-justice.jpg It was over before it even had a chance to begin.

The judge dismissed the jury today with the thanks of the court. He gathered us all around, explained to us that the case had been resolved without the need for a trial, so we were all free to go.

He didn’t say it explicitly, but my inference is that a plea bargain was reached between the defense and prosecution. Apparently this happens quite a bit; the prosecutor needs to look tough, like they’re actually going to go through with a trial, and finally the defense attorney caves in and cops a plea, rather than risking a trial.

242004t.jpg I’m disappointed. I really wanted to serve my country. In some way, I suppose I did get that opportunity; the presence of a jury panel helped the criminal justice system work. But I didn’t get to see the actual courtroom drama (or lack thereof) unfold. I guess I really wanted to be involved in more of the process, to decide whether the guy was innocent or guilty. You know, all that good Law & Order kinda stuff.

So I’ve got the rest of the day off, courtesy of the U.S. Government. Ariella just finished the rest of her term papers, so we’re going to enjoy a mini half-day vacation. We’ll either go to Malibu to visit Cousin Diana at the yogurt store, or we’ll head down to The Happiest Place On Earth for some mindless entertainment.

Jury Duty: Day 1

jury1.gif I showed up for Jury Duty today at the criminal courthouse in Downtown LA. I’m completely filled with a sense of civic pride and good old-fashioned patriotism. As I mentioned yesterday, I think that serving on a jury is one of the major duties of a citizen, right up there with paying taxes. (Pop quiz: can you name 3 rights and 3 duties as a citizen? Something we do every November is both a right and a duty.)

Juror Waiting Room

After going through some airport-like metal detectors, I rode a packed elevator up to the 11th floor and reported to room 302. When I walked in, José (the Juror Waiting Room Guy) was in the middle of giving instructions to people who would like to get postponed from serving due to some upcoming vacation. About 50 people flooded out of the room, so I took one of the empty seats.

A judge came into the room and told us what an important job we were about to do, thanked all of us for being such devoted citizens, about how the system relied on our participation, etcetera.

The Juror Waiting Room Guy then showed the 200 or so of us a couple of videos which explained what Jury Duty was all about, described what happens in a criminal case, and even covered some administrative stuff. I learned that we’ll get paid a whopping $15 a day + 15 cents a mile (one way) for transportation. I also learned that they need something like 1,000 jurors each day for duty, but the term of service is usually less than 7 days. I think my employer pays for 10 days.

José took about 15 minutes of questions. People asked everything from “What happens if I run my own business and it’s a financial hardship?” to “Do we need permission to use the restroom?” to “Do you know if there are any phone jacks in this room so we can dial out for Internet access?”

We got a 20-minute break. I got a cup of coffee, an egg salad sandwich, and a pack of cinnamon hard candies. I read a little bit of my PC Magazine, then headed back to the room. They called a bunch of names for Panel 1, but mine wasn’t on the list. Then they called a bunch more names (I don’t know what for, maybe those folks had some hardship so they were excused?) and again I didn’t hear my name. Ariella called my cellphone and we had a brief chat. She mentioned that United Airlines filed for Chapter 11.

Assigned to Courtroom

About halfway through the list of names for Panel 2, I heard “Michael Radwin”. Whoo-hoo! I wasn’t going to have to wait around in the mind-numbing Jury Waiting Room all day! We were told to report to Floor 9, room 105. I seemed to recall from José’s instructions that this was the maximum security floor and that we’d need to go through a second set of metal detectors.

Sure enough, Floor 9 was for the Accused Really Bad Guys. We went through the metal detectors, and then waited in front of room 105 (lots of waiting when you’re serving jury duty). The court clerk took another roll call. We filed into the courtroom, the judge and attorneys introduced themselves, and then they started putting people in the jury box by calling out the last 4 digits of our juror id numbers (printed on our big red juror badges). I was assigned to seat number 15. About 25 of a total of about 45 prospective jurors were seated in the box. Once we were seated in the box, the judge read the charges out loud: felony kidnapping and something to do with discharging a firearm. He also noted that the case was expected to last until December 20th (but could finish as early as Tuesday or Wednesday of next week).

Lunch

It was almost noon at this point, so the judge declared a lunch recess until 1:30pm. I haven’t been on foot in Downtown since the LA Marathon a couple of years ago, so this was an opportunity for a 90-minute tourist trip. I went a couple of blocks away to the food court at the Los Angeles Mall and got a veggie burrito and a medium Horchata. I haven’t had Horchata in 2 years. Delicious! After lunch, I walked over to the recently-built Cathedral of Our Lady of the Angels and took a look around inside. They were doing Mass, so I tiptoed around the perimeter. I heard somewhere that this church was built to last 500 years. Sure looks it. It’s a pretty plain concrete exterior and interior, but the thing looks totally solid.

Jury Selection

I returned to room 9-105 (after a couple of more trips through metal detectors, another crowded elevator, and roll call) and took seat number 15. The judge spent the next hour asking jurors various questions about close relatives who work in the legal profession (civil & criminal attorneys, judges, police officers, corrections officers, etc.) and if they thought that if those relationships (or whatever we know about the penal system from them) would cause any bias in this particular case. He also asked about any prior experiences with the law (“Have you ever been a victim of a crime?” or “Have you ever been arrested?”) Of the 25 of of us in the jury box, about 15 answered yes to one or more of the questions, and the judge asked some follow-up questions. Up to this point, I didn’t have anything to say, so I kept quiet.

Next, each of the 25 potential-jurors were asked to state:

  1. Occupation
  2. City of Residence (and neighborhood if you live in LA proper)
  3. Marital Status (plus Spouse or ex-Spouse’s Occupation)
  4. Number of Adult Children (and their Occupations, and their Spouses’ Occupations, if any)
  5. Prior Experience Serving on a Jury (Civil or Criminal)

Finally, I got a chance to speak. My answers:

  1. Software Engineer
  2. Beverly Hills
  3. Married (Graduate Student)
  4. No Children
  5. No Prior Experience Serving on a Jury

The judge only asked me one question: “What is your wife’s field of study?” I answered “Near Eastern Languages and Cultures.” I should’ve answered “Near Eastern Languages and Cultures, Your Honor,” but I didn’t remember to throw that in there. Nobody seemed to notice.

After all 25 folks answered these five basic questions, the prosecutor and defense attorney then got an opportunity to ask prospective jurors some more questions about potential bias. I didn’t get asked any questions. Both attorneys waived their rights to excuse for cause. The attorneys then took turns issuing peremptory challenges, reducing the jury pool to 12. I moved into seat number 4.

The clerk called out another thirteen juror id numbers, bringing the number of folks in the box back up to 25 (and reducing the number of potential jurors in the “audience” section of the courtroom down to about 7). At this point, the judge dismissed us for the day, and we’re supposed to be back in court at 10am.

That was it. No opening arguments, no evidence, no testimony. Just jury selection. Apparently this part often takes more than one day.

Tomorrow, I plan to take the MTA Bus instead of driving.

Jury Duty

Clara-Shortridge-Foltz-Criminal-Justice-Center.gif I got a notice in the mail saying that I was summoned for jury duty at the Superior Court of Los Angeles County. So I called this weekend to see if they actually wanted group number 2 for court location 11, and sure enough, I’m actually scheduled to report at 7:45am tomorrow morning.

So it looks like I’ll be missing work tomorrow to go to the courtroom and wait around with the rest of the prospective jurors. We’ll see if I actually get selected for duty; I’ve heard that they often call a bunch of people to show up, but then dismiss you because the lawyers call for a continuance or something.

I really hope that I’ll actually get to serve. Aside from voting and paying taxes, I see this as one of my fundamental duties as a citizen.

Online music still not ready for prime-time

In CNET News.com today:

Liquid Audio to evaporate. The company’s board of directors votes unanimously to dissolve the company and distribute its cash reserves to shareholders.

Pretty pathetic. Liquid was one of the very first innovators to attempt to make a legal online music system in the Napster age. The fact that they’ve gone out of business shows just how stupid the recording industry is. Without a cheap, widely available alternative to getting illegal music from Kazaa or Gnutella, people are going to continue to violate copyright and copy music.

I’m willing to pay between 10 and 25 cents a song. Charge my PayPal account to avoid the overhead of credit card transactions and subscription models. RIAA, are you listening?

Udi Manber: The First 10 Years on the Web

Introduction to Algorithms: A Creative Approach Udi Manber gave the first talk of this year’s Jon Postel Distinguished Lecture Series today at UCLA.

It seems fitting that I should have a link to Udi’s book on Amazon.com at the beginning of my review of his talk; he started working for Amazon just about a month ago.

While a handful of professors and grad students scrambled around trying to get the laptop to work correctly with the LCD projector, Udi spoke a bit about his personal history as the Web developed. He mentioned his contributions to the field, including suffix arrays (1989), agrep (1991), glimpse (1992), and even the web’s first screen scraper (1996).

What makes the web so fundamentally new and exciting

When Udi returned from a sabbatical in 1993, he was very excited about how the web was going to change everything. His colleagues cautioned him, “But there’s nothing new in the Web. We’ve done it all before. The web is just databases, networks and information retrieval all over again.” He acknowledged that his peers were correct in some respects, but scale is what makes the web fundamentally new: the sheer number of users, and the amount of content. He also related the importance of the ubiquity of the web with the advent of television:

  • TV didn’t invent storytelling

  • TV didn’t invent motion pictures
  • TV didn’t invent actors
  • It wasn’t even in color
  • But it’s in everyone’s home!

Because everything on the web is traceable, Udi feels that data available to websites also allows for companies to create a fundamentally different experience:

  1. More data == better experience. For example, an Amazon.com product detail page shows not only the price of a product, but also related items based on what customers bought, editorial and user-generated reviews, and sometimes even scanned excerpts from a book.

  2. Instant data == instant QA. Companies get instant feedback from users both in the form of emails and also what customers do and don’t click on or buy. Any problems with the software are noticed quickly, are solved faster, and a company is able to lose less money.
  3. Flexible data == better business decisions. By running controlled experiments (Amazon calls them A/B tests) the company can decide whether a new feature should be placed on the left or right side of the page, or whether the color should be blue or green. Almost every new feature is first tested by showing it to a random sampling of the user base to see how they react to it. It’s really easy to see after some small amount of testing if something is going to make more money or improve the user experience.

Udi gave an example of a feature that the company tested. When you’re about to purchase a product, they look through all of your past purchases to see if you’ve already bought that item from Amazon.com. If you have, they pop up a big red warning telling you that you might be buying a duplicate item. There are some legit reasons why you’d want a duplicate; maybe you lost the item, or maybe it’s going to be a gift. But many times it turns out that people put a CD in their shopping cart simply because they forgot that they already own it. So Amazon developed this feature out and tested it out.

Sure enough, it decreased sales, because much of the time the consumer didn’t need a duplicate. But Amazon decided to adopt the feature anyways! Even though it meant less revenue in the short term, the better user experience by not having to return an item (hopefully) translates to increased customer loyalty and therefore more long-term revenue.

Search

Udi spent a bit of time talking about the importance of Search. He described what he sees as 4 generations of web search:

  • 1992-1993: index data from selected sites (Harvest, archie)

  • 1995: collect data from the entire web (Lycos, AltaVista, InfoSeek, Inktomi)
  • 1998: it’s all about relevancy, stupid! (Google)
  • 2001: it’s all about monetization, stupid! (Overture)
  • and the next generation of Web Search is yet to come

What is missing from Search today? Udi pointed out a bunch of problems waiting to be solved:

  • Understanding the query (these days we’re still treating search queries as strings of characters)

  • Understanding the users
  • Personalization (instead of today’s “democratic” search engines which show everyone the same results for a particular query, should we customize the search results based on what we know about the user?)
  • Helping the user with query refinement
  • Better visualization of search results (something better than pages and pages of text, but also something easy enough for people to understand)
  • Anti-SPAM (there are hundreds of companies in the Search Engine Optimization business who are essentially spamming Google to improve rankings of particular sites.)

E-Commerce

Udi prefaced his comments about e-commerce by pointing out that “business” and merchants are hated in almost all cultures, yet somehow commerce/trading started as early as 4000 BC. Why? Because the alternative for acquiring goods is war and that doesn’t scale too well.

He spoke a bit about the beginnings of Amazon.com (Jeff Bezos’ garage) and showed the audience a screen shot of what Amazon’s home page looked like in 1995 complete with LOTS OF TEXT IN SMALL CAPS. We’ve come a long way, baby.

Udi then moved on to discuss in broad terms some of the problems involved in order fulfillment. Deciding what products to ship from what distribution centers and what to order from publishers or distributors involves all sorts of combinatorics and traveling salesman problems. He gave a particular hairy example of a Stochastic Linear Program used to optimize shipping of an order of just 2 books. Most of these problems are exponential in complexity, and the site has got only 500 milliseconds to make an intelligent decision so it can tell the user how much shipping is going to cost for their order.

Udi was hoping to talk about Security, too, but he ran short on time. Instead he took some Q&A from the audience. Many questions had to do with specifics about Amazon’s business and development culture, which Udi couldn’t really answer because he’s only been there a month. When asked about what he would change about academia given his experience in both worlds, he said he wanted to see more of a focus on solving real problems. Too many toy problems are given to students just for the sake of learning. As a result, academics don’t often understand the problems of real users. To help remedy this, he would be interested in providing academic institutions some of Amazon’s real data to use for teaching algorithms and modeling.

Lastly, Udi announced that he would be available on Friday morning at UCLA to speak to students about jobs at Amazon.com. I’m guessing that he’s building up a kewl R&D team and wants a crop of freshly minted PhDs.

Dmitry’s DMCA case begins

Free Dmitry Sklyarov! An important test for the DMCA begins this week. Acording to Wired News,

Opening arguments begin Tuesday in the copyright infringement case against the Russian coding firm, a trial expected to test the limits of federal copyright law. Programmer Dmitri Sklyarov will be on hand to testify for both the prosecution and the defense.

I’m intersted in this case mostly because it’s a battle between the DMCA and the principle of fair use, but also because it involves my former employer.

Joe Andrieu: Carpe Diem or Caveat Emptor?

I’m off to UCLA to hear a lecture for my CS239 class. Here’s the abstract:

For the prepared and alert entrepreneur, “Opportunity knocks far more than once.” Indeed, as the subtitle implies, the challenge is to erecognize the right opportunity and then stay focused on it. Many factors can lure one into taking the wrong direction or scuttle seizing the right opportunity when it arises. Strong emotional attachments to effort already expended and the associated dream of the end game can be seductive, substituting wishful thinking for sober analysis. Pressure from investors anxious to cash out or founders coveting the image of an IPO may overcome a less sexy but correct private sale alternative. Distinguishing reality from subtly masked fantasy may well be the keystone of leadership talent. Having been through multiple ventures during the last 10 years, today’s speaker will illuminate the desiderata and pitfalls attendant to deciding when to act and which course to take among competing alternatives.

Sounds like a cool lecture. Tomorrow, I’m going to the CS201 talk entitled The First Ten Years on the Web: A Personal Perspective by Udi Manber, Chief Scientist, Amazon.com.