Python’s namedtuple class provides a simple, lightweight way to make simple immutable classes. If you’re using dictionaries to pass objects around, consider using namedtuples instead: they’re easier to read and provide the benefits of classes such as methods and properties. With namedtuples, you’ll have cleaner code with essentially no additional work. The Python namedtuple docs include [...]

Highlighting the active tab in GNOME terminal

In recent iterations of GNOME terminal, the active tab is nearly indistinguishable from the inactive ones.  That makes it harder to navigate when you’ve got a bunch of terminals open simultaneously. Fortunately, GNOME uses a modified CSS scheme to control theme appearance, and that makes it easy to highlight an active tab. Here’s how. Create (or edit) [...]

This page provides a quick synopsis on how to use three of my favorite Python features together: virtualenv, which provides a standardized mechanism to isolate python environments (including in WSGI setups) pip, which facilitates packages installation in virtualenv environments or otherwise ipython, a terrific interactive shell with readline and debugging support Bookmark on DeliciousDigg this [...]

Bolloxed sharing in Google docs

Google’s implementation of document sharing is completely fouled up. The following is a slighted redacted version of a (formerly) internal email to colleagues to tell them what I learned about document sharing based on interactions with their customer support and folks on the net. Bookmark on DeliciousDigg this postRecommend on Facebookshare via RedditShare with StumblersTweet [...]

Hype and evangelism run rampant in technology. That’s not to say there aren’t real and substantial advances, of course. One of my personal mantras is that simple things should be simple and complex should be possible. In other words, complexity shouldn’t come at the expense simplicity. (This isn’t a novel idea, just my own internal [...]

Monitor your router with (r)syslogd

I’m having lots of dropped connections at home. Unfortunately, consumer-grade routers typically have poor monitoring facilities out of the box. Unix/Linux environments have long been able to aggregate logging messages across multiple hosts through a service called syslog. Many routers use embedded Linux and support sending messages to remote systems via syslog. (Emailing logs is supported, but [...]

Earlier this week, the Oversight and Investigation subcommittee of the Energy and Commerce committee of the US House of Representatives undertook an investigation of direct-to-consumer (DTC) testing. To some, this investigation was long overdue; to others, it was a witch hunt by intrusive regulators. In any case, it’s pretty clear that this event will lead [...]

My hosting provider, HostMonster, uses cPanel to enable account administrators to configure their domains and services. By default, Hostmonster and cPanel place web data for the primary domain in ~/public_html/, with subdomains and “add-on” domains as subdirectories therein. That means that files for the primary domain are comingled with the document roots of other domains. The incongruency [...]

Have Monkeys, Need Climbing Wall

I have three kids. All of them like to climb. Margot seems unnaturally compelled to climb things — no matter how imprudent. (She broke her clavicle at age 2 after climbing up to, and falling off of, the kitchen table.) Unfortunately, our San Francisco postage stamp yard has no good places to climb. Since I [...]

I Joined Berkeley

As many of you know by now, I left Genentech in September to join UC Berkeley as the Chief Scientist of the Genome Commons. I’m part of QB3, the California Institute for Quantitative Biology (no I don’t understand the abbreviation either). I’m collaborating with Steven Brenner, Jasper Rine, and Lior Pachter at Berkeley, and Robert [...]