Content here is by:
Michael Still
mikal@stillhq.com

All my Open Source projects
Online CVS server
Extracted view of CVS
Home
Site map
May 2008
Sun Mon Tue Wed Thu Fri Sat
       

ImageMagick book
MythTV book





Wed, 14 May 2008



Isaac Asimov's Foundation Series

    I'm getting really into reading second hand science fiction from the 1950s onwards. I read a few (but nowhere near all) of the Foundation series as a child, and I remember liking them a lot. Stolen from Wikipedia, here is a list of the books in The Foundation series in Asimov's suggested reading order:

    CYearTitleNotes
    1950I, RobotRobot short stories. First collection, which were all included in The Complete Robot, though it also contains binding text (Mind and Iron), no longer in The Complete Robot. Bookbuyer's
    11982The Complete RobotRobot short stories. Collection of Asimov stories written between 1940 and 1976.
    1986Robot DreamsRobot short stories. Anthologised in a book with the same title.
    1990Robot VisionsRobot short stories. Anthologised in a book with the same title.
    1992The Positronic ManRobot novel based on Asimov's short story The Bicentennial Man, co-written by Robert Silverberg
    21954The Caves of SteelRobot novel. Leigh's Favorite Books
    31957The Naked SunRobot novel.
    41983The Robots of DawnRobot novel. Leigh's Favorite Books
    51985Robots and EmpireRobot novel. Bookbuyer's
    1993Isaac Asimov's CalibanCaliban trilogy by Roger MacBride Allen.
    1994Isaac Asimov's InfernoCaliban trilogy by Roger MacBride Allen.
    1996Isaac Asimov's UtopiaCaliban trilogy by Roger MacBride Allen.
    61951The Stars, Like DustGalactic Empire series.
    71952The Currents of SpaceGalactic Empire series.
    81950Pebble in the SkyGalactic Empire series.
    91988Prelude to FoundationFoundation novel.
    101993Forward the FoundationFoundation novel.
    111951FoundationFoundation trilogy.
    121952Foundation and EmpireFoundation trilogy.
    131953Second FoundationFoundation trilogy.
    1997Foundation's FearSecond Foundation trilogy by Gregory Benford.
    1998Foundation and ChaosSecond Foundation trilogy by Greg Bear.
    1999Foundation's TriumphSecond Foundation trilogy by David Brin.
    141982Foundation's EdgeFinal chronological Foundation books.
    151986Foundation and EarthFinal chronological Foundation books.

    Next step, read them.

    Tags for this post: book(S) Isaac_Asimov(S)

posted at: 10:01 | path: /book/Isaac_Asimov | permanent link to this entry
There are no comments on this post yet. Be the first to make one.


Caves of Steel

    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.

    Tags for this post: book(S) Isaac_Asimov(S)

posted at: 10:00 | path: /book/Isaac_Asimov | permanent link to this entry
There are no comments on this post yet. Be the first to make one.


Blathering for Tuesday, 13 May 2008

    15:05: The new Qantas A380s have the worlds worst color in economy class: pictures


    Tags for this post: blather(S)

posted at: 08:05 | path: /blather | permanent link to this entry
There are no comments on this post yet. Be the first to make one.


Mon, 12 May 2008



Discovering the CASE statement

    In an effort to speed up my database updates, I've been looking for ways to batch some of my updates. CASE seems like the way to go:

    mysql> create table bar(a tinyint, b tinyint);
    Query OK, 0 rows affected (0.02 sec)
    
    mysql> insert into bar(a) values(1), (2), (3), (4), (5);
    Query OK, 5 rows affected (0.00 sec)
    Records: 5  Duplicates: 0  Warnings: 0
    
    mysql> select * from bar;
    +------+------+
    | a    | b    |
    +------+------+
    |    1 | NULL | 
    |    2 | NULL | 
    |    3 | NULL | 
    |    4 | NULL | 
    |    5 | NULL | 
    +------+------+
    5 rows in set (0.00 sec)
    
    mysql> update bar set b = case a
        ->   when 1 then 42
        ->   when 2 then 43
        ->   when 3 then 44
        ->   else 45
        ->   end;
    Query OK, 5 rows affected (0.00 sec)
    Rows matched: 5  Changed: 5  Warnings: 0
    
    mysql> select * from bar;
    +------+------+
    | a    | b    |
    +------+------+
    |    1 |   42 | 
    |    2 |   43 | 
    |    3 |   44 | 
    |    4 |   45 | 
    |    5 |   45 | 
    +------+------+
    5 rows in set (0.00 sec)
    


    I see stuff online which warns not to forget the else, otherwise you get a default of null, so I guess I should bear that caveat in mind...

    Tags for this post: mysql(S)

posted at: 14:11 | path: /mysql | permanent link to this entry
There are 4 comments on this post, and 0 comments which didn't survive moderation. 0 were blocked by trained gerbils. Click here to see them.


I, Robot

    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.

    Tags for this post: book(S) Isaac_Asimov(S)

posted at: 05:32 | path: /book/Isaac_Asimov | permanent link to this entry
There are no comments on this post yet. Be the first to make one.


The Stainless Steel Rat Series

    I am increasingly becoming obsessed with science fiction from 1950s and 1960s. Again stolen from Wikipedia, here is a list of all the Stainless Steel Rat books:

    YearTitleNotes
    1985A Stainless Steel Rat Is BornI got this one from powell's
    1987The Stainless Steel Rat Gets Drafted
    1994The Stainless Steel Rat Sings the Blues
    1961The Stainless Steel Rat
    1970The Stainless Steel Rat's Revenge
    1972The Stainless Steel Rat Saves the World
    1978The Stainless Steel Rat Wants YouI got this one from bookbuyers
    1982The Stainless Steel Rat for PresidentI got this one from bookbuyers
    1996The Stainless Steel Rat Goes to HellI got this one from bookbuyers
    1999The Stainless Steel Rat Joins the Circus
    1993The Golden Years of the Stainless Steel Rat


    Tags for this post: book(S) Harry_Harrison(S)

posted at: 03:19 | path: /book/Harry_Harrison | permanent link to this entry
There are 1 comments on this post, and 0 comments which didn't survive moderation. 0 were blocked by trained gerbils. Click here to see them.


Sat, 10 May 2008



Bill The Galactic Hero

    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.

    Tags for this post: book(S) Harry_Harrison(S)

posted at: 14:19 | path: /book/Harry_Harrison | permanent link to this entry
There are 1 comments on this post, and 0 comments which didn't survive moderation. 0 were blocked by trained gerbils. Click here to see them.


Thu, 08 May 2008



Estimating the progress of queries on MySQL

    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!

    Tags for this post: mysql(S)

posted at: 04:19 | path: /mysql | permanent link to this entry
There are 2 comments on this post, and 0 comments which didn't survive moderation. 0 were blocked by trained gerbils. Click here to see them.


Blathering for Wednesday, 07 May 2008

    09:16: $10 theft cost a $250,000 spill cleanup
    09:16: " The 3,500-gallon spill of a toxic chemical into San Pablo Bay over the weekend cost an estimated $250,000 to clean up - and it was all for a lousy $10 worth of brass. The thieves who caused the spill of the chemical toluene at Reaction Products in Richmond were after the valves on holding tanks - the latest example of a crime wave involving barely precious metals that yield a few dollars at the recycling yard but can cost taxpayers big bucks."
    09:57: Professor sues own students
    09:58: "Priya Venkatesan taught English at Dartmouth College. She maintains that some of her students were so unreceptive of "French narrative theory" that it amounted to a hostile working environment. She is also readying lawsuits against her superiors, who she says papered over the harassment, as well as a confessional expose, which she promises will "name names.""
    09:58: ... I guess that's one way of retaining control in the classroom


    Tags for this post: blather(S)

posted at: 02:58 | path: /blather | permanent link to this entry
There are no comments on this post which have survived moderation. 1 posts have been culled and 0 blocked. Be the first to make a non-spam comment here, please!


Wed, 07 May 2008



The Complete Hammer's Slammers Volume 1 and 2

    It occurred to me over the weekend that it was odd that I was updating books I had recently read on a book site like goodreads, given that all I'm doing by entering data on their site is blogging someplace that not even I remember to read. I'm therefore going to move all of that stuff over to here, and then try to remember to blog about books I've read recently in the future. Don't worry though, I don't get much time to read in between work, study and kids, so it wont be too many posts.

    Dad got me these books for my birthday last year, and they were awesome. The books are about a future tank squadron which takes on mercenary jobs, none of which ever seem to be clean or simple. Along the way you end up learning that they're all just misfits who haven't managed to find any other job which is a better fit for them. Worse than that, I'm left with the impression that in the back of their minds they all realize that they're running on borrowed time. David Drake has a unique position to comment on what its like to fight in a war, given he is a Vietnam veteran. These stories are fantastic science fiction, and often leave you with a realization that war often isn't simple, or fair. I first encountered David's writing when I was a kid reading a remaindered anthology called "Battlefields Beyond Tomorrow", which was a collection of short war science fiction stories. Luckily for me 15 or so years after I first encountered them I still think they are great stories. These books are highly recommended. [isbn: 1892389738]

    Tags for this post: book(S) David_Drake(S)

posted at: 12:21 | path: /book/David_Drake | permanent link to this entry
There are no comments on this post which have survived moderation. 2 posts have been culled and 0 blocked. Be the first to make a non-spam comment here, please!


A Stainless Steel Rat is Born

    This was another book I read as a kid and had fond memories of. When I found it at Powell's books for under $4 I just had to pick it up. Harrison seems to focus on "pulp science fiction" -- all of the stuff I have seen from him has been short and easy reading, as is the case with this book. What do you do if you're stuck on a farming planet, smart, and bored out of your brain? Apparently the answer is to turn to a life of crime for entertainment. That's what James DeGriz does, and he is a great anti-hero while he's at it. Great book.

    Tags for this post: book(S) Harry_Harrison(S)

posted at: 12:19 | path: /book/Harry_Harrison | permanent link to this entry
There are no comments on this post yet. Be the first to make one.


Blathering for Tuesday, 06 May 2008

    12:57: I am RICH and I want to spend it on YOU tonight
    12:57: "I am so rich. Goodness, gracious. My, my, my. I am so, very, very wealthy. How many dollars do I have? That's a question only my team of ten fat accountants can answer, because they have golden calculators which I bought for them with my money. And what is on those golden calculators? Numbers. And those numbers equal the dollars in my bank accounts, which are huge... In my vehicles I have stored many bottles of rare, delicious wines. These wines are hundreds of years old and covered in dust and cobwebs, which means that they are the most delicious kind, and that they were grown from grapes which were so succulent and juicy that the poor grape-pickers of France wanted to eat them right then and there. But they were whipped, by my shift-leader vintner, who makes sure that the best grapes in my vineyard go only into the wine. That's right, my great grandfather, who was also rich, owned the vineyard where this wine was made. And it's really strong too, it can get you wasted quickly."
    12:57: (And so much more)
    14:37: Why is it that all ecommerce sites in Australia are terrible? Take for example Canberra Sand and Gravel. I want a quote on some sleepers, so off to http://users.tpg.com.au/csgfysh/products.html. There they have a list of the products they sell, but not the prices. So now I know what a sleeper looks like (in case I've never been in the outside world before I suppose), but still have no idea what they cost. Thanks guys.
    15:50: An automated rick roll detector. It adds a right click context menu item labelled "report as rickroll"!


    Tags for this post: blather(S)

posted at: 08:50 | path: /blather | permanent link to this entry
There are no comments on this post yet. Be the first to make one.


Tue, 06 May 2008



Blathering for Monday, 05 May 2008

posted at: 09:56 | path: /blather | permanent link to this entry
There are no comments on this post which have survived moderation. 4 posts have been culled and 0 blocked. Be the first to make a non-spam comment here, please!


Sun, 04 May 2008



A ssh quickie

    I tend to have lots of ssh tunnels running with port forwarding on my laptop. The problem with that is that there are of course different host keys for localhost then. That makes me sad. Luckily, the following config option disables host key checking for localhost:

    $ cat /home/mikal/.ssh/config 
    NoHostAuthenticationForLocalhost yes
    


    Too easy.

    Tags for this post: linux(S)

posted at: 04:38 | path: /linux | permanent link to this entry
There are no comments on this post which have survived moderation. 1 posts have been culled and 0 blocked. Be the first to make a non-spam comment here, please!


Fri, 02 May 2008



Blathering for Thursday, 01 May 2008

posted at: 13:16 | path: /blather | permanent link to this entry
There are no comments on this post which have survived moderation. 1 posts have been culled and 0 blocked. Be the first to make a non-spam comment here, please!


What packages are taking all my disk?

    I'm using Ubuntu here, but this would work on any Debian based distribution... I want to find out what packages are sucking up all the disk on my new laptop. So, I run:

    mikal@mikal-eee:~$ dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n
    


    Which will give you a list of packages sorted by size when installed. In my case, removing evolution and open office ill make a big difference to my free disk space.

    Tags for this post: linux(S) ubuntu(S)

posted at: 09:42 | path: /linux/ubuntu | permanent link to this entry
There are 2 comments on this post, and 1 comments which didn't survive moderation. 0 were blocked by trained gerbils. Click here to see them.


Thu, 01 May 2008



Blathering for Wednesday, 30 April 2008

posted at: 07:39 | path: /blather | permanent link to this entry
There are no comments on this post which have survived moderation. 1 posts have been culled and 0 blocked. Be the first to make a non-spam comment here, please!


Wed, 30 Apr 2008



Blathering for Tuesday, 29 April 2008

posted at: 10:20 | path: /blather | permanent link to this entry
There are no comments on this post which have survived moderation. 1 posts have been culled and 0 blocked. Be the first to make a non-spam comment here, please!


Tue, 29 Apr 2008



Blathering for Monday, 28 April 2008

    17:11: Pray for lower gas prices!
    17:11: "Twyman - a community organizer, church choir director and public relations consultant from the Washington, D.C., suburbs - staged a pray-in at a San Francisco Chevron station on Friday, asking God for cheaper gas. He did the same thing in the nation's Capitol on Wednesday, with volunteers from a soup kitchen joining in. Today he will lead members of an Oakland church in prayer."
    17:12: Jury in Hans Reiser trial: Oakland mother's killing deliberate even if she's missing
    17:13: "A jury this afternoon convicted computer programmer Hans Reiser of first-degree murder for killing his estranged wife, concluding that her slaying in 2006 was deliberate and premeditated even though her body was never found."


    Tags for this post: blather(S)

posted at: 10:13 | path: /blather | permanent link to this entry
There are no comments on this post yet. Be the first to make one.


Mon, 28 Apr 2008



Blathering for Sunday, 27 April 2008

    Wow, supershuttle sucks. The driver has argued with two passengers so far, and a 20 minute drive has taken an hour.

    Tags for this post: blather(S)

posted at: 16:58 | path: /blather | permanent link to this entry
There are 1 comments on this post, and 0 comments which didn't survive moderation. 1 were blocked by trained gerbils. Click here to see them.