New Location

My website has moved to http://www.jasonwhaley.com. Please visit there for the latest and only remain here for legacy content.

Monday, June 29, 2009

Things - Part 2 of How I Get Things Done

This entry expands on my previous post on managing communication to Get Things Done (GTD). In that post I stated
I set the timer for 48 minutes and kick it off and focus solely on items in my GTD list - nothing else exists in the world if I can help it. I ignore all non-urgent electronic communication (anything mentioned above and email) and I only communicate with others on purpose if its relevant for the task at hand that I'm working on. What is considered urgent or not is often for me to decide on the fly.
That sounds fine and dandy - but just how does my GTD list get populated? I basically try to follow David Allen's instructions (at least those outlined in the first three chapters or so) to a tee. This includes having a system that I can trust that I put every actionable item I need to take in it. The system that I trust is a piece of software called Things created by Cultured Code.

It is essentially setup the same way that Allen instructs well. Any actional item that I encounter that I can't get done in a *very* short amount of time (2-5 minutes) typically gets placed in my Inbox so that I can decide what to do with it later. For the entire time that I'm working, I am focused solely on those tasks that I have given myself in the Today section, giving higher priority to those makred as Due on that day. Every single item is assigned to an Area of work (e.g. work for my Employer, Personal Projects, Housework, Developer Communities, etc. etc.) and within those Areas can be projects - which are items that require two or more actionable steps to complete.

I have found that using this system has had two effects on me:
  1. I'm much better organized and prioritized in my daily work. Organizing all of my actionable items in such a way allows me to focus on one thing at a time knowing that the sequential order based on priority has already been taken care of for me, thus negating my ADD.
  2. My mental burdens are very low - I no longer obsess about work or what I haven't done when I'm not working because I have my things to-do ready for me when it's work time again.
The book and the software itself comes out to around $70 total, but given the boost in productivity and quality of work/life if its had on me, $70 is one hell of a deal.

Wednesday, June 24, 2009

Mysql Backup Script

[Note: This script was not written originally by me. I am just pasting it for others to consume.]

Here is a quick and nice mysql backup script that one can add to their crontab to produce nightly mysql backups. It is not completely turnkey as you need to edit some of the variables (or write some code and pass some arguments such that they can be specified on the command line) and also have a dblist.txt file ready with the names of the databases you wish to backup.
#!/bin/bash

# Backup mysql databases

# Set a value that we can use for a datestamp
DATE=date +%Y-%m-%d

# Our Base backup directory
BASEBACKUP="/folder/to/store/mysql/backups"

for DATABASE in cat dblist.txt
do
# This is where we throw our backups.
FILEDIR="$BASEBACKUP/$DATABASE"

# Test to see if our backup directory exists.
# If not, create it.
if [ ! -d $FILEDIR ]
then
mkdir -p $FILEDIR
fi

echo -n "Exporting database: $DATABASE"
mysqldump --host=localhost --user='YourMySQLUser' --password='YourMySQLPW' --opt $DATABASE | gzip -c -9 > $FILEDIR/$DATABASE-$DATE.sql.gz
echo " ......[ Done ] "
done

# AutoPrune our backups. This will find all files
# that are "MaxFileAge" days old and delete them.
MaxFileAge=30
find $BASEBACKUP -name '*.gz' -type f -mtime +$MaxFileAge -exec rm -f {} \;

Monday, June 22, 2009

OSX Java Update Surprise

On Friday of last week I installed Apple's latest Java update to Leopard, Update 4, which gives us 1.6.0_13 of Java. This patches a pretty critical vulnerability in Java that Apple was lagging behind on addressing in their repackaging of Java.

After installing the update, I notice that my version of Java, as reported by `java -version` was a 1.5 version, not 1.6. However, the Java version I set per Java Prefrences.app was indeed 1.6. I did not muck with any of the symlinks found within /System/Library/Frameworks/JavaVM.framework and there certainly wasn't a java bin directory on my path.

Turns out that Java on OSX now honors your JAVA_HOME environmental variable, which I did have set in my .bash_profile file. I originally had this set to Java 1.5 for a project I work on that requires a 1.5 JRE (the bundled version of JAXB in 1.6 conflicts with a version of CXF we depend on).

This is kind of neat actually. I no longer have to open a gui app to change the version of Java I am using... I can use my ~/.bash_profile file as I always have on any other system. Here are the relevant contents of my ~/.bash_profile file:
#export JAVA_HOME=$(/usr/libexec/java_home)
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
#export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home
I basically leave the version of Java I want to use uncommented and then `source ~/.bash_profile` to make that take effect. If I wanted to actually use the Java version that takes priority via what's set on the Java Preferences.app utility, I would uncomment the first line - /usr/libexec/java_home simply returns the directory of the currently active Java version set by Java Preferences.app. I personally chose to forgo that route since it requires multiple steps and opening that utility instead of just allowing me to simply edit my ~/.bash_profile and re-source it.

Friday, June 19, 2009

Managing Communication - Part 1 of How I Get Things Done

This post was prompted by another blog post by my friends over at Mystic Coders. In short, it discusses the topic of communication overload. This post is simply a re-edit of a comment I made there. I will base a series of posts off of the general subject of how I Get Things Done (GTD) of which this post will be the first.

I have been keeping this thought inside for quite sometime, only ever preaching to choir when a certain style of communication annoys me. Here is that thought for the rest of the world to consume...

EMAIL IS NOT INSTANT AND SYNCHRONOUS! STOP USING IT AS SUCH!!

We live in a world where friends, family, and coworkers are all constantly sending each other emails and somehow the protocol was established that replies and threads must be replied to and read in an almost instantaneous fashion. The coworker bunch is the worst offender of this. My favorite example of this is from a former operations director who would send a (non-critical) email to you and within five minutes later he would be at your desk to make sure you read it. That, my friends, is a double-whammy to The Flow. Unfortunately, everyone seems to have forgotten that the final 80% of characters in the word "email" spells "mail" - a communication mechanism that we all find acceptable to check once a day and let pile up when we are out of town.

Of course, given the world of constant interaction that we find ourselves in now, it would be pretty implausible to just trivialize email the way I just did by comparing it to snail mail. It wouldn't work practically in some organizations. Given the fact that I work remotely, I really would have a hard time eschewing it.

Of course, email isn't the only distraction that we face. I personally engage and benefit from using 4 other electronic communication mechanisms:
  • IRC
  • IM
  • Skype
  • Twitter
If one is not careful in their usage of any electronic communication protocol, it can become a timesuck just like, if not bigger than, the barrage of email piling up in your inbox. Of course there's always those interactions you must and will have with people on the phone and in person as well.

So... here's what I do to circumvent this. For the part of my days that I've partitioned to Get Things Done (aka work), I put myself on a timing system. I'm on a Macintosh and I use the simple but functional Apimac Timer application. I set the timer for 48 minutes and kick it off and focus solely on items in my GTD list - nothing else exists in the world if I can help it. I ignore all non-urgent electronic communication (anything mentioned above and email) and I only communicate with others on purpose if its relevant for the task at hand that I'm working on. What is considered urgent or not is often for me to decide on the fly. Roughly, if it's direct coworker who is pinging me via a synchronous communication protocol (IM/IRC/Skype) or in person or on the phone about something important to my tasks or their tasks and I'm not in The Flow, I'll pause to answer them; otherwise... they must wait. I do not even look at my email window at all unless a high priority email came. After the timer finishes and the 48 minutes is up, I reset it to 12 minutes, and allow myself to check email, irc, hit the bathroom, read a random article from my rss feed, and so on. After the 12 minutes is up, I'm back to focus mode again for 48 more minutes... Rinse, and repeat.

This 4:1 ratio allocation of one hour blocks of time has the triple effect of allowing me to:
  • synchronously communicate and email enough when it is warranted
  • concentrate in almost 50 minute blocks of time - long enough to establish and keep a flow on short tasks
  • take enough mental breaks from tasks during the day so as not to be drained by 2PM
I only ever void this schedule if the work I'm doing is either super critical, if I'm really in the zone and it doesn't seem like a need to take a short mental breather, or if I've scheduled an event previously (a meeting, or phone appointment, for instance).

To help me stick to this schedule the I do the following things with my email and email client which delivers the communication that is often the nosiest and responsible for the biggest chunks of time that could potentially be wasted
  • Turn off pop-up windows and noises that occur when ANY new messages arrive
  • Create a filter rule that automatically gives a low priority status to any message where my name, or one of my distribution lists/groups are not in the TO: line. Low priority emails are read at the beginning of the day on the next day.
  • Keep my own email messages under 3 sentences, unless the piece of communication really deserves more. Unless an email message will contain a moderate amount of technical detail, it must be typed in 3 sentences and under 5 minutes. Otherwise, it probably ought to be communicated through some other means.
  • Bounce the dock icon on my Mac if there is a high priority email - I allow myself to at least skim those at any time to determine if there is an action item I need to perform right away. This form of notification is subtle enough to not distract my eyes until I've come to an intermediate stopping point in whatever it is I'm doing (e.g. finishing writing a statement in a piece of code).
  • Strive to keep the Inbox at 0 unread messages... I never want to have the feeling that I'm behind or missing anything.
What I've found in applying these techniques to email is that the signal/noise ratio of the email I check constantly is very acceptable. I probably only read about 10 during the normal workflow of each day, as I only permit myself to read/write them once per hour. Ignoring emails you are CC'ed on until the next day also has the side effect of making you resist the urge to peanut gallery on threads you were merely CC'ed on - thus preventing (or at least keeping in check) the negative feedback loop of everyone trying to shove their opinion and thoughts in to a gigantic email thread.

With the other communication protocols, I just play it by ear. I don't want to eliminate folks from being able to find me, at will, on synchronous communication protocols unless I really need the focus. I do nothing fancy with them outside of turning off growl and setting my skype to DND status (which prevents me from seeing when others call).

The end result of all of this is that I now probably spend about 1 hour a day on communication during my work time instead of the 3 hours or so I estimated I did before - and that's an extra 2 hours a day one can devote to doing the real work that one needs to do to stay productive and valuable.

What are some things that you do to help facilitate getting in The Flow and keeping your communication avenues available but without getting in your way?