Thoughts on life, Japan, and technology.

A Floating-Point Primer: Part 1 (

It’s really easy to make mistakes when you’re working with floating-point values—especially when you’re comparing them. Thankfully, Bruce Dawson has written up a very thorough treatment on the topic.


I just saw an article about a proposed ‘Straddling Bus’ Offered as a Traffic Fix in China. It’s a clever idea, even though it doesn’t appear that the illustrated vehicle could actually carry 1200 passengers: even standing 10 abreast, there would be 120 rows of people in a bus that is 6-8 cars long! The engineers and city planners would also obviously need to ensure that none of the other cars on the road was tall enough to slam into the top of the bus.

Reading this article made me think about the future of public transportation. One possibility is the widespread adoption of driverless cars, as shown in the 2002 film Minority Report. Another, and my personal favorite, is the construction of networks of moving walkways, as illustrated in the Isaac Asimov novel The Caves of Steel. These moving walkways are set up as a series of parallel belts, with each successive belt on the inner track slightly faster than its neighboring belt on the outer track, allowing people to walk safely from one location to another at highway speeds! Although this is an attractive idea for me, I don’t think that it will be implemented any time soon.

The most radical thought I had was related to the new smart elevators, such as the Miconic 10 at the Marriott Marquis hotel in Times Square. Rather than choosing a floor after entering an elevator, passengers of these “new” smart elevators select a floor from a central control panel first, and are then directed to the elevator that will get them to that floor the fastest. Now imagine if this was how public transportation—and buses in particular—worked. Rather than figuring out which bus to take as well as where and when to get on, passengers would choose a destination from an electronic control panel at any bus stop. This would automatically send a request to a computerized bus scheduling system, which would automatically find the bus that could get the passenger to their destination the fastest and re-route that bus if necessary. A method like this could provide automatic passenger load balancing and ensure that bus operators always knew precisely how many people were waiting at any given stop as well as how many people were attempting to get to a certain destination, all in real time. Maybe someday…

The Business of Software

I just watched this enlightening speech by Seth Godin on “why marketing is too important to be left to the marketing department”. It’s a great deconstruction of our evolving economy and how to market a product that capitalizes on the new consumer model.

The Quiet Coup

I’m reading an excellent article by Simon Johnson that draws striking parallels between the current financial crisis in the United States and emerging economies: The Quiet Coup. It’s a fascinating look into our economy from the eyes of a former IMF economist. I am providing the following introduction to the article to pique your curiosity.

The crash has laid bare many unpleasant truths about the United States. One of the most alarming, says a former chief economist of the International Monetary Fund, is that the finance industry has effectively captured our government—a state of affairs that more typically describes emerging markets, and is at the center of many emerging-market crises. If the IMF’s staff could speak freely about the U.S., it would tell us what it tells all countries in this situation: recovery will fail unless we break the financial oligarchy that is blocking essential reform. And if we are to prevent a true depression, we’re running out of time.


My relationship with movies is interesting: there have been times in my life that I did not set foot in a theater for nearly a year, and other times that I was a patron several times in a single week. Recently it’s been more of the latter, which is rather unusual. Anyway, I have seen the following five movies this summer and will write more about my impressions soon.

  • Amreeka
  • The Dark Crystal
  • Harry Potter and the Half-Blood Prince
  • Ponyo
  • District 9

Jury Duty Complete

My obligations as a juror this year ended on Tuesday, August 11th. I promised you more details, and here they are!

First, I’d like to point out a few interesting facts about jury duty in Seattle.

  • An individual only has an obligation to serve once a year.
  • A juror’s “compensation” of $10 per day is supposedly the same as it was in the 1950’s.
  • At least two-thirds of jury summons are ignored, postponed, or excused.
  • Jurors are not summoned by the courts for a particular trial, but for a two-day jury pool.

I would like to elaborate on this final point. When I tell people that I have received a jury summons, some of them ask me what trial I was chosen for. In Seattle, at least, the system does not work this way: The courts send jury summons for a two-day pool of potential jurors, rather than for individual trials. This juror pool is replenished every Monday and Wednesday, which means that any jurors in the courthouse on Friday have already been assigned to a trial and are in the middle of deliberations.

So, all jurors start their service by waiting in the Jury Assembly Room. When a judge needs a jury for a trial, he or she contacts the administrative staff in the Jury Assembly Room. The staff then asks the local oracle, a computer, for a numbered list of potential juror names from those people currently waiting in the Jury Assembly Room. The computer dutifully selects (more or less) at random ~20 names for a 6-person jury and ~40 names for a 12-person jury. After their names and numbers have been called, the potential jurors are escorted by the bailiff to the courtroom, where they will be cross-examined by the judge and attorneys.

This is where the process gets interesting. The judge first asks some basic questions to determine which jurors could be disqualified for obvious reasons, which may include the following:

  • Knowledge of the case in advance
  • Familiarity with either the plaintiff (prosecutor) or respondent (defendant)
  • Strong opinions regarding the trial itself
  • Religious objections to judging another human being
  • Financial or physical hardships caused by serving on the jury

Next, each attorney gets a chance to cross-examine the jury. Apparently King County uses the “struck jury” method, which in this case means that each attorney engages in a discussion with the entire jury rather than questioning every juror in order. Note that an attorney can and probably will single out jurors who have not answered many questions, but this does not have to happen in any particular order. At any time and as often as they like (within reason) during questioning, the attorneys have the opportunity to make a challenge for cause, requesting that a juror be dismissed for an obvious bias. In this way, the jury is whittled down until the attorneys have used up all the time allotted to them.

This process of questioning that I have just described is known formally as voir dire, “to speak the truth”.

Remember how each juror was given a number when he or she was selected by the computer? Now that number becomes important because at the end of voir dire the jury box is filled in with jurors holding lower numbers. To make this easier to understand, assume that the trial requires a 12-person jury and there are 40 potential jurors. Originally, jurors 1-12 are the jury. However, if jurors 3, 5, 8, 9, and 10 are dismissed during voir dire by a challenge for cause, jurors 13, 14, 15, 16, and 17 will take their place on the jury. If jurors 14 and 17 had been dismissed by a challenge for cause, as well, jurors 13, 15, 16, 18, and 19 would move to the jury box instead.

At this point the attorneys have a chance to use their peremptory challenges, which basically allow them to dismiss potential jurors without giving a reason. For each juror that is dismissed from the jury box, a new one (with a higher number) takes his or her place. Because each attorney has a limited number of peremptory challenges (I have seen this vary between 3 and 8 per attorney), the jury will be decided when either all of the peremptory challenges have been used up or each attorney is satisfied. All the other potential jurors are then dismissed to the Jury Assembly Room to wait for another trial.

This process repeats for two days. Any jurors chosen for a trial during that time must continue to report to the courtroom until their trial completes, and all other jurors are free to leave.

We really do have a fascinating legal system in this country.

A Day on the Town

Today was one of those rare days that I was able to spend in the city in which I live. I know it sounds crazy, but I don’t usually have much time on weekdays to appreciate Seattle because I work on the other (east) side of Lake Washington, in Redmond. Today and tomorrow are different, though, because I have jury duty and actually get to appreciate the Emerald City for once!

Jury duty itself has been interesting so far: This marks the second time that I’ve been summoned in as many years. Luckily, I’m within walking distance of the courthouse and was actually selected as a potential juror on a trial before being promptly dismissed; this is far better than my previous stint as a juror, which consisted of waiting in the juror assembly room for two days without ever being selected as a potential juror for a trial. The moral of the story is to bring a good book, laptop, or portable gaming system to pass your time!

After my obligations to the Supreme Court of Seattle ended at 3:30 p.m., I went back to my apartment and took an hour-long nap, which I sorely needed for two reasons: (1) I am not used to waking up before 7:00 in the morning and (2) I have been fighting a cold-induced headache for the past two days. Be that as it may, I met up with some friends around 5:00 to see a movie at The Central Cinema, our local pizza, beer, and movie joint. We watched The Dark Crystal, an old Jim Henson movie about the Skekses and Mystics and a prophecy of how the world would be changed by a Gelfling. It was a bit of nostalgia and as good as I remembered.

Oh yeah, and it finally rained today. We definitely needed it.

Web Browsing for the Paranoid

Have you ever longed for a secure connection for browsing the web through an access point that you do not completely trust? In this post I will present a method that, while not foolproof, should definitely give you some piece of mind to know that all of your web traffic is as secure as an SSH connection, rather than being sent “in the clear” or even simply through an encrypted HTTP session.

This post assumes that you meet the following prerequisites.

  • You have downloaded and installed Firefox.
  • You have downloaded and installed the FoxyProxy Firefox plugin.
  • You have a shell account (accessible via SSH) on a remote server.
  • You are using OpenSSH to connect to your shell account.

First, configure FoxyProxy to use a proxy server using the Manual Proxy Configuration. The proxy server should have a Host Name of “localhost” (without the quotes) and listen on Port 8080. Is it a SOCKS proxy? Yes, with SOCKS v5 enabled.

Next, set up URL patterns for the sites that you want to connect to securely. Alternately, you can tell FoxyProxy to Use proxy “localhost” for all URLs if you want to protect all web traffic through Firefox.

Once FoxyProxy is configured and enabled, you will find yourself unable to view any websites! Don’t worry, this is where you will use your remote shell account (you do have one, right?).

Start up a shell session and enter the following on the command line.

 ssh -fND 8080 myaccount@myserver

Substitute your account and server name as appropriate. In the command invocation above, the -f flag will cause ssh to run in the background, the -N flag will prevent ssh from executing any remote commands (such as starting a remote shell), and the -D flag will instruct ssh to act as a SOCKS server that listens for traffic on port 8080 of the local host.

Now you should be able to surf the web with the safety of ssh on your side!

Is Moore's Law Finally Catching up to the Game of Go?

Apparently, a computer program has finally beaten a professional player with a nine-stone handicap. Although this is still nowhere near an even game, it is a remarkable achievement given the fact that the ancient game of Go has been the last bastion of clear human superiority in board games (contrast this with chess, where computers are arguably as formidable players as their human counterparts). The question now is: will Moore’s law apply to the game of Go, as well? That is to say, will a computer’s mastery over the game continue to double every year?

The Development Abstraction Layer

I hate to use this space simply for posting links to other articles, but I enjoyed the following article and thought that others might, as well. The Development Abstraction Layer, by Joel Spolsky