Python Helps Usher in Bio 2.0

Bio 2.0 is coming, with protein synthesis on-demand. I thought it was in the far future, but then I found this great hands-on article explaining how to do it, right now!

Transcriptic Workcell

That article blew my mind two ways:

  1. You can literally type a sequence of base pairs (e.g., ATCGATTGAGCTCTAGCG) into a text file and a lab can create the protein you specified.

  2. You can completely automate testing. The above article shows how to write a Python program to say exactly how you want your biology experiment conducted. Your experiment can have conditions. The way the above works is ...

more ...

The Best To-Do List App

Well, at least my opinion on it. :-)

I live in a to-do list every day. I track all work I do, and take all my notes, in a gigantic to-do list/outline. Here's my two level outline for writing this blog entry:

To-Do Outline

If you don't know what an outliner is, you should read a basic outliner intro.

For the past few years, I've been using VimOutliner, which is a Vim-based outliner. I've been mostly happy with it, except that it doesn't have hoisting (where you zoom in on only part of the outline), and it ...

more ...

How to Integrate AdWords with HipChat

Here I'll show an easy way (if you're a developer) to get daily AdWords reports into a HipChat room. We'll use Google App Engine as the integration glue. An alternate approach I'm not using here is to define your own Zapier integration. Before we start, here's an overview of the architecture:

HipChat-Integration

To summarize, the integration will:

  1. In AdWords: generate a daily report and email it.
  2. In HipChat: a dedicated room will receive and display message.
  3. In App Engine: receive email and send HipChat message to HipChat room.

1. AdWords Integration

We will write a small ...

more ...

Static Blogs Are Awesome

Static blogs hosted on cloud infrastructure are awesome when compared to older hosting solutions like Wordpress and Typepad. The benefits are:

  • cheap
  • fast delivery of content
  • complete control to customize your blog
  • you're not dependent on an external company

Over a decade ago, we gambled on Typepad as our blog host. However, the sands of time have seen Typepad sold off to some international holding company, and now it seems to be in stand-by legacy mode. We evaluated a few static blog replacements:

We're a Python ...

more ...

The Internet is Improving Productivity More Than We Realize

Everybody knows economic productivity is the key to how fast an economy can grow, right? So the below image from the BLS shows a disturbing lack of productivity in the last 8 years:

Bls-nonfarm-productivity

Working in IT, that seems totally wrong, because the Internet has been a great productivity booster for more than the last decade. You can get questions answered on StackExchange, use or write open source software on GitHub, collaborate remotely using a ton of different collaboration tools (email, screensharing, group chat, etc.).

The standard productivity measure does not include all these new technologies and ways of working. So ...

more ...

Cross-Platform Non-Cloud Personal Backups

I've been trying to figure out my backup strategy at home. My current set of data I want to keep, critical documents and home photos/movies, is about 70GB. My current strategy is to keep backups on several machines at home. I'm trying to avoid using cloud storage. I've been using unison, which is a great backup tool. Some of its cool features are:

  • syncs between two machines, across any OS
  • tells you what files changed whenever you run it, and lets you override its default guesses as to which way to copy/delete files
  • pretty fast ...
more ...

How to Integrate App Engine app with Google Drive

Let's assume you're writing a Google App Engine app in Python.  And you want to use the Google File Picker API to select files from the user's Google Drive, and also the Google Drive API to download the selected files. You can write your server-side appengine app in Python, and then use Javascript for the file picker and file download.  It's not super hard, but I couldn't find it completely documented anywhere.  I only found one description of the tough issues .

At a high-level, your architecture is:

  • Server: App Engine app in Python, which includes ...
more ...

There Are Only Two Ways to Enforce Unique Constraints in Google App Engine

Well, it sucks but it's true. There's a bunch of noise on the Internet about how to do unique constraints in Google App Engine, but it seems like these are the only two safe ways. The thing to remember is, the only uniqueness that GAE will guarantee is on key names.

Approach #1: Make the unique field be the key name

As long as you promise to yourself that you'll never need to change the value, then you should make the unique field be the "key name" in the table. Then you can call db.Model.get_or_insert ...

more ...

Easy Way to Test Offline HTML5 Web Apps

Assuming you've already written your cache.manifest and everything according to the HTML5 Offline Web Applications spec, you'll want to test it. So far, the easiest way I've found to test is in the chrome browser on your desktop. To test:

1. Go to your url. Keep your javascript console open, and you should initially see messages about the "Application Cache" being filled in. It will tell you if you have any bad links in your cache.manifest file, and you should fix those.

2. Once you're viewing your cacheable web page, click Refresh. This causes ...

more ...

HTML5 Storage Wars - localStorage vs. IndexedDB vs. Web SQL

Currently, there are three competing approaches for saving serious amounts of data (i.e., persistently, and bigger than cookies) locally in your browser:

  1. Web Storage
  2. Indexed Database API
  3. Web SQL Database

These names sure seem similar. But the implementations sure are different. Let's quickly summarize what they do, the PROs and CONs, and what I like best at the moment. Though I'm sure my opinions will age quickly as the technology matures.

All these technologies use the same-origin protection for data access (i.e., javascript can only access data from the url's domain that it was served ...

more ...