Friday, July 28, 2006

Completing the Completer

I've been feeling the pain lately. My wrists are starting to hurt from typing too much. How can I type less while coding?

For the past week I've been considering changing editors. Currently I use nano because the key bindings are similar to the bash shell, it supports Perl syntax highlighting, and it works anywhere. But there is a crucial feature it lacks - the ability to do string completion in a file - I need this to save on keystrokes, short term memory and context switching.

So I've gone on a mission searching for an editor that fits my criteria: Perl syntax highlighting, in-file text completion, cross-platform, ideally works in a terminal, ability to customise key bindings, with a minimal learning curve. Here are just some of the editors I tried: mp, vim, vi, glimmer, gobby, emacs, kate, kwrite, nano, jpico, joe, jed, nedit, jedit, bluefish and others.

The winner is kwrite and an honorable mention goes to mp (minimum profit) for many reasons including this quote from the mp man page, "it helps you abandon vi, emacs and other six-legged freaks definitely."

The downside of kwrite is it won't work on a remote terminal and annoyingly flashes on start up - but apart from that it does the trick: in-file string completion.

Ok. So where does The Goo come in? Well it helps stick Things together by injecting a special comment into the file you're about to edit that is laden with Perl reserved words and context-sensitive method names. The string completion feature in your editor (e.g., vi, emacs, kwrite) sees the comment and picks up an expanded lexicon of keywords to use in string completion.

When you exit the editor the special comment is removed. Great! Less keystrokes, less context switching (no more looking up method names), and it works across different editors. Check it out:


Tuesday, July 11, 2006

Focussing the Email Filter


For the last week all my incoming email passed through a Goo email filter (i.e., milter).

The filter scans each incoming message for Things (e.g., HelloWorld.pm, 1212.idea, 233.pain etc) and adds a hyperlink to each Thing. The idea is I want to minimise the overhead of context switching from email to performing a task.

My first reaction was surprise at the number of Things found in my email - there are Things everywhere! Even things you don't expect. I received an email about London.pm, for example, and The Goo marked up this email with a link to a non-existent Perl module called London.pm - OOps. Generally though it works well.

I receive a constant barrage of email from "robots" on the Turbo10 and Trexy clusters. One robot, "Ernie the Exception Checker" sends details of exceptions via email. The Goo filter now automatically adds hyperlinks to the underlying programs so I can context switch quickly to the offending line of code, squash the bug and get back again.