AWS and Ruby

The book of the moment is James Murty’s “Programming Amazon Web Services: S3, EC2, SQS, FPS, and SimpleDB”. It’s a really nicely-written introduction and tutorial for our utility computing services, with plenty of sample code that just works. Highly recommended.
Murty chose to write his examples in Ruby, which pushed one of my buttons. I have a love-hate relationship with Ruby, and it’s getting to the point where I’d love to find an alternative ((And that doesn’t include PHP or Python, or even Groovy.)). On the one hand, Ruby offers Smalltalk with instant gratification. On the other, we have a syntax replete with ad hoc short-cuts, looping constructs with inconsistent scope rules, and ASCII rather than UTF-8.
My friend Jon Irving agreed:

Hahah, yes – I love it, although the things which I love are the
things that make it horrific for any large app. Re-opening class defs,
awesome, except when you’re trying to find where a method is defined.
Monkey-patching, awesome, except when you suddenly find that for *no
perceptible reason* a core API has been changed by some library you’re
using.
And rails, oh rails. What is this “thread safety” of which you speak?
Srsly, it’s like it’s 1995 all over again. But much prettier, and this
time smalltalk won!

Writing Ruby is great fun; reading someone else’s Ruby application (particularly anything substantial) is deeply frustrating. In other words, Ruby is a candidate write-only language. And that’s a shame.

File under "Spin cycle"

From Juan Cole, we get various perspectives on the recent upsurge in violence in Iraq. First, John McCain:

Republican presidential hopeful John McCain said Sunday that Iraq’s military performed “pretty well” in its recent Basra assault despite the “mixed” results of the battle… “Overall, the Iraqi military performed pretty well… eight or nine months ago, it would have been unthinkable.”

But from those on the spot….

Stephen Farrell and James Glanz of the New York Times estimate that at least 1,000 Iraqi soldiers and policemen, or more than 4% of the force sent into Basra, “abandoned their posts” during the fighting, including “dozens of officers” and “at least two senior field commanders.”
Other pieces offer even more devastating numbers. For instance, Sudarsan Raghavan and Ernesto Londoño of the Washington Post suggest that perhaps 30% of government troops had “abandoned the fight before a cease-fire was reached.” Tina Susman of the Los Angeles Times offers 50% as an estimate for police desertions in the midst of battle in Baghdad’s vast Sadr City slum, a stronghold of cleric Muqtada al-Sadr’s Mahdi Army militia.
In other words, after years of intensive training by American advisors and an investment of $22 billion dollars, U.S. military spokesmen are once again left trying to put the best face on a strategic disaster

40 years ago today: RIP Jim Clark

Jim Clark was the perfect driver. Double F1 world champion. First Brit to win the Indy 500. There were fewer Grands Prix per year back in the 1960s, but he always had to be racing – if not in Formula 1, then Formula 2, or thrashing a Lotus Cortina around in the British Touring Car series. I was 13 when Jim Clark won his first World Championship, and 17 when he died. Motor racing was a really dangerous game: every year we lost one or two drivers. But not Jim Clark: heros are meant to be immortal….

Seattle Sculpture Park

I spend this afternoon exploring Seattle’s Sculpture Park. Sculptures in the Park.It was cool and cloudy, but the rain held off; however we could see that it was raining over in West Seattle.
The range of scales, textures, colours, and styles was impressive. I’ve uploaded some pictures to the gallery.
I may go back in the summer, to see if how the pieces look different in the sun.

Upgraded to WordPress 2.5, and a rant

I just upgraded geoffarnold.com to use WordPress 2.5. The process went pretty smoothly; the only glitch was that the mobileadmin plugin that I was using isn’t 2.5-compatible. I shall have to see if there’s a new version available… hmmm, it looks as if the answer is no.
The most noticeable change with 2.5 is that the administrative UI has been entirely revamped. OK, I agree that it looks more stylish, but I’m pretty disappointed. In particular, the Write Post page (which I’m using to compose this piece) is poorly laid out. Ideally I want the basic elements to be easy to use: the text editor, the Categories panel, and the Save, Preview, and Publish buttons. These are the features that I use every time; other stuff, like the status, tags, posting time, and so forth should go below the fold, out of the way. If there’s space available, give me a bigger edit box, not swatches of colour to tastefully highlight controls that I rarely use.
This seems to be turning into a rant. So be it. Take a look at this gratuitous waste of screen real-estate:
Menu structure of new WordPress composition page
This is the upper left quadrant of the screen in which I’m composing this post. It starts with a grey stripe which only serves to provide a link back to the first admin page, the Dashboard. No, wait, it also lets me log out, visit the WordPress site, or visit my own sub-page in the Users area.
Secondly we have the blog name, and a Visit Site button. People managing multiple blogs might need this; I’d rather banish the Visit Blog link to the grey stripe and lose the big title, with the wasted space next to it.
Then we have the menu/submenu structure. This is fine, except that I don’t see why some menu items are banished to the right side of the screen in small font. It’s a single menu; keep it together.
Next we have Write Post in a big font. I know I’m writing a post: the words Write and Post are helpfully shown in orange just above. Again, a waste of space.
Then we have a header for the Title box, and finally we actually have some content, about a third of the way down the window. For some reason, the title text is about twice as large as the body text. It doesn’t need to be.
Let me show you the full window that I’m working with:
Full blog entry composition window
(Click the thumbnail to see the full-size image.) As you can see, the text box in which I compose and edit the actual blog entry is about 30% of the height and 60% of the width of the screen. ((These are the dimensions on my PowerBook, with a 1280×854 screen)) And this is all wrong!! The point of a Write Post screen is to write. As much real-estate as possible should be given over to this function; the few essential controls should be kept small (but clear); everything else should be swept out of the way.
Fortunately, WordPress is open source, so I’m going to be able to redesign this page the way I think it ought to look.
UPDATE: I guess I’m not the only person who dislikes the new admin UI. My rant is pretty mild compared with some of the comments here in the WP forums.

It's not from me… honest!

It happens every few years, and it’s happening again right now. A bunch of spambots are spewing forth thousands of emails about fake Gucci handbags, and each message has my email address in the “From:” field. The result: I’ve been receiving hundreds of mailer “bounce” messages for the last few days, filling my inbox and confusing my spam filters. There’s nothing to be done about this; I must just wait for it to subside. Last time I seem to remember that it took a couple of weeks. The ever-present worry, of course, is that some spam filtering system will decide that my email address is toxic, and starts blocking my legitimate emails. E-fingers crossed….

Clue: The Vicar, in the Living Room, with a Time Capsule!

With help from The Vicar, here and here, I was able to get the Time Capsule up and running. I elected to create a brand new WPA2 network, using the TC as the router; my old (non-“n”) Airport Express is now sitting next to the HP printer/scanner, acting as a print server. I used the Vicar’s trick of doing the initial TC configuration via an Ethernet link between my PowerBook and the TC, but I still had plenty of other hoops to jump through. In several places, it wasn’t sufficient to click “Renew DHCP”; I had to actually power cycle the cable modem to get things straightened out.
Never mind; it’s all working now. But no thanks to Apple; their supposedly “plug and play” configuration software was a disaster. I know that the number of permutations that they have to deal with is mind-boggling, including a gazillion non-Apple devices, but even so they botched this one. I was trying one of the simplest use-cases – adding a Time Capsule to an existing all-Apple network – and they couldn’t even get this right. Apple has demonstrated in the past that it was willing to hold up a product until the quality (hardware, software and documentation) was good enough; in this case, they failed to exhibit the necessary courage. (Time to re-read the “Evil/Genius” article in Wired.)
And now I have to update the configuration of all of my WiFi client devices. I just did my iPhone; next up is the Nintendo Wii….. Thanks, Vicar!

New Mac update (in brief)

  1. The MBA continues to delight. The keyboard is the best I’ve used in years.
  2. My PowerBook suddenly came back to life. Sigh….
  3. The Time Capsule is a great disappointment. I set it up, and before I could actually use it, the Airport Utility suggested that I should upgrade the firmware from 7.3 to 7.3.1. ((Why such high numbers for a new product? Apparently it shares firmware builds with other Airport base stations.))I did, and the box hasn’t worked since then; the status light just blinks. From the support discussions on the Apple website, it seems that this is a common problem, and quite a few people have simply returned them. I’m going to try one more configuration (making it the only access point on the network, rather than adding it to an existing network); if that doesn’t work, I’ll be demanding a refund.

Got the MacBook Air

I received lots of advice from blog readers, friends, and colleagues at Amazon about the choice of a new laptop, and the general consensus was:

  1. The MacBook Air is the way to go, unless you’re doing serious video work or game-playing.
  2. Getting iTunes set up on a network drive is a royal pain, but it’s doable.

So last night I went over to the Apple store in Bellevue, and bought a MacBook Air, plus a 1TB Time Capsule and a few accessories (like a spare power adapter). I didn’t get an external DVD/CD, figuring that I could use my PowerBook as a remote drive. After all, the PowerBook seemed to have given up its bad habits, and hadn’t failed in weeks…
When I got home, I unpacked the MBA and went online. When I was sure that it was working well, I went to set up the PowerBook as a remote drive. During this process, I had to reboot the PowerBook… and it never came back. I went through all the variations, resetting the PMU and powering up with battery but no power, power but no battery, and both power and battery. Nothing worked. I left it overnight, tried again this morning, and it still won’t start. So it looks as if I can finally take it in to be fixed under AppleCare.
Recovering my files from the PowerBook shouldn’t be an issue: I have a full Time Machine backup on a USB drive. One minor annoyance is that the MBA installation CD is still in the PowerBook, so I can’t use it to set up another computer as a remote drive! (Remember when CD drives used to have eject buttons?) It’s not urgent, but I want to install the copy of iWork that I bought.
I haven’t set up the Time Capsule yet; that’s a weekend project. Do I set up a new 802.11n network, or simply extend my existing 802.11g one? Would I actually get “n” speeds, anyway: what do my other devices (Nintendo Wii, iPhone, OLPC XO, PSP) use? Does the Time Capsule go in the living room, next to the cable modem? If so, I can’t use it to provide network access to my printer. Details, details.
Meanwhile, the MBA is gorgeous. This is the first LED-lit screen I’ve used, and the clarity and uniformity are outstanding. One thing that I didn’t expect is that the keyboard feels much crisper than my work-supplied “Black Beauty” MacBook.