Things revisited

Although I fell in love with The Hit List‘s beauty & simplicity, I find that I really need the ability to sync with my iPhone, so I took another look at Things and ended up switching back.

Now that I understand the proper use of areas vs. projects, I can live without folders or nested outlines. I had been avoiding areas of responsibility and creating projects for everything, which became difficult to manage without folders.

Areas of responsibility can be used to group related projects as well as individual tasks. A project should be used for something that can be completed, such as releasing an application, or preparing for a trip. An area, on the other hand, is used for an ongoing activity such as work or blogging.

Although Things doesn’t let you simply drag an email or URL to create a task, you can still link them to the notes field of a task. The ability to sync with my iPhone and share tasks with team members more than make up for The Hit List’s nicer user interface.

Posting to Google Reader from NetNewsWire

One reason I use Google Reader is to share interesting articles in my shared items page. However, I find that I’m more productive when I use NetNewsWire, since I’m in control of how & when it fetches new items, so I spend less time reading news.

I’ve been looking for a way to share items in Google Reader from NetNewsWire. One way I did it was by subscribing to my NetNewsWire clippings feed, which I make publicly visible in Reader. It doesn’t appear in my shared items, though.

I’ve found a better solution, although it still isn’t perfect. This AppleScript is based on Google’s “Note in Reader” bookmarklet. It should be placed in NetNewsWire’s script folder. You can then choose ‘Post to reader’ in NetNewsWire’s script menu to open the selected news item in Safari and open a box to post it to your shared items.

tell application "NetNewsWire"
	set u to URL of selectedHeadline
end tell
tell application "Safari"
	make new document with properties {URL:u}
	delay 2
	do JavaScript "var  b = document.body;
var  GR________bookmarklet_domain = 'http://www.google.com';
if (b && !document.xmlVersion) {
    void(z = document.createElement('script'));
    void(z.src = 'http://www.google.com/reader/ui/link-bookmarklet.js');
    void(b.appendChild(z));
} else {}" in document 1
end tell

Staying in sync

I’ve found that my MacBook Pro is better as a desktop system, while my MacBook is more pleasant to travel with, so I’ve been looking for a good way to keep them in sync. After trying several sync utilities, I was surprised to find that Windows Live Sync is my favorite.

Windows Live Sync runs continuously in the background and syncs files as soon as they’re changed. In most cases it “just works”, so you can work normally without having to think about it. Live Sync is the only sync utility that’s completely free. It’s limited to 20 directories with 20,000 files in each directory. I haven’t run into any storage space limitations.

ChronoSync with ChronosAgent is a close second. Rather than running continuously and syncing files as they’re changed, it runs at scheduled times (or manually) and does a full sync of everything that changed since the last time it ran. If you’re syncing a large folder such as your home directory, it can take a long time. ChronoSync is great if you want to do a full sync before leaving with your laptop and again when you return.

SugarSync looks promising, but there are a few things I don’t like. It also syncs continuously like Windows Live Sync, plus it lets you access your files from the web. However, the sync application isn’t a background process. You need to actually run their SugarSync Manager application at all times if you want it to sync. Also, the free service is limited to 2GB. Other plans are available from 30GB for $4.99/month through 250GB for $24.99/month.

If you only want to synchronize a single folder, Dropbox is great. Like SugarSync, the free service is limited to 2GB, although more storage is available at extra cost. Since it’s limited to a single folder, it isn’t really a complete synchronization solution.

The Hit List vs. Things

I own both Things and The Hit List (which I purchased as part of MacHeist 3), but I’ve been using The Hit List exclusively. With the release of Things 1.1.2 today I decided to take another look at it. After a short time I went back to The Hit List.

Things has two major advantages over The Hit List: it’s available for the iPhone and can sync with it, and it lets you add other team members to share task lists with.

The Hit List is a lot more attractive and just feels generally nicer. It has several features I use heavily which are missing from Things, including subtasks, time estimates, folders, and the ability to create new tasks by dragging an email or URL to a list. Hopefully there will be an iPhone version soon.

Web Services and Unicode

An application that I’m working on uses a SOAP web service to send user registration data to a server, which I implemented using Web Services Core Framework. After the user enters his details, I create a SOAP request to send it to the server:


	NSDictionary* headers = [NSDictionary dictionaryWithObjectsAndKeys: soapaction, @"SOAPAction",  "text/xml; charset=utf-8", @"Content-Type", nil];

	fRef = WSMethodInvocationCreate((CFURLRef) url, (CFStringRef) method, (CFStringRef) kWSSOAP2001Protocol);
	WSMethodInvocationSetProperty(fRef, kWSHTTPExtraHeaders, headers);
	WSMethodInvocationSetProperty(fRef, kWSSOAPBodyEncodingStyle, kWSSOAPStyleDoc);
	WSMethodInvocationSetProperty(fRef, kWSSOAPMethodNamespaceURI, Namespace);
        WSMethodInvocationSetParameters(fRef, (CFDictionaryRef)params, nil);
	fResult = (NSDictionary*)WSMethodInvocationInvoke(fRef);

This works perfectly unless the user enters multi-byte Asian characters. I immediately suspected that I was assuming somewhere that characters are one byte, but it turned out to be crashing deep inside CFNetwork code.

Read more

New Vampire Weekend album coming in September

Vampire Weekend’s self-titled debut was my favorite album last year, with its catchy blend of afro-pop with ska, classical, and indie pop sounds. This blog post offers some details and a great new song called White Sky. The new song is recognizable as Vampire Weekend’s style and sounds like a lost track from “Graceland”. I’m really looking forward to this album.

Tweetie comes to the Mac

My favorite iPhone twitter application, Tweetie, is now available for the Mac. It’s replaced Twhirl & Nambu as my favorite Twitter client.

Tweetie’s user interface is clean & gorgeous. It has the features I want in a Twitter client: separate views for friend’s tweets, replies, and direct messages, and makes it easy to track new tweets by maintaining the proper scroll position to show current tweets until you explicitly scroll.

Atebits paid a lot of attention to detail. Animation effects are a nice touch, without being annoying. Double clicking brings up the user’s profile or all tweets in the reply threads. Most importantly, Tweetie doesn’t get in your face, so you can concentrate on work without being distracted, unlike many other twitter clients that demand your attention, yet you can easily see when new tweets arrive.

The only features Tweetie is missing are groups, saved searches, and trends.

Useful XCode tricks

XCode provides several ways to make your work easier by cutting down on repetitive typing. The simplest (from a usage standpoint) is text macros. You simply type an abbreviation and hit Escape to substitute it. A text macro can have variable substitutions where you can add text.

I’ve seen a few contradictory articles telling how to add your own text macros, which don’t work in XCode 3.1, but here’s how I was able to get it to work.

First, open /Developer/Applications/Xcode.app/Contents/PlugIns/ and look for TextMacros.xctxtmacro. Make a copy of TextMacros.xctxtmacro and place it in ~/Library/Application Support/Developer/Shared/XCode/Specifications. You may need to create the Specifications folder if it doesn’t exist.

In the copy of TextMacros.xctxtmacro, go to Contents/Resources and edit any of the .xctxtmacro files such as C.xctxtmacro (anything defined there also works in C++ and Objective-C). Any changes here will override the version in XCode. If you only modify one of the macro files, you can delete the others from the copy.

My development team is supposed to add a standard copyright header to each source file. I created a macro that allows me to type ‘stdcopy’ and have it expand to the entire header, with highlighted items that I can tab to and add text. I also added a ‘history’ macro which adds a history comment below the standard copyright block.

For those two macros, I added the following definitions to C.xctxtmacro:

        {
            Identifier = c.stdcopy;
            BasedOn = c;
            IsMenuItem = YES;
            Name = "Standard Copyright Header";
            TextString = "//---------------------------------------------------------------------\n// Copyright (c) $(YEAR) $(ORGANIZATIONNAME).  All rights reserved.\n// Reproduction or transmission in whole or in part, in any form or\n// by any means, electronic, mechanical or otherwise, is prohibited\n// without the prior written consent of the copyright owner.\n//\n// < #summary#>\n//\n// < #remarks#>\n//\n// Date\t\t\tRelease\t\t\tTask\t\tWho\t\tSummary\n// =====================================================================\n// < #date#>\t\t< #release#>\t\t< #task#>\t\t< #who#>\t\t< #summary#>\n//---------------------------------------------------------------------\n";
            CompletionPrefix = stdcopy;
            IncludeContexts = ( "xcode.lang.c", "xcode.lang.java" );    // this works in Java too
        },

        {
             Identifier = c.history;
             BasedOn = c;
             IsMenuItem = YES;
             Name = "History Comment";
             TextString="// < #date#>\t\t< #release#>\t\t< #task#>\t\t< #who#>\t\t< #summary#>\n";
             CompletionPrefix = history;
             IncludeContents = ( "xcode.lang.c", "xcode.lang.java" );
        },

Scripts, which are listed in the script menu, are more powerful & flexible since they can use shell scripts, AppleScript, Perl, Ruby, or any other scripting language.

Since I’m working with CFPlugin bundles, I need to deal with UUIDs. In most cases, you would use CFUUIDGetConstantUUIDWithBytes to specify a UUID, which requires a list of byte values. The shell command ‘uuidgen’ returns a string, so converting it for use with CFUUIDGetConstantUUIDWithBytes involves some tedious editing. With a script, you can simply insert the properly formatted UUID byte values.

Here’s my ‘Insert UUID as bytes’ script:

#! /usr/bin/perl -w
my $re = "\(..\)\(..\)\(..\)\(..\)-\(..\)\(..\)-\(..\)\(..\)-\(..\)\(..\)-\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)\n";
my $uuid = `uuidgen`;

my $bytes = $uuid;
$bytes =~ s/$re/0x$1, 0x$2, 0x$3, 0x$4, 0x$5, 0x$6, 0x$7, 0x$8, 0x$9, 0x$10, 0x$11, 0x$13, 0x$14, 0x$15, 0x$16/;

print "// UUID: ".$uuid;
print "CFUUIDGetConstantUUIDWithBytes(NULL, ".$bytes.")";

I’m sure there’s a more elegant way to do it in a single line of Perl 🙂

The Hit List

The Hit List is the latest entry in the crowded field of GTD software for the Mac. The most notable thing about The Hit List is its beautiful, elegant user interface, simplicity, and speed. It has become one of my favorite applications because it just “feels right”.

The Hit List.jpg

The interface looks just like a note pad. To create a new task, you simply hit return and start typing. Despite the apparent simplicity, it has some sophisticated features such as sub-tasks, which can be created as an outline, and time estimates. The Hit List can sync with iCal, and they promise an iPhone app, although it isn’t available yet.

The Hit List was the main reason I bought the MacHeist bundle; I prefer to think of it as a $10 discount on The Hit List with the other applications as a bonus.

Before I got The Hit List, I was using Things, which is also a powerful & sophisticated task management application. Although Things also has an attractive user interface, after using The Hit List, it just feels kind of clunky. Instead of hitting return to create a new task, you hit Cmd-N, which brings up a quick entry window.

Things Quick Entry.jpg

Things also lacks the outline structure with sub-tasks. One current advantage is that there’s also a Things app for the iPhone. Unfortunately they have to sync on the local network.

Update: It was pointed out on Twitter that you can create a new task in Things by simply hitting the spacebar, which creates a task inline without the popup.

Twitter client roundup

There has been an explosion of new desktop Twitter clients recently. All of them offer some unique features.

I want a Twitter client to be lightweight and non-intrusive, like the old favorite, Twitterrific. However, it’s starting to show its age and it lacks a few features I want, such as showing replies & direct messages in a separate view.

Twhirl was my client of choice for a long time, although I prefer not using an Adobe AIR application. It has most of the features I want, except groups.

Tweetdeck does support groups, but it’s also an AIR application and it takes up too much screen space, as well as too much RAM & CPU time.

Eventbox supports Facebook, Flickr, Google Reader, and Reddit as well as Twitter. Although it’s very powerful, I find it too intrusive for regular use.

Nambu is my current favorite. It has almost the same features as Tweetdeck, although it’s a native application. It’s still in beta & currently has a few bugs, but I have high hopes for it.

Groups is an essential features for anyone who follows a lot of people on Twitter. If your home screen moves too fast, you can create a view of only the people you don’t want to miss to cut down on the noise.

Update: Jonas Wisser mentioned Bluebird, another one that’s still in beta. It has some unique features like themes, but it still lacks some features. I’m not really sure what the difference between the ‘all’ and ‘friends’ view is.