How to Start Writing

When I ask my friends “have you read my blog?” they usually answer “yes”, followed by “I should start a blog too.” True, it’s difficult to get started, but the good news is that getting started is actually the hardest part. If you start by thinking about what you want to say and jotting down an outline, the rest of the blog post (or documentation for a project) usually comes pretty easily. And I’m not the only one to think so — I just read a blog post by Stoyan Stefanov who essentially says the same thing, except he’s talking about writing technical books. If you’re having a hard time getting started, give it a read.

New Theme

I stayed up a little later than I wanted to last night, but I finished it… this blog has a new theme!

When I first started this blog, I chose the minimalistic min theme by Jared Erickson. After using it for a few months, I decided that it was a little too narrow for code snippets, and the text was a little difficult to read for a technical blog. I recently came across a few technical blogs running twentyeleven, the default WordPress theme, and I was impressed with how crisp the typography was. So this week I decided to adapt twentyeleven for my blog. The overall layout is almost exactly the same, but the headers, metadata, links, embedded code, blockquotes, and code samples are a lot easier on the eyes. I hope you like it!

Moving WordPress Pages to the Domain Root

I wanted my About, Contact, and Résumé pages to live in the domain root (i.e., instead of under /blog/. The following tiny WordPress plugin and .htaccess file placed in the document root does exactly that.

First, the plugin:

Plugin Name: Pages in Root
Plugin URI:
Description: Serve pages out of the domain root
Author: Jon Tai
Author URI:
Version: 0.8

add_filter('page_link', 'pages_in_root_page_link');

function pages_in_root_page_link($url) {
	$parsed_url = parse_url(get_home_url());
	return str_replace($parsed_url['path'] . '/', '/', $url);

And the .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^about/?$ /blog/about/ [L]
RewriteRule ^contact/?$ /blog/contact/ [L]
RewriteRule ^resume/?$ /blog/resume/ [L]

New Blog, New Domain, New Server, New Everything

2011 has been a year of change. In the spring, I switched jobs. In the summer, I moved to the San Francisco Bay Area. In the fall, I got married. And this week, I finally moved my personal web site from a vintage Ubuntu Feisty install to EC2. (In case you were wondering, Feisty was Ubuntu 7.04, as in, the version of Ubuntu released April 2007.) But it wasn’t just a simple web site move.

Since I was in high school, I’ve been running my own infrastructure — mail, web, DNS, etc. On the one hand, doing everything myself has been incredibly instructive. But on the other hand, it’s very time consuming. Thankfully, as I get older and have less time to manage these things, infrastructure as a service is maturing. I don’t have to do everything myself anymore if I don’t want to. And one of the things I definitely don’t want to do anymore is manage hardware. So I’ve been slowly moving my infrastructure off of hardware that I owned and into places like Linode and EC2.

As I move things around, I try to improve upon them. I’ve been using more nginx and less Apache. I’m consolidating my personal site with my wife’s (both of our sites were just photo blogs anyway). And I’m starting this blog — something I’ve been meaning to do for a long, long time.

Have you ever Googled for an error message or problem, thinking “surely someone must have come across this before!” And to your delight, someone did, and blogged about it? I certainly have. While I have run into my own share of tricky issues, I haven’t been very good about sharing my solutions. This blog aims to fix that. I’m calling it Control+R, a reference to the bash key binding to search your command history. Control+R is my “what was that command again?” key. I hope this becomes one of your “what was that solution again?” blogs.