GTD: Keeping your Tasks/Todos in sync – Entourage, iCal, Todo, iPhone

February 21st, 2009

I’ve recently been thinking about my personal effectiveness and productivity.  I recently read through (most of) Dave Allan’s “Getting Things Done” and following a little Googling selected Entourage as my GTD centre.

Entourage was the easiest default choice for work.  I take my personal Mac to work and have to deal with Exchange: Entourage just works.  I have been having reasonable success with the Project Center and feel like I’m getting more things done (and the more important things too).

Not everything is great with my set up.  I have improved certain things mainly by adding some useful apple scripts to create tasks, events and messages from the current selection using shortcut keys.

Unfortunately, Entourage’s tasks don’t make it into to Exchange so they can be synced directly with my iPhone (like my calendar and mail).  This led me to sending myself emails to remind me to set up new tasks when processing my inbox.  So another googling and experimenting session followed.  Finally I came up with something that looks pretty promising.

Solution Overview:

  1. Use Entourage’s (2008) standard sync mechanism to get Entourage’s Calendar and Task information into iCal.
  2. Install Todo on my iPhone to show me my tasks on-the-go
  3. Use Appigo Sync to get the todo items in iCal into Todo and back.

Detailed steps:

  1. Step 1 is simple enough. In Entourage select the ‘Entourage -> Preferences’ menu.  Select ‘Sync Services’ and ensure the middle option is ticked ‘Synchronize events and tasks with iCal and .Mac’.
    Entourage PrefsOnce this is done, wait a couple of minutes for your data to appear in iCal (note the new ‘Entourage’ calendar that has been created).  Note that we aren’t really interested in the Calendar, but to do items are synced along with the calendar.
    iCal-Entourage
  2. Install Appigo Sync on your Mac (10.5+)
  3. Download ‘Todo’ from the iTunes Store for $9.99 (make sure it’s ‘Todo’ by Appagio, Inc.)
  4. Follow the following instructions to connect Todo to Appigo Sync: http://www.appigo.com/appigo-sync/faqs/connecting-todo

And you should be done – Entourage tasks should flow, via iCal, into Todo on your iPhone and back.  And it all looks pretty good at the moment.  Note that Appigo Sync only works over the same WiFi network that your Mac is on, but my iPhone is always with me – and my MBP isn’t really ever too far away.

The next thing is to see if Contexts and Projects can be made to play nicely from both ends.

Adding an auxiliary enchancer to OpenJPA

December 2nd, 2008

A while back I attempted to create a visualization of the relations that OpenJPA creates between the Java classes that it enhances – the intent was to help better understand a particularly intertwined persistent object graph and see if I couldn’t figure out why we were getting a few strange problems.

The initial approach I took was a hilarious trip into the land of sed, perl and graphviz.  It kinda looked like it worked, but didn’t actually :P

Time passed……more time passed……I learned more……more time passed…….and then I had the wacky notion of tying directly into the Enhancer that OpenJPA uses to create the persistence enabled classes.  I haven’t done the visualization yet, but this is what I learned about actually tying in an AuxiliaryEnhancer.

1. Create the AuxiliaryEnhancer

The following code is the minimal you will need.  Enter this and then compile – you will need OpenJPA and serp on your classpath.

package com.ij;

import org.apache.openjpa.enhance.PCEnhancer.AuxiliaryEnhancer;
import serp.bytecode.BCClass;
import serp.bytecode.BCMethod;
import org.apache.openjpa.meta.ClassMetaData;

public class Grapher implements AuxiliaryEnhancer {

    public void run(BCClass bc, ClassMetaData meta) {
        System.out.println("Running Enhancement");
    }

    public boolean skipEnhance(BCMethod m) {
         System.out.println("skipEnhance?");
         return false;
    }
}

2. Register the enhancer using jar based services

This is something I was only barely aware off – registering concrete implementations of services through jar file meta-data.

  • Create a file in a META-INF/services/ directory called org.apache.openjpa.enhance.PCEnhancer$AuxiliaryEnhancer
    • Note the dollar sign! That one caught me out for a while: I couldn’t decide whether the dot notation or the dollar notation should be used to reference the nested class.
  • This file should simply contain the fully qualified name of the Enhancer you wrote: com.ij.Grapher
  • Jar this directory and the class file up and you should end up with a jar listing like this
ivan-jensens-computer:jar ivanjensen$ jar tvf ../grapher.jar
     0 Tue Dec 02 21:56:42 PST 2008 META-INF/
    60 Tue Dec 02 21:56:42 PST 2008 META-INF/MANIFEST.MF
     0 Tue Dec 02 21:54:28 PST 2008 META-INF/services/
    16 Tue Dec 02 21:30:44 PST 2008 META-INF/services/org.apache.renamed.openjpa.enhance.PCEnhancer$AuxiliaryEnhancer
     0 Tue Dec 02 21:55:16 PST 2008 com/
     0 Tue Dec 02 21:55:38 PST 2008 com/ij/
   771 Tue Dec 02 21:55:38 PST 2008 com/ij/Grapher.class
   465 Tue Dec 02 21:54:46 PST 2008 com/ij/Grapher.java

3. Add the new jar file to the enhancer classpath

I did this by adding my jar file to the classpath element of my ant script – pretty simple.

4. Re-enhance your classes

Re-enhance your classes and you will see the System.out.println statements all over your console.

 [openjpac] skipEnhance?
 [openjpac] skipEnhance?
 [openjpac] Running Enhancement
 [openjpac] skipEnhance?
 [openjpac] skipEnhance?
 [openjpac] skipEnhance?
 [openjpac] skipEnhance?
 [openjpac] skipEnhance?
 [openjpac] skipEnhance?
 [openjpac] skipEnhance?

One thing I noticed about this: I had to delete my persistent classes and re-enhance, only then would the ‘run’ method be called.  The skipMethod is called whether I delete the classes or not.  I don’t know what that means yet, but I’m sure I am about to find out.

Notes:

I was actually using a patched version of OpenJpa 1.0.1 (for various, non-amusing, reasons), but the patches shouldn’t affect this tutorial.

Much Ado About Agile 2008

November 5th, 2008

I currently here at Much Ado About Agile 2008 – the conference organized by Agile Vancouver.

I managed to get in free by doing some volunteer work to set up the eCommerce system that sold the passes for conference. The software we used was the Elastic Path Commerce platform – I work for Elastic Path (who are also a sponsor of the conference).

I will be attempting to capture the sessions that I attend. So look out for my next post that will relay the enjoyable and thought-provoking keynote by Ken Schwaber, “Scrum and you mother-in-law”.

Geeky Learning-casts

September 28th, 2008

I’m constantly reading, watching or listening to stuff that makes me learn an I recently found the following very useful and timely for the work I’m doing at the moment (or in the near future).

Software Engineering Radio – fantastic podcast

August 24th, 2008

About two months ago I stumbled on the Software Engineering Radio podcast, and in my opinion it’s one of the best techy podcasts out there (anyone knows any different?).

There are currently 107 podcasts available and the 13 I’ve listened to (and listened to again) have been worth their virtual weight in gold.  There are a lot of interviews about many, many topics and the interviewees really know there stuff.

SE-Radio is an invaluable resource for the professional software developer.

Productivity Boost

April 26th, 2008

mouse.jpg

Inspired by Neal Ford’s talk last weekend at the No Fluff Just Stuff conference in Seattle I have recently spent a little bit of time installing a bunch of utilities and setting up my MacBook Pro ‘just so’.  I’ve always hated using a mouse, it’s always so damn far away from my hands when they are settled above my keyboard.  But being relatively new to Mac OS X (I was previously mainly using Linux for about 5 years) I wasn’t aware of what could be done to prevent the need to reach for my mouse so often.

An interesting thing to note about the NFJS conference is that all the presenters were using Macs: the majority of the attendees were also using Macs.  So it was a great chance to pick up tips and tricks.

Anwho, the changes I made:

  • Quicksilver – shortcuts to launching apps and sooooo much more
  • OpenInTextMate – open the files or directories currently selected in Finder (Quicksilver trigger: alt-shift-m)
  • OpenTerminalHere – open a terminal for the directory currently viewed in Finder (Quicksilver trigger: alt-shift-t)
  • lselect – select a bunch of files based on glob expressions in Finder
  • Zipeg – viewing archives without expanding them
  • Global shortcut to pop-open finder – ctrl-alt-cmd-f
  • Making IEs 4 Mac work with Outlook Web Access – Public Folders, Calendaring, etc.
    • Make sure you you have your WINEPREFIX pointing at the version of Wine IE is using (caught me for about an hour)
    • IE does monster my CPU, but at least I can book a meeting room myself (my team will be very happy about this)
  • Grand Perspective – a tree map view of your harddrive – no productiviy boost in itself, but it allowed me to find large files I didn’t know I had and do some spring-cleaning.
  • Witch – a better task switcher

Finder’s new toolbar

Even whilst setting this stuff up I found myself naturally using the new shortcuts, so I’m very hopeful that my productivity will get a good boost for a moderate investment of time.

The Ultimate Commit Token

April 24th, 2008

I’ve rarely had to use a commit token.  The teams I’ve worked in generally edit unrelated source items as much as is possible.  Over the years I’ve read about various amusing items being used as commit tokens: rubber ducks, action figures, hats and little flags, to name a few.  The general idea is that you should physically have the token to be allowed to commit – meaning there are no updates made to the source repository so your changes will go in cleanly.

It is possible that this could be side-stepped though – Mr Naughty Committer might pretend to be holding the Pokémon and commit – how can the source repository be expected to know where Pikachu is at any given moment??

However, one of my colleagues had a great idea the other day – ‘The Ultimate Commit Token”.  Simply appropriate one of those single use password setups with a single key fob.  You could try borrowing it from your corporate VPN setup – I’m sure they wouldn’t miss it.

The Ultimate Commit Token!

 Wire your pre-commit script into the server-side element and have the fob floating between developers.  Et Voila! One very annoying, yet extremely effective commit token!!!

I know, I know, it’s not very exotic looking, but fear not!  I reckon it would look natty glued to the back of Spud Of Nine.

 

Spud Of Nine

Don’t name your test for the class under test

March 11th, 2008

Whenever I play in a new language one of the first things I do is to install the appropriate xUnit framework to get feel for the language.  For my Java code I have been using JUnit for many years.  My use of JUnit hasn’t really changed over the years, but some things have been bugging me for a while.

One of the things that has bugged me is naming the test class for the class under test.  That is, if the class under test is Banana your test class would be called BananaTest.  There are obvious advantages to this pattern:

  1. You know where to look for the test code for a class
  2. You can find all the test classes very easily – using filename pattern matching.

However, there are several disadvantages.  One is that it ties you to having a single test class for each class which can cause problem.  I have often found myself writing or maintaining large test classes that combine testing different aspects of the class’ behaviour.  Some of these classes would exceed Checkstyle’s line length limit for a method.  One solution to this is to blindly split the class into two classes.  What then to call the new class?  Banana2Test – not very descriptive or helpful.  Maybe we should name the test for the aspect of things we are testing, e.g. BananaSlippynessTest or BananaFlavourTest.  But now the test isn’t following the original naming convention.  This isn’t a big problem, but is there maybe something we can learn from this.

Apparently there is.  Yesterday I attended an Agile Vancouver workshop – “BDD and TDD code off”.  Our group chose to use TDD which is still fairly new to me.  I was lucky though that Peter, who was in our group, was an experienced TDD’er.  It was an interesting experience and the code we produced was a little different to the code I would normally produce.  I don’t yet know if the code was better or worse, for now it was just ‘different’.

That workshop drove me to learn a little more about BDD, so I watched the Google Talk of David Astels introducing BDD and he mentioned how BDD tests are typically structured – around the different expected behaviours.  One example he gave was testing a List class.  You would likely have a test class called EmptyList which would contain the specifications for an empty list.  For example: Ensure list has size = zero, Ensure list iterator has no items.  This test class would contain the specifications for just empty lists.  I assume you would then add a test class for a non empty list, and perhaps another to ensure the ordered-ness of list, and possibly several more.

I’m not sure if I’ll be adopting this in my current project at work just yet.  Doing something different without hard and fast rules can confuse people and can put people off testing, which I really don’t want to happen.  However, in my pet projects and fiddlings I think I’ll be experimenting a little more.

Subversion Change Sets

February 19th, 2008

For some time now I have been looking around for change sets in Subversion, the ability to group files together connect them to issues and commit and track them as sensibly labelled groups with the ability to merge these groups between branches without having to specify individual files.

Many years ago when working for a telecommunications company in the UK I had the pleasure of using ClearCase and more importantly ClearQuest. I seem to remember being able to see the files I was changing for any specific issue at a glance. My job as a build engineer was also made much simpler being able to working with the change set abstraction doing just as I describe above when it came to merging. So scouting around the interweb I went.

The first interesting thing I hit upon was clearvision’s ClearQuest Subversion Integration this seemed a bit like what I was looking for and not too badly priced, except where I work now doesn’t use ClearQuest and isn’t about to. On my search went.

I eventually found this page on Auke Jilderda’s blog which detailed some of the changes coming in Subversion 1.5 to arrive late summer.

Subversion’s upcoming 1.5 release is scheduled to deliver the core merge tracking feature with subsequent releases likely extending this. Fundamental to all merge tracking related functionality is the functionality to automatically record what change sets have been copied, or merged, where. On top of this, the 1.5 release will deliver the following functionality:

  • Repeated Merge
  • Cherry Picking
  • Record Manual Merge
  • Rollback Merge
  • Block/Unblock Change Set
  • Automated Merge

That sounds pretty much exactly what I was looking for – and then some :)

The first comment on Auke’s post then led me to the SVK project which also seemed to offer a lot of these types of feature already (as the comment mentions). I agree with the later response that Subversion could do with these features in its core, rather than in a specific client, particularly as we don’t currently use that client and we use Eclipse a lot. SVK is interesting to me for another reason though, its similarity with git. From the little I understand about git it provides a very different way of thinking about version control which obviously fits the Linux developers quite well. I recently read something about git and the way it provides a decentralised approach to version control, and providing a new style of file system at the same time.

Along with the Mylyn Eclipse plugin and a few other things I’ve seen there’s a lot of fun things going on the configuration management space at the moment. I’ll be keeping my eyes peeled and hoping core Subversion change sets arrive early.

Hello World

February 9th, 2008

It does for for programming, it’ll do for blogging – Hello World!