Skip to main content

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. ;)

sony-reader-writer

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.

Automatically resume interrupted downloads in OSX with curl

I recently found myself at the wrong end of a crappy internet connection and needing to download a 97MB file. Safari and Chrome would both choke during the download and leave me with a unusable, truncated 4MB file, with no way to resume the download. The OSX command-line download utility, curl, can resume downloads, but I had to check manually each time the download was interrupted and re-run the command.

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

Read more…

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:

#!/usr/bin/env python

import os, sys, argparse
import h5py
from numpy import array

arguments = argparse.ArgumentParser(add_help=False)
arggroup = arguments.add_argument_group('HDF5 cat options')
arggroup.add_argument('-g', '--group', metavar='GROUP',
    help='Preview only path given by GROUP')
arggroup.add_argument('-v', '--verbose', action='store_true', default=False,
    help='Include array printout.')

if __name__ == '__main__':
    parser = argparse.ArgumentParser(
        description='Preview the contents of an HDF5 file',
        parents=[arguments]
    )
    parser.add_argument('fin', nargs='+', help='The input HDF5 files.')

    args = parser.parse_args()
    for fin in args.fin:
        print '>>>', fin
        f = h5py.File(fin, 'r')
        if args.group is not None:
            groups = [args.group]
        else:
            groups = []
            f.visit(groups.append)
        for g in groups:
            print '\n   ', g
            if type(f[g]) == h5py.highlevel.Dataset:
                a = f[g]
                print '      shape: ', a.shape, '\n      type: ', a.dtype
                if args.verbose:
                    a = array(f[g])
                    print a

h5cat is available on GitHub under an MIT license. Here's an example use case:

$ h5cat -v -g vi single-channel-tr3-0-0.00.lzf.h5
>>> single-channel-tr3-0-0.00.lzf.h5

    vi
      shape:  (3, 1) 
      type:  float64
[[ 0.        ]
 [ 0.06224902]
 [ 2.23062383]]

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.

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.

Read more…

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.

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.

Read more…

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.

Picture 1

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.

Read more…

Google engulfs more software

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

Picture 4

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.

I'll start with the short list.

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.)

Read more…

Randomise your samples!

ResearchBlogging.orgMicroarrays 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:

Read more…