Book Review, 2009 H1

July 2nd, 2009

Quick round-up/review of the books I’ve read this first half of the year.

Mars Trilogy, Kim Stanley Robinson

Red Mars
Green Mars
Blue Mars

Interesting thoughts on colonization of Mars, longevity treatments and the eventual conflicts between the ancestral and new homes of humanity. I recommend reading them all back-to-back as the characters and story pick up in the next books right where they left off. The books can occasionally get a little dry, but it’s a good, inspiring read if you enjoy stories about politics and terraforming. Overall, more of a story for hardcore sci-fi lovers – not something you’ll want to dabble in. If you’re less of a committed sci-fi fan but interested in a good colonization story, The Moon Is a Harsh Mistress might be a better place to start.

Spook Country, William Gibson

Spook Country

An approximate sequel to Pattern Recognition, at least from the involvement of Hubertus Bigend and his Blue Ant company. Interesting characters and plotlines: he weaves together three major characters, all are very believable and well-developed. Mostly follows the story of a former-rock-star, Hollis Henry, writing for Bigend’s virtual Wired-clone magazine, Node, an anti-anxiety-addict named Milgram and Tito, a cuban teenager. Light book overall, enjoyed it.

Zoe’s Tale, John Scalzi

Zoe’s Tale

I got this one in PDF format as part of my 2009 Hugo Awards Voter’s packet. I haven’t read anything else in the series, but this was entertaining. It’s an alternate point of view (Ender’s shadow style) to another one of John Scalzi’s books, The Last Colony. The book is written from the point of view of a colonist couple’s daughter, Zoe. Since I hadn’t read the first book that this book complimented, I felt like the book was too light – too much was missing. At some point I hope to pick up the other book and see if the having the pair makes more sense together.

Revelation Space, Alastair Reynolds

Revelation Space

Out the the books in this entry, this was by far my favorite. Deep and engrossing, along the lines of Hyperion. Follows a post-plague human culture set in the far-future, with lots of high-technology and a galaxy full of dead alien races. Begins with an archeological dig of an alien race wiped out in a solar event 990,000 years prior. Lots of hints of a bigger universe, though much of the details seem to be left for sequels. Falls apart a little near the end, but I’m excited to read the next books in the series.

Next on my reading list:

Fantastic Rainbow in Calgary #yyc

July 1st, 2009

Check out the double rainbow from today’s weather. Fantastic!

Windows 7 Experience

July 1st, 2009

I spent the last few days shoehorning Windows 7 into one of the laptops I’ve got around the house. My day-to-day desktop for development is a MacBook Pro, but I spend some time testing on Windows. I haven’t had a chance to update my Windows knowledge from where I left it at the XP level, so I figured it would be a good time to give Vista’s successor a shot.

The laptop I’m upgrading is old, but not so old that it’s obsolete. It’s a Gateway MX7337 with a 3.0GHz P4 (back when Hyperthreading, rather than multi-core was the rage!). It’s got a reasonable 1GB of RAM, enough that a basic Linux desktop would fly and development isn’t impossible. In fact, I did all of the Windows development for Stumbleupon’s IE toolbar on this machine!

The install

My experience begins a few days ago, shortly after we signed up for BizSpark. I downloaded their Windows 7 RC ISO and burnt it to a DVD. Popping it into the laptop resulted in the most pleasant Windows install I’ve encountered.

I’ll digress for a short moment here. I’ve been installing operating systems for a while now and Windows has always had the worst experience. I was very surprised when Microsoft decided to launch XP with the old Windows-NT text-mode installer. For the last few years I’ve been installing Fedora boxes with the pretty VESA-based Anaconda, while every XP machine I boot up starts off with the classic blue-screen of installation and “Press F6 to load drivers”.

There’s not much to say about Windows 7’s installation. It was fast, pretty and over with before I could really think about it.

Hardware

My biggest concern before I started down the Windows 7 path was hardware support. The Gateway laptop was a pain to get working under Windows XP. It uses bog-standard Broadcom wireless drivers which, for some strange reason, Microsoft never supported off its XP install disks. This always left me with an XP machine unable to connect to the internet, having to use either a burnt DVD or a USB key to port over Gateway’s poorly packaged driver bundles.

Windows 7 surprised me here. With the exception of the sound hardware, everything worked out of the box. This is a pretty big improvement over XP on this particular laptop, though I can’t vouch for the experience of a user with newer, potentially unsupported out-of-the-box hardware. The graphics were a bit disappointing, since Intel’s “extreme” laptop chipset (852GME) was only supported by Windows’s default VESA modes.

… And Hardware Issues

The sound hardware was a mystery. The drivers were installed, device manager said everything was OK, but nothing was coming out of the laptop’s speakers. I eventually found some forum posts that suggested I try a set of Vista drivers — from a different manufacturer. That did the trick!

My next task was attempting to get graphics working at a level beyond basic VESA support. This was a lot trickier, since Intel’s last driver update was in 2006 and the fact that there was never an official driver release. I ended up using the device manager’s ability to install legacy drivers and pointing it at the latest driver release from Intel. A forum post suggested the following convoluted, but successful workaround:

1. Remove all previous installtions of hardware (just keep vistas std vga).
2. DLD the latest drivers from intel and extract to hardrive.
3. in device manager go to Action – Add legacy hardware.
4. Select device manually. (If the 82852/82855 GM/GME doesnt show in the list of display drivers, then you need to point to the directory where you extracted the drivers)
5. THIS IS THE IMPOTANT [sic] STEP. Dont select 82852/82855 GM/GME from the list of drivers, select the 945GM driver. It will install and you will need to reboot.

It took me a few times to get that working, and I ended up with two 82852/82855 display adapters in the device manager. While the drivers are somewhat faster for general use, they are still too old to support Aero. I can’t believe that worked!

Bonjour Printing (no pun intended)

The final part of the adventure dealt with trying to set up my Bonjour-available printers. I had installed iTunes on the laptop previously, which usually installs the Bonjour software and the Bonjour Printer Wizard. In this case, however, the printer wizard was missing. I had to uninstall and reinstall the software to make this available.

Once the wizard was ready to go, it found the two printers on the network. When I selected the printers I was confused – it couldn’t find the appropriate drivers for either of them. It turns out that Windows 7 doesn’t ship with the whole gamut of printer support on the installation disk like XP did. Instead, you need to either download the drivers directly from catalog.update.microsoft.com (thanks to @herkyjerky for the tip), or use the workaround that I did: setting up a fake printer on LPT1 with the correct drivers (which are pulled from Windows Update automatically), then deleting the printer and letting the Bonjour wizard add it.

Conclusions

Overall, I’m happy with the Windows 7 experience on this older machine. It certainly boots faster (fresh install notwithstanding) and it feels less clunky than XP on the same machine did.

The whole configuration experience is pretty overwhelming. Most of the options have moved since XP. Thankfully, the search available in the start menu is able to find most of the settings that I couldn’t find myself: showing file extensions and hidden files, for example.

UAC is a new beast for me. It’s somewhat annoying, but as long as you are a member of the local Administrators group you can just keep clicking “Yes” to its prompts. If you aren’t part of the admin group, you’ll need to enter the username and password of the admin every time you want to perform an admin-level task. If Microsoft had provided a way to remember the admin credentials for a short period of time, I’d probably run as a regular user rather than an Administrator (thanks for @liltude for some UAC tips!). Quick tip: if you get frustrated with entering your admin credentials for all the prompts and add yourself to the Administrators group, don’t forget to log out. If you don’t, you’ll still have your old “standard user” token and UAC will keep prompting you for a username/password!

Pixel Qi – Revolutionary Screen Design

June 7th, 2009

I’ve been following the story of Pixel Qi for some time.  I bought an OLPC during the first G1G1 event and I’ve been impressed with the screen’s visibility and low-cost construction.  On top of that, it can turn into a black-and-white, e-ink-like screen with minimal power draw using the same individual pixels it uses for color display, but at 3x the resolution.

Check out the comparison between the Kindle’s e-ink screen, a regular laptop and the new 3Qi screen below. I’ve always been somewhat irritated by the inverted flash of most ebook readers – probably the reason I’ve been avoiding buying them for the last few years. An interesting factoid from the video: some touchscreen technologies can absorb 50% of your screen’s brightness!

(via techvideoblog)

UPDATE: I just found an interesting video on OLPC News, saying that “… the new Pixel [Qi] screen has actually evolved past the OLPC screen, to the point where it is not longer even using the XO laptop display technology.”

Welcome to Calgary

April 23rd, 2009

April showers? Ha!

Taken outside my driveway:

Update: getting heavier now, near white-out at times.  Another shot from the Apple iBlurryCamPhone:

Digg’s optimized data streams

April 22nd, 2009

Digg just released a prototype of their optimized data streams.  This this is pretty cool.  It uses MIME multipart HTTP responses to return a stream of responses, dispatching each one as it comes in.  Bugzilla has been using MIME multipart for a while, though only to serve a short “Bugzilla is searching for your bugs” message before returning the actual results.

I’m still digging through it but it looks like a great way to deal with large numbers of resources at pageload time.  As an example, you can batch 50 individual profile images in a single HTTP connection roundtrip to populate your frontpage, versus having to serve 50 individual images, or having to manually stitch them into a single image on the server side.

Assuming you can scale it well on the server, you could potentially multiplex a few long-running API calls on a single stream as well.  As each one is ready, you could then throw it down the pipe and deal with it on the client.

The concept is cool.  There are some limitations obviously, but it’s a fantastic way to deal with bulk data transfer.

More at ReadWriteWeb and Digg the Blog.

The Evolution of a Web Technology

April 21st, 2009
  1. Obscurity
  2. Relative obscurity
  3. Robert Scoble gets it
  4. The ?-erati get it
  5. The SEO and marketing “experts” abuse it and annoy everyone
  6. Oprah ?s on her show
  7. Soccer moms and your grandma try ?ing
  8. Charmin Ultra-Soft becomes your friend on ?
  9. Someone in the ? space gets bought
  10. Time passes
  11. Robert Scoble declares that ? is dead

:)

Oracle buys Sun (but really MySQL and Java)

April 20th, 2009

The news that Oracle bought Sun caught me off guard.  I was moderately disappointed when they were courting IBM as a suitor, but I would have been more than happy if they had gone through with the deal.  IBM understands open-source and has a proven track record in Eclipse.

The best case scenario for Java would have been a acquisition by  or a merger with RedHat, though that would be very unlikely considering the size of RedHat itself – Sun is almost four times bigger than RedHat.  Out of some of the big software names large enough to buy and aggregate Sun’s high-end open-source assets, Google would have been a great choice.  They have shown a great deal of leadership in the open-source community.  We would have seen a vibrant community spring up out of this – consider how well the large GWT open-source projects are run.

So, what does the future hold for Java now?  I can’t tell, but the I think the best case is status quo for now.  I hope that Oracle spins Java off into its own, independent organization in the future.

If it comes down to it, the community will route around any damage.  It started down that path once before with Classpath and Apache Harmony, but those didn’t turn out to be necessary at the time.  Who knows – maybe Oracle will change through this whole process?  I’m not holding my breath, however.  :)

The final word on Google Eclipse plugin OSX crashes

April 19th, 2009

I’ve blogged about the subject of GWT JVM crashes far too much (here and here).  This is, I hope, the final word on the subject.  I spent some time disassembling the Google Eclipse plugin (did I agree not to do that in one of the EULAs? ;) ) and discovered that they are launching the JVM without using the Eclipse infrastructure.  This means that the JVM arguments are effectively hardcoded, except in one case where -startOnFirstThread is passed for OSX clients.  For those interested, the buggy classes of note are GWTDeploymentParticipant and LaunchUtils.

I posted a note on the contributor’s list and received a response from a Googler suggesting that I wrap my Java executable in a shell script.  Not one to shy away from wrapping system executables with scripts, I decided to give it a shot tonight.  My first shell script attempt was a disaster (dear lazyweb: how can you get bash to respect quoted spaces when using $@?), so I gave it a whack in Python.

This is tested and somewhat guaranteed to work for JVM 1.6 under OSX:

cd /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin
sudo mv java java_wrapped
sudo nano java

And the script:

#!/usr/bin/env python
import sys
import os

print sys.argv
cmd = os.path.dirname(sys.argv[0]) + '/java_wrapped'

args = ['',
        '-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith',
        '-XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding,<init>',
        '-XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding,<init>']

args.extend(sys.argv[1:])

print cmd
print args
print ""

os.execv(cmd, args)

If you have any suggestions on how to improve my Python, I’d be glad to hear them in the comments.

UPDATE: Thanks to Vitali, I got a bash script working as well:

#!/bin/bash
`dirname $0`/java_wrapped \
        "-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith" \
        "-XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding,<init>" \
        "-XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding,<init>" \
        "$@"

AppEngine+Java+OSX “Invalid memory access” on deploy

April 17th, 2009

UPDATE, Apr 19 2009: This does not fix all compiler crashes in Eclipse.  This is only useful for the compiler crashes where an Eclipse JVM configuration is used.  Please see my later blog post for a better fix and disregard this information.

This is the same error I hit before (see my earlier post), but it happens in Eclipse during the “deploy to AppEngine” phase.  You’ll see it if you’ve got a project configured with a 1.6 JVM on the build path (even if your .class compatibility is set to 1.5).  It’s not obvious how to fix this at first glance – I had to dig around to find the options that Eclipse passes to the JVM.

The solution

You can fix it by adding the same compiler workarounds we explored before to your JVM default arguments.  IMPORTANT NOTE: Add the args to all of your 1.6 level installed JVMs.  I’ve found that Eclipse doesn’t always choose the selected one if there’s an equivalent also installed (ie: it may use your ‘1.6′ JVM if you have ‘1.6.0′ selected).

-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith -XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding,<init> -XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding,<init>

Add them to your JVMs under Preferences > Java > Installed JREs by clicking the edit button and filling out “Default VM Arguments”:

jvm-args-to-fix-crash

An example of where to place the arguments