Keyword Assistant

Eric Hodel | Mon, 29 May 2006 05:22:18 GMT

I use Keyword Assistant with iPhoto to tag all my photos before uploading them to flickr. Unfortunately it has the unfortunate habit of running back to a compatibility mode when run on a version of iPhoto which it doesn't know about. This means Keyword Assistant won't make new keywords until the author releases a new version. There is a not so simple way around this restriction, I just opened up the KeywordAssistant binary which lives in /Applications /iPhoto.app /Contents /NetServices /Bundles /KeywordAssistant.NetService /Contents /MacOS/ and change the stored version to the current version of iPhoto. In this case I bumped it from 6.0.2 to 6.0.3. Naturally this kind of hackery might cause Keyword Assistant to do bad things like make iPhoto crash, so save a backup of that binary (and maybe even a backup of your photo library data files) before changing things around.

Posted in ,  | no comments

Ruby Method Size

Eric Hodel | Wed, 10 May 2006 18:15:58 GMT

On ruby-talk Pistos started a thread on Method Size – Best Practices based on a previous post by me where he asks what a good method size is.

Ara responded with:

i think this is a bit silly really, i have several image processing programs that are 5000 lines of code. the longest method is around 100 lines and alreadys calls 20 other methods. breaking it down further would simply obfusicate the code. the size of methods it going to be related to the complexity of the task at hand. rather that thinking in arbitrarily limited terms like ‘10 lines’ or ‘20’ i think it’s best to always strive to write less code and the make is clear first and fast second

Which I agree with:

A good and acceptable method size should be almost entirely based on comfort. Trying to artificially constrain yourself is only going to lead to bad code (and stress).

My coding style (with TDD) leads to 10 to 25 line methods because those are most comfortable.

I want to enjoy what I do as much as possible, so my “proper coding practices” come from listening to my code. My code tells me when it is too complex, too long, poorly factored or just plain ugly. If my code is telling me these things I’m not having fun, so I listen and adjust so I don’t write code the wrong way in the future.

Posted in  | no comments

IMAPCleanse 1.1.0

Eric Hodel | Fri, 05 May 2006 08:45:28 GMT

Now with imap_flag!

sudo gem install IMAPCleanse

I’ve even got fresh IMAPCleanse RDoc!

In short:

  • imap_cleanse removes old, read, unflagged messages from my IMAP mailboxes.
  • imap_flag flags messages I find interesting so I don’t have to!

They can even do this for you, too!

Next up is Part Three of my Plan for Total Email Domination wherein IMAPCleanse flags messages based on their interestingness.

Posted in ,  | no comments

Mail Filtering

Eric Hodel | Fri, 28 Apr 2006 20:53:22 GMT

I’ve been using IMAPCleanse to clean out my list inboxes and have discovered that I get about 500 emails a day from mailing lists. I read no more than ten to twenty mails out of all those, and respond to maybe two of the mails I’ve read.

I want a bayesian filter for my mail that tells me what to read. Priming the filter with interesting mail is going to take time, so to accelerate that I have this list:

  • Messages I respond to are interesting to me
  • Messages I write are interesting to me
  • Responses to those messages are interesting to me
  • If I unflag an automatically flagged list it should never be re-flagged

I think the next tool I’m going to write is a tool that flags messages I write, messages I’ve responded to and responses to mails I’ve written. This should be easy to figure out from the \Answered flag, so I won’t have to do too much searching for In-Reply-To and References headers. I should also be able to keep track of auto-flagged messages with IMAP keywords.

Posted in ,  | 1 comment

Ruby 2.0 Features

Eric Hodel | Tue, 11 Apr 2006 00:04:45 GMT

17:01 < branstrom> blink: Ruby 2.0 will make you coffee too
17:01 < ne78> will Ruby 2.0 cook my meal ?
17:01 < nome> ne78: no, but it will get you a gf who will
17:01 < ne78> nome: no thanks i already have one
17:01 < nome> ne78: this one will be able to cook

Posted in ,  | no comments

Older posts: 1 2