Sunday, March 7, 2010

More exploding space shuttles

Delta 2, destroyed by range safety device


Did you know that the Space Shuttle has a (euphemistically named) range safety device? The range safety device is rather like the Enterprise's self-destruct system in Star Trek, but without the tedious countdown or opportunity to escape. There is one shaped charge on each solid booster.

There is a person called the range safety officer, whose job is to press the button to destroy the assembly if it veers off course. Imagine having that job! Bear in mind that there are almost no realistic circumstances where the solid boosters would need to be destroyed when they had already detached from the orbiter; nearly all possible applications of the range safety system would involve destroying the whole thing.

For the moment, it's only been used once; on the Challenger boosters after the orbiter had already been destroyed. Still, though, very, very creepy, especially for the operator. All manned spacecraft have range safety devices, but in most other cases either the occupants (Vostok, Gemini, Buran) or the whole capsule (Mercury, Apollo, Soyuz) will have been removed to safety beforehand. Besides the Shuttle, Voshkod, only used four times, is the only one where the range safety officer is likely to have to blow up people; you'd wonder how they get people for these jobs...

Saturday, March 6, 2010

Rails, from the perspective of a Twitter developer

From an interview with a Twitter developer:

Once you hit a certain threshold of traffic, either you need to strip out all the costly neat stuff that Rails does for you (RJS, ActiveRecord, ActiveSupport, etc.) or move the slow parts of your application out of Rails, or both.It’s also worth mentioning that there shouldn’t be doubt in anybody’s mind at this point that Ruby itself is slow.
Oh, dear.

Mongrel on MacOS Snow Leopard - quick tip

I do a lot of Ruby on Rails at work these days. This weekend, I'm getting some stuff done from home, so I tried to run a Rails app on my laptop... And it stalled/hanged indefinitely, using the processor flat out.

It turns out that I hadn't used it since I upgraded to Snow Leopard. This seemingly broke the installation a bit. Initially I tried just removing the offending gem (sudo gem uninstall mongrel), but when I re-installed it, the problem persisted.

Eventual solution:

sudo gem uninstall mongrel
sudo gem uninstall fastthread
sudo gem install mongrel

It turns out that the fastthread library I had installed was the problem; I suspect that it was trying to load 32bit native code into my 64bit ruby.

Anyway, hope this is helpful to someone.

Thursday, March 4, 2010

Verity Stob on Lisp

From a Verity Stob article on exception handling:

I apologise in advance to the industry’s senior commentator for not covering Scheme or other Lisp dialects and, thus, continuing the tendency to dumb down. This does not mean that I fail to recognise that Lisp is still #1 for key algorithmic techniques such as recursion and condescension. It just means that I have no idea how, or indeed if, Lisp handles exceptions.

It does, by the way, assuming Common Lisp. It is slightly peculiar, as is the CL custom.

Reeder iPhone feed-reader mini-review

I'm a big fan of RSS (well, generally Atom, these days...) feeds, especially on the move. Brilliant for passing boring train journeys and so on.

Until recently, I've been using Google Reader for my mobile feed reading needs.

Mobile Photo 4 Mar 2010 00 54 39.jpg


It's quite nice, but has a few quirks. It can be slow to load on a not-so-fast connection, especially EDGE, and navigation is slightly slow and clunky. And then, of course, if you're reading an article and click a link, it'll open a new browser window. This is generally fine, but if the new page happens to have lots of graphics, it'll tend to push Reader out of memory, causing it to reload disconcertingly upon return, losing my place in the article, and hiding it; after all, I looked at it, so it's read now! And, well, it just doesn't have that native feel.

I tried NetNewsWire for the iPhone, as I'd been pretty impressed with it on the desktop. It's generally nice, but slow, slow, slow. The UI is slow, syncing with Google Reader is slow (though the author is doing something about this), and, unfortunately, this just makes it too much of a pain to use. It's probably fine on a 3GS, but I still have a lowly 3G.

Enter Reeder. Reeder is in principle very much the same sort of thing as NetNewsWire; it's a phone-based client which syncs with Google Reader. The difference is, that where NetNewsWire is, on my older device, unusably slow, Reeder is perfectly fast and pleasant to use.

Mobile Photo 4 Mar 2010 00 51 50.jpg


There are some quirks:

Mobile Photo 4 Mar 2010 00 51 58.jpg


Note the thing at the top, where, by rights, the clock and network status things should live. This goes away when syncing is done, but it's very odd, and I can't help feeling that the traditional little spinning wheel would have been better. Speaking of the wheel, this is about the only iPhone app I have seen which uses the network where that wheel doesn't put in an appearance; I was actually under the impression that a progress indicator of some sort was mandatory under the HIG, but Reeder doesn't use one when loading inline images, so presumably it must be allowed. Personally, I miss it.

Here's another oddity.

Mobile Photo 4 Mar 2010 00 51 18.jpg


This is a webpage in the inevitable built-in browser. Now, the builtin browser is in many ways a good thing, as it saves you from having to go out to Mobile Safari, and come back again. This is why so many comms apps have it. This looks exactly like the browser in Meebo, Tweetie and countless other apps; it's just a UIWebView with some controls. But there's a difference. Note the button on the bottom right. In every other arrangement like this I've seen, that jumps out to Safari. Here...

Mobile Photo 4 Mar 2010 00 51 30.jpg


It opens up a little window which allows you to share the link on Twitter, save it on various services, and so on. This is all very well, but sometimes I just want to see it in a proper browser; if nothing else UIWebViews embedded in apps can be slow, presumably due to memory starvation, and besides, it's sometimes nice to have multiple browser windows. You can't do that here. You can, if you like, copy the link before you go to it, by holding down on it; you can then paste it in Mobile Safari. This seems overly awkward, though, and it's not like there isn't space for a button to open Safari on that view.

On a similar topic, what happens if you close the app while half-way through reading an item? In some apps, when you come back, the item will still be there; Apple recommends this approach where practical. This is even the case with the Google Reader webapp, as long as Safari doesn't take it into its head to kick it out of memory in the meantime. Here, however, you're back to the home screen, and, of course, because you looked at it, the feed item is deemed read, and is gone.

I sound like I'm complaining a lot, but really, this is a brilliant app, one of the best I've seen. It's certainly now my feedreader of choice. It's just that a few little touches could make it so much better...

Dictator of the month club

Did you know that a certain section of the American right wing openly expresses admiration for Pinochet? Not just 'oh, well, at least he wasn't as bad as Hitler', but actual admiration?

Really, truly, disturbing.

In this morning’s Wall Street Journal, Bret Stevens attributes the low rate of death after the Chilean quake to Augusto Pinochet and Milton Friedman

Ah, yes. Low rate of death and Pinochet. Perhaps a principle of conservation of murder is in play, to make up for all of those people he killed during his rule?

I mean, what's next? Low death toll in German snow storms attributed to the sterling work done by Adolf Hitler, Albert Speer, and thirty million slave labourers?

Incidentally, the Chilean building codes, which required buildings to be earthquake-averse, predate Pinochet. And here's Paul Krugman on just how exactly Pinochet and Friedman caused a boom, a mere fifteen years after starting fucking with the economy.

And that's not all! An admittedly smaller portion of the US right wing actually expressed some guarded enthusiasm for Franco. As in the Fascist dictator of Spain.

Wednesday, March 3, 2010

iPads of Dune

Dune was a very good science fiction series by Frank Herbert, later ruined by his son and a guy who writes Star Wars novels in a series of dubious prequels. The original book centred around an unobtainium called 'the spice', which was necessary for interstellar travel and such. Later on, things went off in a different direction a bit but this remained quite important.

In the early 90s, Cryo made a computer game based (loosely) on the book. It was groundbreaking in a number of ways; it was amongst the first resource (spice, of course) management games, giving rise to Dune II and ultimately Command and Conquer; it was also one of the first games to feature speech throughout. And that requirement for speech lead to something interesting. The first versions (for Amiga and PC) didn't have speech, and, of course, it being a resource management game, numbers sometimes came up. The designers managed this by just showing the numbers in the on-screen speech bubbles. Of course, once they had speech, they didn't have the bubbles, just subtitles, saying the same thing as the voiceover. So:


An iPad!


As you can see, the emperor skimped on his gadget budget, and got something with a smal screen and keyboard, probably running Windows Mobile.

ATM Usability

ATMs are probably the one piece of information technology that no-one, no matter how technophobic, can really avoid using from time to time. This is a shame, as they have perhaps the worst user interfaces on offer in anything designed to be used by the general public.

You put in your card, and wait for a while; give it time to wake up. Select the language; has anyone ever selected Irish? Do they even have an Irish UI translation, or is the option just there for show? Select the amount of money. Enter pin. Marvel at the screen informing you that this machine only does multiples of fifty euro, and the maximum withdrawal is 120 (I have actually seen this). Wait, while machine slowly ejects card. Attempt to re-insert card, and discover that the contraption prefers a few moments to think between transactions, even if they are transactions that it has rejected out of hand. Re-insert card, and continue.

Perhaps you would quite like a receipt, but it's not the end of the world if you can't have one? Select the option for having a receipt, go through above process, receive the message that the machine doesn't have any paper for receipt, throw card away in frustration.

Both of these things are very easy to fix, by simply telling the user of the relevant restrictions beforehand, or, in the case of the first, allowing a new transaction without rejecting the card. You might say that this is not allowed for security reasons, but you would apparently be wrong; a few machines do tell you beforehand, and many machines allow you to opt for a second transaction after successfully receiving cash... but not after being rejected due to choosing something which can't be made up with fifty euro notes, even though that would be rather more useful. The receipt thing is clearly pure perversity. Oh, and to add insult to injury, it will show you ads for undesirable mortgages.

The worst of it is, when the new UIs come, they will inevitably be worse, not better. You know those ticket machines in railway stations and LUAS stops? The ones where you generally have to stab the screen vigorously to get any response, especially if the train is about to leave? The ones which, after you've gone through the whole process, will occasionally decide that they're not accepting some, or in some cases any, payment methods today? It will be just like that. Only with a more annoying voiceover.

Still, it could be worse. ATMs are free here, of course, but apparently in the US they often add a service charge. Imagine! Pay extra, to be insulted by a machine!

Monday, March 1, 2010

On Shuttle explosions

The US has just scrapped its return to moon plans, on the basis, more or less, that there simply isn't enough money. Said plans will be replaced with rather fluffy initiatives aimed at funding private space launch facilities, and developing a super-heavy lifter and an orbital tug. 

Interestingly, a contract is to be awarded to develop a 'hydrocarbon' (so, in practice, kerosene) engine for the lifter, with performance equal to or better than that of the RD-180, a Soviet/Russian engine used in the US Atlas V rocket and derived from the RD-170 used in the Energia super-heavy lifter. The American company P&W has the rights to manufacture these, though it doesn't currently exercise them; Atlas V engines are made in Moscow. Until quite recently it was planned that it would by 2011, though. The two front-runners for this contract are apparently SpaceX, which has already developed a kerosene engine (though one of considerably lower performance than the RD-180) for its Falcon 9 rocket, and... P&W. Somehow, I suspect that the contract money will be spent in printing a 'this is definitely not an RD-180, goodness no!' sticker. I can't help wondering whether it mightn't be more cost effective to just build the RD-180s, or, if better performance is required, license the RD-170 or 171 (used in Zenit launchers), or the newer RD-190.

Anyway, this isn't the first time the US space programme has ground abruptly to a halt. There have been at least two, and arguably three, previous incidents. The first was the Apollo to Shuttle transition, when the US lost manned capabilities for some time. The second was the Challenger disaster, when the Western world lost all space launch abilities briefly; the Shuttle was grounded, a Titan and an Atlas had recently exploded, grounding both vehicles, and an Ariane 2 had also recently failed and been remotely destroyed, grounding that. The third was the Columbia disaster, which grounded the Shuttle for some time; it had a lesser effect on overall capacity, because most payloads had by then shifted to launching on Atlas or Deltas, or European Arianes or Russian Protons or Ukrainian Zenits; to a large extent the collapse of the Soviet Union saved the commercial space industry, there.

The Challenger failure was particularly interesting; the Shuttle was being operated at an unprecedented frequency, and NASA wasn't being as careful as it might have been. Here's Richard Feynman's appendix to the official report on the matter; it's fascinating and if you haven't already seen it you really should take a look. Amongst other gems, we learn that NASA management thought that the chances of catestrophic failure of the whole stack was 1 in 100,000, and that, while the solid boosters, in testing, had a failure rate of 1 in 25, each, that didn't matter because the Shuttle was a manned vehicle, and thus "the probability of mission success is necessarily very close to 1.0". Getting cause and effect mixed up there a bit, I feel. Boggles the mind, really.

I wonder have things improved, at all?

Wednesday, February 24, 2010

Space Toilet!


It's a space toilet! From NPP Zvezda's online catalogue! They're the company who make the space toilets, you see.

I just love that they have an online catalogue, in case someone should want to buy a space toilet.


And then there's, well, this.

They even have a jobs page, though sadly it's in Russian, so it's not clear whether the jobs involve testing the toilet/ejection seat.