Economy Size Geek

Cool Project Potpourri

Dirk Elmendorf

Issue #196, August 2010

A look at Caffeine, Homesick and Mockingbird.

I admit that when I signed on to do this column, I was really excited to see Cool Projects on the editorial calendar. It was months away, and I figured by the time the issue rolled around, I would have something big to share with you. Things did not quite work out that way. Because every article I write involves failure in one way or another, I'm going to start off telling you a little about the projects that sat on my bench.

Tiny and Shiny

A very, very tiny handheld computer showed up on my doorstep. It was the completely copyleft Ben NanoNote. The manufacturers are not really sure what to do with it, so they have made it as open as possible to give people a chance to figure it out. I originally got it because I thought it might make a neat portable Linux device for my son. I hoped to get basic video replay on it (if nothing else, to give him something to play with instead of my phone).

Figure 1. Ben NanoNote

In some ways, I had flashbacks to playing with the BeagleBoard, because I quickly realized I was looking at a very neat device, but I didn't have the foggiest idea of how to get started. There is a wiki and several mailing lists, and recently, I found a nice blog post showing how someone ported gnugo over to the device (see Resources). After spending some time researching, I was forced to admit that it was too early for me to jump in. The device has potential, but the project as a whole just is not far enough along for me to participate. Maybe I should run some kind of contest and give it away to a deserving hacker instead of letting it sit on my desk mocking me.

That Other Smartphone

I have been following Android for some time. It seemed like an interesting platform, but in order to take advantage of it, I would have to switch carriers, which for a variety of reasons was not on my to-do list. Then, Google released the Nexus One for AT&T, and I was excited. I have grown increasingly frustrated with my iPhone, and I thought this would be a great opportunity to try Android on great hardware.

So far, it has been great. There have been problems, but I don't end up as frustrated, because most of the problems I have encountered are bugs, which means they can be fixed. On the iPhone, several of my problems were related to running Linux instead of Windows or Mac OS X, which is not a bug in my book. I have a couple Android books sitting on my bookshelf to read (which I realize now are probably out of date, as I got them long before I got the phone). I had hoped to walk through the process of getting an application up and running. Instead, I have settled into the role of end user rather than power programmer, which has been great for my phone experience even if it does not help my writing.

What's Cool?

Now that I've cleared my guilt backlog, the good news is that I have found some cool projects out there—they're just being done by other people, and I get to use them. In all three cases, these are tools I have picked up recently and use them to get stuff done.

Caffeine

Caffeine was one of those wonderful discoveries, because it brought to light a problem I did not even know I had, and it originally was demonstrated on a Mac. Let's say you're watching a video. After a while, you get so engrossed in the clip that you don't move your mouse or touch your keyboard, because you actually are watching it with your full attention. Then, your screensaver kicks in (as a bonus, you have a password on it). Or, say you're giving a presentation and you stay on a slide a while so you can answer a bunch of questions, and the screen blacks out to save power. In the past, there were two ways to handle this. You could just remember to flick your mouse every so often (which is annoying and error-prone), or you turn off the screensaver, which means you have to remember to turn it back on later.

Figure 2. Caffeine

Enter Caffeine. This handy app puts a small coffee cup in your notification bar. When you want your computer to stay awake, just click the coffee cup. If you're okay with normal behavior, click on the cup again. This is nice because it is easy to access, and it gives you a visual cue to remind you what you have done. There even are options to tell it to kick in for a certain amount of time. If clicking is too much trouble, you also can tell it to kick in automatically when certain applications are running (Flash videos, OpenOffice.org Presentation or Skype, for example).

On Ubuntu, you can add in the PPA (Personal Package Archive). Then, installation is easy:

sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt-get update
sudo apt-get install caffeine

It ends up being very handy. As I mentioned, versions of Caffeine exist for other platforms, so I end up recommending it whenever I see people give presentations and their screens go dark. Now, it's a standard part of my installation for my workstations.

Homesick

Homesick proves that sometimes it pays to wait and spend time on Google. When I started writing this column, I had an idea to write about my struggle to keep my home directory synced across a lot of different workstations. I figured it was a common problem, but I couldn't find an elegant solution. I originally hoped to drag in cloud storage, so I didn't have to access my home computer directly to stay in sync.

I spent a lot of time searching and didn't find what I was looking for, so I started to sketch up some ideas of how to solve the problem. That's when I realized something very important about writing a column: there always is a deadline looming. I ended up shelving the idea of starting a brand-new project and focused on writing about something I actually could finish in time to talk about. In that case, it was a BeagleBoard.

As I was working on a project last week, I stumbled into Homesick. It was designed to solve this exact problem. It introduced the idea of “castles”, which are different repositories of dot files stored in git repositories. You then can choose to pull down a variety of different castles on each machine and choose which ones you actually want to use.

In order to use it, you need to have Ruby, RubyGems and git installed. Once those are installed, simply install the homesick gem:

sudo gem install homesick

A castle can be pulled in by referencing a local folder, a remote git repository or by using the short form if the repository is on GitHub. The example provided here is from Homesick's author's GitHub site:

homesick clone technicalpickles/pickled-vim

This pulls down the vim files from technicalpickles. It does not replace your existing vim dot files (yet).

In my case, I'd like to build my own vim castle (you do not have to keep the files in a git repository, although it doesn't hurt):

cd ~/Desktop
mkdir -p delmendo-vim/home
cd delmendo-vim
cp -R ~/.vimrc ~/.viminfo ~/.vim home/
homesick clone ~/Desktop/delmendo-vim

Now you can ask which castles are installed. In my case, it shows technicalpickles and delmendo-vim. It should list technicalpickles/pickled-vim (a bug that should be fixed by the time this goes to print).

To activate it, execute the command:

homesick symlink technicalpickles/pickled-vim

or:

homesick clone delmendo-vim

This starts the process of linking in the files. It also warns you of conflicts and allows you to look at differences before you make the swap. The system does not handle synchronizing the files across different machines, but you easily can handle that either by putting them in a network-accessible git repository or host the files remotely and mount them. There are a bunch of ways to do both, but GitHub and Ubuntu One come to mind.

The first commit on the project was March 3, 2010, so it's still early. I hope the features continue to evolve, because it saves me from having to cobble it together.

Mockingbird

To be honest, I have absolutely no artistic talent. This is generally not a problem, because I partner with a great designer (who happens to be my brother, so he doesn't take it personally when I yell at him). I'm in the process of launching a Web application. As you probably can tell from my writing, I'm very comfortable describing things with words, but sometimes words just don't cut it.

I tried a lot of different software tools, but none of them worked. Some failed because they required too much artistic talent on my part. I always end up feeling like they're designed for designers, which I'm not. In other cases, I hit a wall with adoption, because I work with people who do not use Linux, which means I have to select from tools that are completely cross-platform. In the past, I resorted to scribbling things on paper so I had some kind of diagram to discuss. Paper was a great medium when everyone on my team sat in one room, but now that I work with a distributed team, I end up losing the immediacy of the paper drawing. It also became a pain to manage scanning and distributing paper documents.

That's when Mockingbird got dropped in my lap (meaning my brother sent me a link). Mockingbird is a Web-based wire framing tool. Wire framing is where you just sketch the outline of a design so that you get the idea of what is happening. It does not provide every last detail. Mockingbird allows you to design a basic interface and then easily share the URL of your design with others, or you can export it as a PNG or PDF. The tool ends up being awesome for me, as it provides a bunch of template items that make it easy to grab the interface pieces I need. If I need to change something, I simply drag it around and make quick changes on the fly. Because it is Web-based, my teammates can use it on their OS of choice.

Figure 3. Mockingbird

The first time I used it, I was hooked, but I was a little nervous. It seemed so interactive, I dreaded to find out what custom plugin was required to make it all work. I quickly learned it was built using Objective J. I was really worried this was some new form of Java, but it turns out to be JavaScript.

Mockingbird is built using a framework called Cappuccino. This LGPL'd framework is built in JavaScript, but modeled after GNUstep and Apple's Cocoa framework (hence the name Objective J inspired by the Objective C of those frameworks). Cappuccino makes a distinction between itself and libraries like jQuery by saying that those are about making a dynamic Web site. Cappuccino is useful only if you are building a full-blown application. The other toolkit it compares itself to is SproutCore. Cappuccino is different because it is written entirely in JavaScript and does not require knowledge of HTML or CSS.

A word of warning: Mockingbird is not open source. It currently is free during the “beta”. At the time of this writing, I don't know when the beta will end or what the pricing will be like. I admit that I have spent more time drawing with Mockingbird than looking at Cappuccino (which is open source). I was so impressed with the way you can interact with the drawings (like being able to select interface items, copy, go to a different page in the app and so on) that I realized how much I need to look at some of the “application” frameworks for JavaScript. The last time I looked at them was several years ago when I played with ExtJS. It provided a lot of whiz-bang GUI elements, but it proved to be too difficult to work with. Maybe that has gotten better in the interim.

Conclusion

I've realized that for me, “cool” has a lot more to do with usage than fashion. Sure, I thought it was an impressive proof of concept that someone got Android onto the iPhone, but I'm much more impressed when I discover something that changes how I work every day. These tools certainly have done that for me.

Dirk Elmendorf is cofounder of Rackspace, some-time home-brewer, longtime Linux advocate and even longer-time programmer.