Goodbye Twitter

Twitter is a web service to help answer the question What are you doing? The service was born in March of 2006 and I first used it in November of the same year. After a lot of thought, I’ve decided to say goodbye to Twitter.

Before Twitter existed I started using what most sites call asides as a way to post short little updates to my blog. I call these Quickies. I never stopped posting Quickies and I’ll be using them as my Twitter replacement.

Quick Updates

One of Twitter’s strengths is how easy it is to post updates. Twitter provides ways to post updates through their web site, using SMS text messages, and through instant messages. Through the use of the Twitter API many other services have been created to update your account. PocketTweets and Hahlo are a couple of iPhone web apps I’ve used to interact with my Twitter account, but there are many more.

In order to stop using Twitter, I needed a quick way to post updates. Using the normal post screen in WordPress, I’d have to type a title and select my Quickie category in addition to typing the update and clicking the Publish button. Yesterday I found Wphone, which is a lightweight admin interface designed for phones, and was able to customize it to suit my needs.

Quickie Post Screen

As you can see from the screenshot, my Quickie post screen is pretty limited. The title gets automatically filled with date and time appended to “Quickie: “. I can type in the content and any tags and then click the Publish button. The category is automatically set to Quickie and the comment and ping statuses are set to the blog’s default settings. I was even able to get the interface to work with the WordPress bookmarklet, which takes the page title and url of the web page you are browsing and applies them to the appropriate fields. In the current form, I can’t release my customizations for others to use, but if there is interest I will see what I can come up with.

Notifications

Another strength of Twitter is the notification and follow system. Following someone is basically setting them as a friend on Twitter. You will see their updates, choose how you wish to get notified, and can reply to their updates.

I’m not sure why, but I’ve always visited Twitter to read updates from the people I follow. Yesterday I finally subscribed to the RSS feed of the people I follow. Any updates will get shipped to me and I have one less web site to visit. If I want to reply to someone’s update I’ll still use Twitter for that. People can reply to my Quickie posts by posting comments on my web site.

Content Ownership

By using Twitter, you’re at their mercy. If the service goes down, you can’t access your updates. Anyone who has used Twitter, knows that the service goes down quite a bit.

When you use Twitter, your content is stored on their servers and everyone visits twitter.com (or another site through the use of the API) to access your data. By choosing to use my WordPress Quickie category, all of updates are stored in mySQL with the rest of my web site. I’m also in full control of replies (comments). People either visit my site or subscribe to my RSS feeds to access the information.

Will I Miss Twitter?

I honestly don’t think so. My primary use of Twitter was always to post quick updates. I’ve replaced that functionality and made it extremely easy to use. I won’t be limited to 140 character updates and I can use HTML in my updates. I’m in full control of my content and don’t have to rely on a web service.

This won’t be the right choice for most people using Twitter, but I don’t see it being a problem for me.

Reviewing 2007 Golf Goals

As 2007 comes to a close, it’s the perfect time to review golf goals from 2007. They were:

  • Keep my 9 hole scores starting with a 3 or 4. I don’t want to reach the half-century mark again this year.
  • Break 80.
  • Get a hole in one. (When isn’t this a goal for a golfer?)
  • Break 40 more consistently.
  • Keep a slower controlled swing.
  • Talk Dad into making a trip to Ireland.

How did I do?

  • After March 31st, when I posted those goals, I shot 10 nine hole scores in the 50s.
  • I still have never broke 18. I’m sure I could have done it a few times after shooting a good 9 hole score, but didn’t play a second 9 a lot of those days.
  • Still no ace on the scorecard.
  • I broke 40 more than in 2006, but not more on a percentage basis.
  • I was in control of my swing more than I ever have been.
  • Dad is up for the Ireland golf trip. It will most likely be a few years down the road though

Not too bad, not too good. Chipping and putting was the key for me in 2007 and I sucked at it. It’s time to start working on goals for 2008.

Separating Content Types

One of the major goals for the 2007 redesign was separating the different types of content posted on the site.

Over the years, post sizes have decreased. I’m not sure when, but once upon a time I implemented what are commonly called “Asides” as a type of short quick post. Instead of calling them “Asides” though, I’ve always called them “Quickie” posts here. These Quickies were styled in a different way on the home page and through the archives so they would stand out.

I had been using a hacked up plugin to use WordPress category functionality as tags. Whenever I “tagged” a post as a Quickie, it received a different style and everything else was styled normally. I never really implemented a way to view all of the “normal” longer length posts.

I’ve been using Twitter more and more since November of 2006, so also wanted a way to pull in my twitter updates. For awhile, I was using Twitter Tools to create a daily digest post of the Twitter updates for that day. It was kind of ugly.

So I have 3 different types of content getting posted to the site. Full posts, quickie posts, and twitter updates. WordPress 2.3 added tagging support which turned out to be a lifesaver. I no longer had to use categories as tags. I could simply live with two categories on the blog; Entry, for full length posts and Quickie. Then I’d simply use WordPress’ built in tagging support for all of my tags.

The first step was to convert all of the categories I was using as tags into the real deal. WordPress has an interface that does this automatically for you. You can access it by visiting wp-admin/admin.php?import=wp-cat2tag in your WordPress Admin area. WordPress will not allow you to convert all of your categories to tags, so if you check them all, your default category will be both a tag and a category.

The WordPress Category to Tag Converter does not provide a check all option and I wasn’t exactly going to go through and check over 700 boxes. I found out the Firefox Web Developer Add-on could do this. If you have it installed…

  1. Right click in an area around one of the check boxes.
  2. Select Web Developer.
  3. Select Forms.
  4. Select Populate Form Fields.

All of the check boxes will be selected. Then click the Convert button and WordPress will magically convert all of the selected categories into tags.

I forgot to deselect quickie from being converted, so now I had it as both a category and a tag. Using the Simple Tags plugin I was able to easily delete the tag quickie and was still left with the category quickie.

The last stage was getting the Entry category. It was easy enough to create the category in WordPress, but I needed a way to have the Entry category applied to all posts not already categorized with Quickie. After digging around the WordPress database, I figured out how categories were being stored and came up with some code to do the trick.


<?php

//Any uncategorized posts get placed in the category set with $my_cat)

//Category counter gets updated as well



	$my_cat = 693;

	$my_post_ids = $wpdb->get_results("SELECT DISTINCT `id` FROM $wpdb->posts");

	foreach ($my_post_ids as $my_post_id) {

		$my_categories = get_the_category($my_post_id->id);

		if (empty($my_categories)) {

			$wpdb->query("INSERT INTO wp_term_relationships (`object_id`, `term_taxonomy_id`) VALUES (" . $my_post_id->id . ", ' . $my_cat . ')");

			$wpdb->query("UPDATE wp_term_taxonomy SET `count`=`count` + 1 WHERE `term_taxonomy_id` = ' . $my_cat . '");

		}

	}

?>

The code loops through all of the posts and if the post is not categorized, it adds a category to the post and increments the counter for the category. If you would like to use this code…

  1. Make sure you are using WordPress 2.3.1. I have no idea if this will work for 2.3, so use at your own risk.
  2. BACKUP your WordPress database! This code will make changes to the database that cannot be reversed.
  3. Copy the above code into your theme’s header.php right after .
  4. Go to Manage->Categories in your WordPress Admin.
  5. Write down the ID corresponding to the category you want applied to posts that are not categorized. The ID for my Entry category was 720.
  6. Access your database with phpMyAdmin or some other tool.
  7. Browse the wp_term_taxonomy table.
  8. Find the record where the term_id field matches the ID from step 5. Write down the corresponding term_taxonomy_id. This was 693 for me.
  9. Edit the code you copied to header.php. Replace 693 in this line $my_cat = 693; with the number you wrote down in step 8.
  10. Upload header.php to your site and load your web site. This will force the code block to run.
  11. Once the page has fully loaded, edit header.php again, remove the code, and upload again. This should be your original header.php.

This isn’t the most elegant way of running a block of PHP code, but it was a quick and dirty solution. Use it if you want.

So now I finally had the structure working. Full posts have their own category of Entry, short posts have a category of Quickie, and Twitter updates are pulled directly from twitter.com. On the home page of the blog, the main content area lists the entire contents of the latest Entry post, excerpts of the previous 4 Entry posts, and a link to the Entry Archives. The home page’s left sidebar displays the last 5 Twitter updates, the last 5 Quickie posts, and links to view more of each.

When I’m not writing full posts, the home page is constantly being updated with new Twitters and Quickies. In the past, this would have pushed the full posts off the list.

In order to pull out two sets of posts from the database, I use two custom instances of “The Loop” as we call it in WordPress. This is actually quite simple. Before , simply add where 16 is the category ID of the category to display, and 5 is the number of posts you want displayed. Run through your WordPress loop and then you can add another loop somewhere else. Just modify the category and number of posts to display.

Update: A day after posting this, I decided to stop using Twitter.

Quick Las Vegas Visit Planned

Each year I attend the Macworld Conference and Expo in San Francisco, CA. On the flight home, we try and schedule a long layover in Las Vegas, NV. This year is no different. I’ll be landing in Vegas on Friday, January 18th at 10:16pm and flying out on Saturday, January 19th at 9:25am. The past two years we’ve played low limit hold’em at the MGM, but I think we are going to try Caesar’s this year. We’re looking for a card room that will stay relatively busy during the time we’ll be playing, so if you have other suggestions, let me know.

I think the last time I played poker was last year on the Vegas layover. My game is going to be a little rusty!