# A sad day in the fight against climate change

Apparently Better Place is preparing for bankruptcy. I wrote an optimistic post about Better Place years ago, when they were just about to launch. They created a swappable battery system for electric cars along with corresponding battery swap stations. In my opinion, these were the most credible cure to range anxiety for electric vehicles. Batteries take a long time to charge, even on Tesla's Supercharger stations, which they ludicrously refer to as "super-quick" just because they can give you half a charge in half an hour. A swap in Better Place's stations took two minutes.

Adoption of electric vehicles will remain minuscule until the range problem can be fixed. With transport accounting for about 20% of CO2 emissions worldwide, significant EV adoption would be a massive boon to the fight against climate change. And with Better Place out of the picture, that goal became just a little bit less real.

# Apparently I'm the only one excited about Sony's new big e-ink tablet

Both The Verge and Techcrunch are quite negative about Sony's big new device... So much so that they compelled me to write this post. Someone should give Sony some positive coverage! I think it's an excellent idea, and if Sony needs some enthusiastic testers down under, they should send this thing my way. ;)

For those of you that haven't seen it, Sony's new device is dubbed "e-paper", has a roomy 13.3" e-ink-like display, and you can write on said display with the included stylus.

Both of the above publications seem to think that everything is fine in tablet-land and that the iPad and company already serve whatever need Sony's new tablet tries to fill. Well, I'm here to tell them that the iPad (et al) sucks for some things. Three of those are: (1) taking handwritten notes,  (2) reading (some) pdfs in full-page view, and (3) reading in full daylight. By the sound of it, Sony's new tablet will excel at all three, and that has me excited.

After typing "up, enter" more times than I care to admit, I decided to figure out the automatic way. Here's my bash one-liner to get automatic download resume in curl:

export ec=18; while [ $ec -eq 18 ]; do /usr/bin/curl -O -C - "http://www.example.com/a-big-archive.zip"; export ec=$?; done 

Explanation: the exit code curl chucks when a download is interrupted is 18, and $? gives you the exit code of the last command in bash. So, while the exit code is 18, keep trying to download the file, maintaining the filename (-O) and resuming where the previous download left off (-C). Update: As Jan points out in the comments, depending what is going wrong with the download, your error code may be different. Just change "18" to whatever error you're seeing to get it to work for you! (If you're feeling adventurous, you could change the condition to while [$ec -ne 0 ], but that feels like using a bare except in Python, which is bad. ;)

# h5cat: quickly preview HDF5 file contents from the command-line

As a first attempt at writing actually useful blog posts, I'll publicise a small Python script I wrote to peek inside HDF5 files when HDFView is overkill. Sometimes you just want to know how many dimensions a stored array has, or its exact path within the HDF hierarchy.

The "codebase" is currently tiny enough that it all fits below:

python



# On Happiness

Time for another TED talk... Psychologist Nancy Etcoff gave a fairly entertaining talk about happiness. Mostly it's a bunch of "we're gonna figure this out, we promise, here are some clues", but there are a few nuggets in there that I found worth sharing.

[ted id=570]

First, most interesting to me, is a little bit of scientific evidence on the cliché that selflessness equals happiness: if you run language metrics on the works of suicidal poets, you find an excess of self-centred words, such as "I", "me", "my", when compared to other poetry. Focusing on things other than yourself will make you a happier person.

Having said that, Etcoff does point out that absence of depression is not happiness, as we all know. The pain avoidance and reward-seeking systems of the brain are separate, and to be happy you need both to be in order. She mentions that people who come off anti-depressants often relapse, because only one of the systems was being treated (I forget which—watch the talk!), so as soon as the treatment stops, the symptoms of the other system become manifest again.

Next, there are three different reward systems in the brain, and they can be decoupled. Etcoff distinguishes between lust, romantic attraction, and attachment. These are mediated by different molecules in the brain, and keeping them in sync is critical to your own happiness.

And last: as has been well publicised, more money does not equal more happiness. This has been observed on an individual level (the richest are about as happy as the middle-class) and a societal level (as societies have gotten richer, happiness levels have stayed the same, and depression has actually increased). But, as a researcher, I love the New Yorker's take on it (from the talk):

Anyway, there you have it. In short: help others! Be happy! And keep watching this space for more on happiness!

# The electric car of the... Present?

I Love Symposia! is going back to its roots, with a post about a TED talk!

In his talk, Shai Agassi of Better Place lays out his vision for cheap electric cars running on electricity from 100% renewable sources, and using technology available today. If you live in Israel, Denmark, Australia or Northern California, you are first in line to try out their cars, which will be built by Renault and Nissan.

[ted id=512]

Agassi gets around the problem of the limited range of electric cars by making the battery quickly and easily replaceable. Thus you'll stop at a petrol battery station and a robotic system will swap out the battery in less than two minutes—presto! Instant battery recharge. That's less time than it takes to fill up.

With one trillion dollars set aside for the economic stimulus, it'll be disappointing if none of it goes to building battery change stations in the US. Ditto for China.

If you're lucky enough to be in one of the pilot regions, be sure to go to the Better Place website for more information! If not, then follow Al Gore's advice and invest in green tech. As Agassi says, this is now a moral choice.

(Just as a quick aside, I was happy to discover that Wordpress.com now allows you to embed TED talks! If you use Wordpress.com, find the announcement here and the instructions here.)

# Apple Pages and its shortcomings

I recently finished writing a paper (will add link once it's published—cross your fingers!). I would have used LaTeX, but under certain circumstances, one must revert to good ol' .doc format. Now, MS Office on the Mac is a Mess (with a capital M)—your choices are Office '04, which runs on Rosetta and is therefore dreadfully slow, or Office '08, which is—in short—a giant pile of garbage. So to write this paper, I went with the Pages app from Apple iWork.

Pages, on the whole, is a fine piece of software. There's lots of little touches that make it stand out from MS Word, as well as Google Docs. For one, it's very snappy. My paper is loaded almost instantly, where Word takes several seconds. Word even takes several seconds to scroll past an image! (Ugh.) And Pages plays well with Spaces. If you're a Spaces user, this advantage cannot be overstated—Word '04 was already painfully clumsy with its Spaces compatibility, and '08 only turns up the pain to 11.

The track changes interface is fantastic, a million times better than Word's. Not only does it look much cleaner (with comments and change bubbles outside of the page, instead of on it, messing with your layout), but it sports a very clever feature that highlights changes and comments that fall within a selection — or even better, you can make it hide all change bubbles except those within a selection. For pages that have many small changes, that's a real blessing, as it allows you to focus on exactly the changes you are working on. (As a side note, Pages and MS Word play nice with each other with respect to track changes.)

The one ludicrous, awful, very 1990 thing about Pages is that it doesn't have an auto-save feature, something that Word got around what, 1997? I realised this the hard way when I lost 5h of work as my Mac froze. (Shimo, the usually excellent VPN client, appears to have been the culprit, btw.) As I rebooted, I searched in vain for a "recover changes" button, a hidden swap file somewhere, anything. Nada. Pages could only show me the last saved version of my work. I still can't believe that, 3 revisions in, Pages still lacks any form of auto-save or document recovery feature.

Anyway, since I wanted to keep using Pages, a quick Google search turned up WorkSaver, a nifty little donationware auto-save tool for all of Apple iWork. Users of any iWork app—do download this and set it to start at login! Hasn't saved my ass yet, but I'm sure it will. Oh and the homepage and app icon are both super-cute!

Endnote X2 is another mess of an app, but a necessary evil in the world of academic word processing. Pages '09 boasts Endnote integration, and it is relatively ok but generally very clumsy. First, it will only work if Endnote has a default library to open at login, it will only work with that one library, and it will only allow you to use Endnote bibliography styles that are marked as favourites within Endnote. And second, when you click "insert citation" in Pages, you get a window asking you what citation you want. This window looks exactly like any other OSX search window: a table with a search box above it. In every other app, the table would have been populated with all your references, and those that didn't match your search criteria would have been trimmed as you typed your query. Not so in this case: when you start, the search result table is blank. As you type, nothing happens. You have to enter a complete search query, hit Enter, and only then will the table be populated with search results. This inconsistent behaviour had me going crazy for about an hour, thinking that Pages couldn't find my Endnote library. It was one of those times when you wish that software was something physical that you could toss across the room, out the window, or smash to pieces with a hammer.

In the end, I still prefer Pages over Word, but it's clear that Apple's iWork team have their work cut out for them. On top of all the shortcomings of Pages, the .pages file format is still evolving and there's virtually no chance that other software makers will support it. I'm puzzled and disappointed that Apple chose to invent some new format rather than use the open standard .odt format, which Pages can't even import/export. Unless Apple gets serious with compatibility, it's clear that iWork will remain isolated from the rest of the "productivity" software that is out there. Nevertheless, if you are writing for yourself and just yourself, or if you foresee only a single export to .doc or .pdf format, it's a far better choice than the alternatives.

It seems that Google are intent on doing everything themselves.

Last week, they announced Google Squared, barely more than two weeks after the launch of WolframAlpha, a supposedly revolutionary "knowledge engine" that scours the web for information and returns with just the answer you want. Squared doesn't quite offer the same kind of natural language interface that Alpha boasts (try typing in "How old was Barack Obama on 9/11/2001"), but it aims to solve pretty much the same kind of problems.

Somewhat more surprising to me was the announcement of Google Quick Search Box, a blatant rip-off of Quicksilver. That stings, because Google actually invited its creator, Nicholas Jitkoff, to do a Google Tech Talk about it back in 2007.  It turns out Google must have liked it a lot, since Jitkoff is now part of the Google Mac team and creator of QSB, the philosophy of which is "search without effort" (replacing Quicksilver's "act without doing"). I suppose that makes all the ripping off okay, though a quick (Har!) mention of QS in the announcement would have been nice, just as a shout out to its many fans.

In the meantime though, I'm excited to try out QSB, which is apparently significantly faster than QS, and should enjoy much stronger support in the coming years. If you're on a Mac, why not try it out?

# Gmail: some reasons to switch

I've gone through the hard work of converting several friends to Gmail. In some cases it was just a matter of asking. In others, it required a concerted and persistent campaign. But after five years, I'm tired of it. The neverending stream of people stuck in their antiquated ways has steadily corroded my willpower. Now, when I come across a non-Gmail user, I just shudder and another small part of me dies.

I've decided to write this post as a last-ditch attempt. It will compile most of the arguments I have made in favour of making the Gmail switch.

1. Freedom. Gmail has by far the most liberal approach to your email data around. You can access the account with any email client, using either POP (download only) or IMAP (2-way sync between your local data and the Gmail server), for free (Yahoo charges you for a "Pro" account, and Hotmail only allows it using MS Outlook Hotmail only started offering this in March). This way, Gmail lets you back up your data on your computer. You can also forward your email to another account for free. (Again, Yahoo only allows this with a Pro account. Hotmail only recently started giving it away for free.)

2. More freedom. Gmail chat uses the Jabber instant messaging protocol, a free and open standard. This means that anyone can run their own chat server and users between servers can communicate. Contrast this to MSN, Yahoo, or AIM, all of which are closed networks.

3. Constant innovation. Gmail, of course, was the first webmail to offer reasonable amounts of free storage online. When it launched on April 1st, 2004 with 1GB of free storage, Hotmail was offering a paltry 2MB and Yahoo 6MB. After it became apparent that Gmail was not, in fact, an April Fool's joke, both competing services updated their storage quotas, I think to something like 100MB and 250MB. Anyway, the numbers don't much matter. My point is that other webmail services are always playing catch up with Gmail.

The principal reason for this is that Gmail is actually the email system used internally at Google. Google employees therefore have a strong incentive to improve it, and they are the ones with the power to do it! These days Gmail has built-in chat (since 2006, while Hotmail got it... a couple of months ago! Way to keep up, guys!), SMS-chat, built-in video chat(!), offline access (in the browser, not a client), built-in translation, previews for YouTube, Flickr, and other commonly emailed stuff, undo send, built-in task management and calendar integration, mobile-optimised interfaces, and other features too numerous to list here.

I often hear, yeah, but Hotmail and Yahoo now also offer tons of storage, so what's my incentive to switch now? Well, good for you, that's where Gmail was five years ago.

4. The best interface. This isn't just a matter of taste. Every. Single. Person I convinced to switch after a long battle against "but I like the Hotmail[/Yahoo/whatever] interface!" ended up coming back to me telling me how much better Gmail is. The innovative Conversation View, in which related emails are bundled together, is, I'll admit, disconcerting at first. But it rapidly becomes second nature and you will wonder how you lived without it.

On top of that, Gmail has unobtrusive text ads instead of Yahoo and Hotmail's ludicrous banner ads that sometimes border on the pornographic. Here's an actual full-screen ad I got in Yahoo after sending an email. It's a video ad, not a picture. This is not what you want on your screen if your boss is walking by! Plus, do you really want to annoy your friends/co-workers/prospective employers with the unrequested invitations that Yahoo and Hotmail append to your outgoing messages?

5. Great search that actually works. I used to be very, very careful about organising my messages. In today's world, however, even if you have a bunch of carefully thought-out folders, chances are you're still going to be rummaging through a lot of messages before you find what you want... Unless you have decent search. Unfortunately, that's just not the case in either Yahoo or Hotmail. The very first searches I tried in either service to illustrate this failed dramatically. This is my Yahoo inbox before a search:

Now, see what happens when I search for Flickr:

One message matches my search! Yeeeeaaaah... Great job guys... Same deal for Hotmail. Here's a message a friend of mine sent me years ago (before Gmail):

Notice in the final paragraph he mentions David Bowtell, a professor we had in undergrad. Let's say I want to find this email later. I might naively think that typing this:into the search box would find the message. Guess again!

Not only did Hotmail FAIL to find the message, as a bonus I get to stare at someone's rotting teeth in all their magnified glory! The clean ones underneath offer little consolation.

Gmail, on the other hand, was created by the number one search company in the world. Not only do they have the best email search, they offer a wide range of search operators to help you find exactly what you want. (And yes, I have imported that message into Gmail, and yes, Gmail does find it with the exact same query. And notice the nice, actually relevant and helpful ads on the right!)

6. Dead simple migration. Google recently removed that one final hurdle perhaps holding you back: those thousands of messages and hundreds of contacts stuck in your old account. Gmail now offers one-click import of all your contacts and emails from any Hotmail or Yahoo account, or many other types.

For the technically minded, there's even more reasons to like Gmail.

7. Keyboard shortcuts. It's amazingly easy and convenient to use Gmail without ever taking your hands off the keyboard. Get to the relevant message in your inbox by using 'j' to go to an older message and 'k' to go to a newer one. Then hit 'o' to open it, 'r' to reply, type your message, 'tab, Enter' to send, and 'e' to archive the conversation, which drops you back in the inbox. It's super-fast working through dozens of emails. And if you forget what shortcut it is you need, hit '?' to display a list of all the shortcuts, which disappears as soon as you hit the next shortcut.

8. Security. Google takes it very seriously. First, unlike either Yahoo or Hotmail, Gmail offers the option of always using a secure connection. This makes it impossible for snoops sitting next to you at Starbucks to read your email.

But second, and even more impressive, Gmail tells you the IP of any other locations where your account is currently open. This is always on at the bottom of your browser. You can then click "more info" to display the last five accesses to your account, what kind of access it was (browser, mobile browser, email client, etc.), when the access occurred, and the IP address of the source of the access. You also have the option to sign out all other accounts, which invalidates any previous cookies other than the one you are currently using. In short, if someone else is snooping in your account, you'll know, and you'll be able to take steps to prevent it from happening again. No other webmail service gives users this kind of power.

In short, Gmail is free, as in beer, and free, as in speech, it's better than the alternatives in a number of ways, and it's super-easy to switch. I hope you'll make the switch soon!

Hyuna Yang and colleagues seem to have at least part of the answer. They had five different research centers analyse the exact same RNA samples, and collected the raw fluorescence values—before normalisation or any other kind of analysis.

Hyuna Yang and colleagues seem to have at least part of the answer. They got five different groups to analyse the exact same RNA samples, and got back the raw fluorescence values—before normalisation or any other kind of analysis. .. has_math: no .. status: published .. wp-status: publish -->

Microarrays certainly get a lot of flak for being noisy sources of data. It's certainly a valid concern, since a single microarray usually measures the expression levels of tens of thousands of genes, and only a few biological samples are examined. There's no hope of accurately estimating the levels of that many variables with so few samples. Eric Blalock and his colleagues, however, made a compelling case in 2005 that the fault lies not with the technology itself, but with the statistical inferences drawn from the generated data. How then to reconcile the wild variability between published microarray results from different labs with the apparent validity of the technology?

Hyuna Yang and colleagues seem to have at least part of the answer. They had five different research centers analyse the exact same RNA samples, and collected the raw fluorescence values—before normalisation or any other kind of analysis. After a long (and, dare I say, tedious) analysis, they actually found that batch processing effects had a significant effect on the list of affected genes detected. The authors do a good job of explaining what batch effects are, so I'll open the floor to them:

Due to personnel and equipment constraints, all samples may not be processed at one time. For instance, one fluidics station used for the wash and staining step, is able to process only up to four samples [at a time].
Because of this, some samples are of necessity processed at different times. If the experimenters are not careful when deciding how to group the samples for processing, this can result in confounding factors:
Both centers 2 and 3 stored male arrays at 4 degrees while female samples were washed and stained. These centers have the longest lists of differentially expressed genes between sexes.
Similarly, centers 4 and 5 grouped samples according to mouse strain, and it showed in their long lists of genes differentially expressed between strains. What's happening is that the list of genes actually affected by a particular biological condition (sex or strain) is being contaminated by genes affected by sample processing order, a factor that, I think you'll agree, is extremely uninteresting from a biological perspective. This is very bad news for whoever wants to analyse the data after the fact (including your humble correspondent, actually!). The authors conclude that the batch effect "cannot be removed from the data without compromising the biological signal."

The discussion section of the paper is required reading for anyone who will be designing and running microarray experiments in the future, or any kind of experiment, for that matter. The gist of it is this: processing in batches is inevitable, but confounding batches and biological factors is not! When deciding in what order to process your samples, assign them randomly to batches, not systematically (as we are all wont to do). (Sample stratification would also work, though the authors don't mention it.)

So, finally, what should we think about published microarray results? I'd have to agree with critics that single experiments found in the literature to date are not trustworthy. Most published microarray studies, however, follow up with targeted experiments. And one hopes that future microarray experiments (or whichever expression technology replaces them) will take heed of the recommendations of Yang et al's PLoS ONE paper. That would certainly go a long way to improving the reproducibility and trustworthiness of genome-wide expression studies.

[ This post was part of the PLoS ONE @ Two synchroblogging celebration! ]

Hyuna Yang, Christina A. Harrington, Kristina Vartanian, Christopher D. Coldren, Rob Hall, Gary A. Churchill (2008). Randomization in Laboratory Procedure Is Key to Obtaining Reproducible Microarray Results PLoS ONE, 3 (11) DOI: 10.1371/journal.pone.0003724

E BLALOCK, K CHEN, A STROMBERG, C NORRIS, I KADISH, S KRANER, N PORTER, P LANDFIELD (2005). Harnessing the power of gene microarrays for the study of brain aging and Alzheimer's disease: Statistical reliability and functional correlation Ageing Research Reviews DOI: 10.1016/j.arr.2005.06.006