Robots of Dawn

Share

This book is the third in the third in the Robot mystery series, and is once again set on a Spacer world. This one was written 30 years after the first two, and Asimov’s style has noticeably changed between the 1950s and 1980s.

The book starts off slowly, with a lecturing tone which I found quite annoying. For example, devoting an entire page to a discussion of whether the deliberate death of a a robot (even a human shaped on) is murder. Often the first part of the book feels like it is going excessively slowly.

However, its only the first third of so of the book which suffers this flaw. Its as if Asimov realized after a while that he also had a story to tell, and got on with it. The book then improves massively and has a good story.

So, overall I liked this book, although the first part of the book wasn’t as good as the rest of the Asimov I’ve read.

[isbn: 0553299492;0345315715]
[award: nominee hugo 1984]

Share

Shibuya, Tokyo

Share

Panos (a dude I work with) and I got to Tokyo ok last night. The flight left SFO at about 1pm and got into Narita airport at about 4pm. By the time we’d done immigration and collected our bags we only had about a ten minute wait for the limousine bus to the hotel.

We’re staying in Shibuya, which seems to be a bit of a shopping district. We managed to do the pointing a menu food ordering thing for dinner last night, and then I went to bed.

Initial impressions of Tokyo:

  • Its very clean and amazingly well organised. People naturally line up, and customer service is much better than it is in the US.
  • Its not as crowded as I expected.
  • English is very common, but don’t expect people on the streets to actually speak it.
Share

Chilis

Share

I hadn’t been to Chili’s (a chain restaurant in the US) in about four years, and we couldn’t decide where to go for dinner. Given that all I remembered about Chilis was that they had good margaritas, and the kids menu looked ok online, off we went to give them a try.

They sucked. The service was extraordinarily slow (30 minutes+), the food was uninspired and over cooked, and my serving was too small. At least they weren’t all that expensive.

This post is made in the hope that I’ll remember not to go again.

Share

Tokyo tomorrow

Share

Tomorrow I’m jumping on a JAL flight to Tokyo. I will be in Tokyo for a week, mostly for work meetings. I’m hoping to fit some sightseeing in on the weekend. Let me know if you have any recommendations.

Share

Naked Sun

Share

Bill Clarke was kind enough to lend me a compendium of Asimov that contained the next book in the series I’m reading at the moment. I’ve had to skip over some of the earlier collections of robot short stories, because they’re quite hard to find. Specifically, I haven’t been able to find anyone with a copy of The Complete Robot for sale, even new.

This book is the next in the Robot series, and the second which features Detective Baley. Again Baley is solving a murder, although this time its occurred on a Spacer world instead of his own Earth. Along the way he has to confront his own fear of open spaces, as well as other’s fear of proximity to other humans.

This was again another excellent book. I enjoyed it a lot.

[isbn: 0553293397]

Share

Caves of Steel

Share

Caves of Steel is interesting because it is a murder mystery set in the future, which at the time this book was written was a novel concept. It also presents an interesting almost-communist view of the future, where individual liberties are surrendered one by one in order to improve economic efficiency in order to support Earth’s ever growing population. Implicit in that is the assertion that capitalism is inherently inefficient, but I’ll leave that discussion alone.

This book is a really quick read. It took me a day (including actually going to work) to knock it over, which was fun. The book is a good, light read.

[isbn: 0553293400]
[award: nominee hugo 1954]

Share

I, Robot

Share

The 1950s must have been a great time to be a science fiction author. WW2 was finally over, and seemingly massively stupid ideas like mutually assured destruction, nuclear rifles so powerful that they were as much a danger to those firing them as those who were on the receiving end, and Brylcreem were all the rage. Into this atmosphere of run away idiocy comes Asimov’s I, Robot, the book which defined the three laws of robotics, and some how managed to not suggest that humanity should nuke each other all into submission. This book is still an excellent read almost 60 years later, and I think still shows us some of the future. Its a little depressing to think how little we’ve achieved towards Asimov’s proposed future world, given the time line laid out in this book.

One of the interesting aspects of this book is Asimov’s failure to predict things which seem so mundane now, but must have not been obvious to an observer in 1950. For example:

  • The commonness of computers now. One of the short stories revolves around a secret batch of robots, and the need to debug them. The protagonists can’t use a computer though, because that would draw too much attention. Why not use a laptop? Because Asimov failed to predict them.
  • The use of wire recorders to record sound. No optical media (or whatever we’ll have in the future) here.
  • The assumption that robots contain vacuum tubes.
  • The failure to account for inflation. This one should have been obvious! A batch of 63 robots for instance is valued at $2 million dollars in one of the stories, a sum so great that no one can conceive of deliberately destroying the batch.

A good book.

[isbn: 0449239497;44901966095]

Share

Bill The Galactic Hero

Share

This book is an interesting read, but for unusual reasons. Its as if Harrison sets out to write a terrible book, and learns new techniques to achieve this terrible along the way. An example of his mastery of the art:

A hundred bucks a month was good money, though, and Bill saved every bit of it. Easy, lazy months rolled by, and he regularly went to meetings and reported regularly to the G.B.I., and on the first of every month he would find his money baked into the egg roll he invariably had for lunch. He kept the greasy bills in a toy rubber cat he found on the rubbish heap, and bit by bit the kitty grew.

It seems to me that this book is so terrible it has to be deliberate, and its good to see that Wikipedia agrees:

Bill, the Galactic Hero is a satirical science fiction novel by Harry Harrison, first published in 1965.

It is a response to Heinlein’s controversially militaristic Starship Troopers. The overall plot is similar, the details rather less so; and Harrison makes the most of an opportunity to spoof the work of other authors including Isaac Asimov, “Doc” Smith, and Joseph Heller. Harrison reports having been approached by a Vietnam veteran who described Bill as “the only book that’s true about the military”.

This book is a study in bad writing, and that’s what makes it great. This book is entertaining, stupid, and funny. You wont to be a better person at the end, but you wont be bored while reading it either. To be clear — I loved this book and its paranoia-like universe.

[isbn: 0743423763;0380003953]

Share

Estimating the progress of queries on MySQL

Share

I’ve been doing a lot of batch updates on one of my databases at home recently. show processlist says something like this:

mysql> show processlist;
+-------+------+---------------+--------------+---------+-------+----------+------------------------------------------+
| Id    | User | Host          | db           | Command | Time  | State    | Info                                     |
+-------+------+---------------+--------------+---------+-------+----------+------------------------------------------|
| 18354 | root | maui:37403    | smtp_servers | Query   | 57234 | Updating | update ips_218 set reverse_lookup = null |
| 22286 | root | maui:37348    | smtp_servers | Query   | 38103 | Updating | update ips_80 set reverse_lookup = null, |
| 22851 | root | maui:54982    | smtp_servers | Query   | 34091 | Updating | update ips_19 set reverse_lookup = null, |
| 23351 | root | molokai:58232 | smtp_servers | Sleep   |    57 |          | NULL                                     |
| 23496 | root | maui:40923    | smtp_servers | Query   | 29973 | Updating | update ips_62 set reverse_lookup = null, |
| 23906 | root | maui:38068    | smtp_servers | Query   | 26794 | Updating | update ips_83 set reverse_lookup = null, |
| 25675 | root | maui:56438    | smtp_servers | Query   | 12505 | Updating | update ips_82 set reverse_lookup = null, |
| 25846 | root | maui:41334    | smtp_servers | Query   | 10948 | Updating | update ips_90 set reverse_lookup = null, |
| 26437 | root | maui:41139    | smtp_servers | Query   |  6211 | Updating | update ips_66 set reverse_lookup = null, |
| 26773 | root | maui:32885    | smtp_servers | Query   |  3526 | Updating | update ips_76 set reverse_lookup = null, |
| 27073 | root | maui:42607    | smtp_servers | Query   |  1148 | Updating | update ips_11 set reverse_lookup = null, |
| 27202 | root | molokai:50688 | smtp_servers | Query   |     0 | NULL     | show processlist                         |
| 27203 | root | molokai:50689 | smtp_servers | Sleep   |     2 |          | NULL                                     |
+-------+------+---------------+--------------+---------+-------+----------+------------------------------------------+
14 rows in set (0.20 sec)

Now, wouldn’t it be nice if MySQL provided some extra information about the progress of those queries? Like for example the number of rows which have been updated so far, or an estimate of how long the query has left to run? I’m ok with such queries not being very accurate, but I assume the storage engine has to have some idea of how many rows are in the table and how many it has touched already.

Perhaps something like this already exists and I haven’t noticed? I’m using innodb if that matters.

Update: it seems like innodb can answer this question for me:

mysql> show engine innodb status \G;
...
---TRANSACTION 0 40056, ACTIVE 39794 sec, process no 22984, OS thread id 3020733328 waiting in InnoDB queue
mysql tables in use 1, locked 1
6672 lock struct(s), heap size 748864, undo log entries 909825
MySQL thread id 22851, query id 351217 maui 192.168.1.93 root Updating
update ips_19 set reverse_lookup = null, reverse = null, reverse_extracted
...

That doesn’t give you an estimate of percentage complete though. I assume there is a 1:1 correlation between undo row entries and rows altered by the query?

Update: my imperical observation is that the undo rows are not 100% correlated to the number of rows your query changed. Its correlated to the number of rows that were changed kinda near your query. For example, if you’re doing an update, then the number is good enough to trust. However, if you’re doing a select, then the number seems to be the number of rows someone else changed while your select was running (i.e. how many old versions needed to be kept around because of your select transaction).

Also, Jeremy Cole to the rescue!

Share