The best kittens, technology, and video games blog in the world.

Showing posts with label gtd. Show all posts
Showing posts with label gtd. Show all posts

Sunday, October 21, 2018

My current GTD system

She works hard for the money... by Tamer Akça from flickr (CC-NC)

I don't know if there's any way to do GTD properly. I've been trying so many tools, and it always feels like no setup works properly, but if I don't do some kind of GTD then my life instantly falls apart and I never achieve anything, or even stay on top of everyday responsibilities.

In all likelihood if I write this post again in a few years, it will be a fairly different list. Anyway, for other people who try to do GTD, here's my current setup.

Core of the system

The most important part is private git repository which also happens to be mirrored on Dropbox using magic of symlinks.

Inboxes

One recent complication is how often I'm with just a phone, and often offline on a train to make it even worse. The least shitty solution I found is Google Keep. In the past I carried a tiny pen and a stash of post-it notes with me, but that's a bit less practical. Most other software I tried really doesn't like working with limited connectivity.

A big downside of Google Keep is that it's hard to copy a list from the web UI and paste in somewhere, without going through the hassle of exporting to temporary Google Docs document and copy&pasting from there. Someone should seriously write a Chrome extension to improve that part, and well, that someone might end up being me.

I probably should give Google Keep alternatives another try, since Google products don't have very high half-life.

Big section of the core system is inbox folder with anything that hasn't been processed yet.

I have a physical wicker basket at home for letter and related physical stuff to check.

I think on paper a lot, so I often generate a lot of paper mindmaps and lists. Once I'm done with them, they land in the inbox.

Incoming emails which requires some further actions get a star. I never delete any emails, so those stars are the only indication that it's not done. Some people delete or archive stuff and treat their email inbox as a TODO list, and that just feels really weird, but if it works for you.

Usual GTD lists

The core system contains the usual GTD lists like Projects and Next Actions.

I don't divide Next Actions by context, since there's no meaningful context for most of them.

Reference System

I have a physical reference system consisting of a bunch of ring binders with contents inside organized alphabetically by tag. That's mostly for things like bank statements, bills, and other boring paperwork which I might refer to every now and then.

I also have a ref folder on Dropbox - not related to that git repository - which contains all the digital stuff.

Emails stay in Gmail, as they're very easily searchable there.

Calendar

This is a bit awkward, as I use a mix of Google Calendar and old text file based system.

Calendars I use are:
  • upcoming events
  • saved dates for potential upcoming events
  • any periodic actions I want to do every N weeks or months - mostly boring cleanup, backups, reviews etc.
  • birthday calendar
Possibly it would make sense to move to just purely Google Calendar system.

Planning

This might be the most interesting part, as I found I need multiple different kinds of planning to make things work:
  • the usual lists of GTD next actions
  • ad-hoc planning like at start of the day usually happens on paper - by the end of the day what's left of that list goes into inbox
  • weekly goals list to keep me focused - it's typically about 10-15 goals, and I'm aiming at 80%+ Partial Success or better rating. Those lists are not meant to be modified once created. If something fails for a good reason, it fails. Any unachieved goals (including Partial Success) go into inbox.
  • rolling goals list for next 12 months - I keep it as Google Docs document and update what's in progress, done, or definitely failed with some color coding. This documents gets updated whenever needed. Every 3 months or so I archive old document, clean up done or failed things, and create a new one.

Weekly Goals List

The biggest risk of GTD is that a lot of things will get done (as far as failure modes go, it's not the worst one), but whole areas of life where progress is most difficult get neglected.

Because the most important function of those lists is helping to balance different aspects of life, anything where I achieved meaningful progress towards stated goal counts as Partial Success, even if it's still very far from being finished.

Of course since Partial Success is still not finished, it still needs to go onto the next list.

I'm aiming at 80%+ completion rate because typically a few things will just not work around due to external circumstances.

If same thing fails multiple times, then it's a very strong indicator that it needs a lot more planning.

Rolling Annual Goals List

You know how people are best behaving in January after they make their New Year's resolution, but then usually give up by March? People completely miss the point thinking that such resolutions are ineffective - they're extremely effective, you just need to refresh it often.

The list is about 4 pages of Google Docs, and lists many highly specific goals, hopefully covering every aspect of life. This includes many more meaningful goals, but also lists movies, games, and books I'd like to enjoy over the next 12 months.

Most goals on the list are very specific and measurable, but it's not always possible, so some vague entries, and some refer to ongoing practices. If the goal itself is not specific enough, I try to have some more specific subgoals.

12 months feel like about the right perspective for this list. It's really difficult to think in longer term perspective in concrete enough terms, and for shorter perspective it would be guaranteed that many life aspects will go unaddressed.

Whenever I update this list, I try to have a chat about it with certain special people.

Cooperation

The system is private and difficult to share even if I wanted. Occasionally I want to discuss some plans with others, and for this I usually use Google Docs and Google Calendar - or talk about that in person, which also works.

Other lists

I keep Waiting For lists, mostly for things I ordered.

I keep Someday Maybe lists, for things which are not really actionable, but I might get there someday.

I keep Social lists for people I'd like to keep in my life - I check it every now and then, and if I'm at risk of losing contact because everyone is too busy, I try to arrange something.

I used to have Shopping list, but since I do overwhelming majority of my shopping in Tesco online and Amazon, I just throw whatever I need into relevant basket, and every now and then order what's in those baskets.

Logs

And they're not really part of the GTD flow, but I keep a lot of different logs, measuring and writing things every day.

And everything else

And I also have beeminder setup, but it only tracks things like exercise, so it's fairly peripheral to the system. I tried to use it more, but most interesting things might be specific, but not necessarily quantifiable in the way beeminder wants, and usually giving something long term goal with weekly commitment is not actually the best idea.

That's the rough outline of my system.

Big 5 Bonus

And that's what a person who's a few standard deviation high on Conscientiousness is like. Also about as high on Openness to Experience, extremely low on Neuroticism, and somewhere halfway on Extraversion and Agreeableness.

Monday, September 12, 2016

Using Trello for GTD

I IZ SAD. NO CHEEZBURGER 4 ME by stratman² (2 many pix and busy) from flickr (CC-NC-ND)
The big problem with GTD is that no software solution really matches the ideal workflow, and using post-it notes for it has its own problems.

I tried a lot of different software solutions. For fairly long time I tried using a bunch of files in a Dropbox folders for it. The big upside was how easy it was to integrate with it - just crontab a script to put a file into inbox if I need to be notified of something. But plain text files are really poor format for anything.

So as another tool in the long list I tried Trello. Here's the setup.

GTD board

I have one main list with a lot of columns:
  • Today (5) - just a place to highlight whatever I'm currently working on, or plan to work on if top item gets blocked. It gets empty by either finishing things or moving them back to action lists about daily.
  • Next Actions - I don't really feel like there's much value in using crazy number of contexts, most of which would contain no or very few items most of the time, so most actions go here.
  • Code Me - There's pretty much the only context which is constantly filled and clearly distinct from non-code actions.
  • Waiting For - what I'm waiting on to happen. Trello has advantage over plain text files, as I can put links, dates etc.
  • Someday/Maybe - a fairly vague list of ideas
  • Projects to Plan - these are sort of next actions, any project with no obvious next action goes there; the idea is that they'd go to Projects list once more actionable. It could be seen as another next actions column with "Plan Me" context tag.
  • Projects - any projects bigger than one action go here. Actions and projects should generally be linked, but usually it's obvious enough that I don't bother. Trello doesn't have easy way of showing projects with no associated actions, so I wanted to write a script to tag them, but I never got to it (Trello API isn't too bad).
  • Done - any recently finished action or project
  • Areas of Responsibility - mostly for reference during reviews. Anything bigger than a project.

GTD Archive board

About once a week I move Done column there, and add a proper date. It's mostly a feel-good board, with fairly little functionality.

Trello labels

Any long running project or area of responsibility gets its own label, as labels are the only easy way to tag trello cards. I use Card Color Titles for Trello Chrome extension, as otherwise Trello labels are fairly useless (you can see before and after in that link).

The only other label is red "blocked" label, which can be quickly applied and unapplied to action cards.

Off-Trello parts

Once upon a time I used to have "Buy Me" list, but nowadays I just throw things into my Tesco groceries or Amazon basket right away, and actually buy them weekly or so - and things not purchasable in either are rare enough they can go into generic action list.

Inbox is still a Dropbox folder, mostly with plain text files, so existing crontab scripts can still use it.

How Well it Works?

It all sort of works, but it's not exactly amazing. I don't plan to return to plaintext files, but I'll probably try something else eventually.

It's really annoying that I can't use it when offline, for example in London Underground - Dropbox had far better online/offline integration.

Wednesday, December 25, 2013

Improve your life by thinking marginally

my kitty....... by * K A Z Z I E * from flickr (CC-ND)
Try to answer the following two questions as honestly as you can:
  • If you found yourself with an extra hour a week of free time - what would you do more of?
  • And if you found yourself with an hour a week less of free time - what would you do less of?
If your answers to these questions differ, then you're not doing a good job managing your life, and you should just go ahead and replace things from your second answer with things from your first answer.

The same logic applies to money, energy, and all your other resources. It's easy to fall to status quo bias and other delusions, but according to accepted laws of economics, if your answers are different, it's a really good bet you're either prioritizing a lower value activity (second answer) over a higher value activity (first answer) or you're not honest with yourself about your real priorities.

Exceptions are possible - some things are really all-or-nothing and you can't do "a bit less" or "a bit more" of them, or maybe you're doing something precisely as much of something as you find valuable but every additional minute of that would be a total waste. But most of the time people just don't do a very good job managing limited resources life gives them.

Hopefully this post helped a bit, without taking much of your highly valuable time.

Saturday, October 26, 2013

Some things beemind better than others

Winy and her water by Tambako the Jaguar from flickr (CC-ND)

I'm in the middle of long overdue full GTD review, and one thing I've noticed was that aspects of my life that have a Beeminder goal connected to them tend to do a lot better than those that don't.

This doesn't necessarily mean it's thanks to Beeminder - there's also a lot of reverse selection, since only things I have clear goals and metrics for can really go to Beeminder, and that alone usually means they might go better, but it sure is a suggestive correlation.

What doesn't work too well on Beeminder

Anyway, I'm in the process of archiving one goal. I was very reluctant to add it, and pretty much all my worries about it were confirmed. It was a "do less" goal to try 80% paleo diet I wanted to try for a while. Now the goal was never in any danger of derailment, but it felt really wrong all the time.

A "do more" goal is something you need to think a few times a week, requires minimal data collection, and all that data collection corresponds to a successful outcome on the graph - you're getting some awesomepoints! You need to think about it sometimes - but vast majority of your time you can completely ignore its existence.

A "do less" goal on the other hand is something looming over you 24/7. It requires constant tedious data tracking (I only sent daily summaries to beeminder, but total number of data points collected for it was much higher than for all my other goals combined), and is associated with negative rather than positive emotions all the time you collect data for it. There are no redeeming qualities here.

About the only thing worse than a "do less" goal would be a weight loss one - not only you get all the negatives of a "do less" goal, you don't even have any reasonable amount of control over the outcome.

Now I never bothered to look at Beeminder's data to see if "do more" goals have higher success rate than "do less" and "weight loss" goals, but I'd be surprised if that wasn't the case. And even if they don't, they're sure much more fun and less stressful.

As for paleo diet in particular, it's fine when you can cook at home, but it's rather impractical otherwise without seriously stretching definitions of what counts as "paleo". There's huge choice for people who for some reason want industrial waste from soybean processing and similar garbage (also known as "vegans"), but if you want real food, you're on your own. Maybe it will change one day but for now full paleo is just too much effort and the best one can do is avoiding the worst of industrial crap.
Yawning tiger cub II by Tambako the Jaguar from flickr (CC-ND)

Goal Status

I don't really have any hard long term targets - I adjust them based on how difficult it currently is and how important I feel the goal is - if the goal is important but current target is too easy that's a good reason to ramp it up.

Anyway, goal status, from hardest to easiest:
  • Try new fun things - That's a new goal I added recently, so it has no data points yet. I'm not really worried about meeting this goal, but it sure is fun to get some points for things I want to do anyway (2/week).
  • Pomodoros of important things - Another new goal. Initial target at 7/week, but it will need to go a lot higher once I get used to it. I have a lot of projects I want to move forward without good goals or measures, so rather than ignoring them or adding 20 or so separate goals of dubious quality, I'm adding a catch-all "pomodoros spent on doing any of them" goal (anything covered by another goal doesn't count here). This might still end up leaving half of the projects without any significant progress, but that's better than all of them. 
  • Exercise - This goal has been suffering from serious difficulties. Early on I managed to get sick, last week my exercise equipment broke down (fortunately ebay was pretty fast as shipping replacements). I'm about right on track for 3h/week target, and I might consider increasing it to 3.5h/week someday, but for now I'm just going to stick to current target.
  • Online Education - I found a lot of resources other than Udacity, so this goal is safer long-term than I was originally worried. I still feel it's relatively hard to find quality resources in subjects that interest me, and in a few months I might run out of them, but for the time being 3 lessons/week is just fine.
  • Play Magic - No troubles here, but I don't feel any major reason to ramp this up from 10 games/week.
  • Open Source contributions - This has been going surprisingly well, and I'll soon post about some of the things I've been working on, and since this is really important I'm going to increase the rate from 7 commits/week to 10 commits/week.
  • Blog posts - It seems I accidentally wrote a post that got into top 10 of this blog ever just a few days ago. It's so random which posts become popular and which posts almost nobody reads... Anyway I've got ton of things I want to write about, and I really like this blog being much more active, so I'm increasing the target from 2 posts/week to 3 posts/week.
  • Books - I feel a bit like a Soviet factory manager here since I went through my list of things to read, sorted by shortest first, and I'm focusing on these first. But then correlation between length of the book and its intellectual value is not that high, so it's a totally reasonable behaviour. I'm going to increase the target from 2/month to 3/month since I still have a huge stack of things I want to read, and it's going to take me years to get through it no matter the target.

Future goals

There's a lot of things I want to improve, but they don't have obvious good goals. I tried a dubious goal with paleo diet, and that didn't go too well, so I'll stay away from other "do less" goals.

Doing new fun things sound like a good catch-all goal to make sure time spent having fun still feels like achieving something, and it's important to have some balance in life. Goals are self-correcting, since ones that have lowest "days until derailment" feel most like an achievement to focus on, so there's no worry I'm just going to play new video games all time next month for some nice points.

Another area that really benefits from adequate focus, and which I often got bad at taking care of in the past is maintaining my GTD system. Unfortunately none of the metrics are sensible - my GTD inbox will invariably go way above 0 (and likely >200) since I tend to do reviews using "dump everything into inbox, then dump all my thoughts into inbox, then process one item at a time" system and it can take a long time to get it together. Even not counting reviews inbox often gets temporarily flooded by new content, and that's perfectly fine, as long as it all gets processed within reasonable time. I have no idea what to do about it all.

Of all the projects currently covered by "do more pomodoros" goal - some of them might end up having their own goals if I can come up with any, or they might just get completed or blocked for longer time (another reason why I don't want to put them all onto separate goals). I'm not sure if the pomodoro goal will really work or not. If not - I'll have to come up with some other way of ensuring these things are moving forward.

See you next time.

Tuesday, April 27, 2010

Weekly review checklist

Bohu & Tohu  (3 months old) by Gattou/Lucie from flickr (CC-SA)


Here's a quick list of steps to get my GTD system up to date. It differs somewhat from vanilla GTD, but so does everyone else's.

Preprocessing:
  • Go to mailbox, read all unread mails.
  • Go to mailbox, preprocess all blue-starred items. I use two kinds of stars: blue star means it's inbox item, yellow star is just to find an email quickly, and all activity related to it is tracked.
  • Preprocess every single item in paper inbox.
  • Go to both software repository (private and work), and commit or trash everything. If it cannot be completed right away it deserves an inbox item. 
  • Preprocess every single item in inbox directory. On Linux I used ~/inbox, on OSX I normall just put stuff on desktop (and omg, I get my desktop to totally clean and empty regularly, I really do)
  • As result of this preprocessing everything is in the GTD system - currectly OmniFocus, but most is still crap.
  • A bit more preprocessing - quickly scan everything and mark completed items as done, do less-than-2-minute actions (the only reason such actions are even on the list is because they have been blocked before), mark completed waiting-fors as such - each such completion might trigger addition of extra stuff to inbox. The reason I do this is to save some sanity.
  • Now the big decision - look at my projects and other lists and decide if they are reasonably clean or a hopeless mess. If they're reasonably clean, leave them for now. If they're a total mess, move absolutely everything to inbox.
Processing - every item in inbox is processed. As everything is in one place and obvious trash, loudest items etc. has been mostly dealt with, there shouldn't be that many distractions - but they do happen.
  • What the fuck is it about?
  • Is it already done? If so, mark as completed.
  • Do I still even care? If not, delete.
  • Is it waiting for? Tag as @Waiting and move to appropriate project.
  • Should I push it to someone else? Write email right away and @Waiting
  • Is it a shopping item? @Shopping and move to appropriate project or generic "Area of Focus : Shopping" list. There are no specific subcontexts for shopping - I buy everything online including groceries - 90% of my shopping is Tesco online + Amazon online - and the main challenge is minimizing number of separate deliveries to reduce cost and annoyance. If I'm out for some reason anyway, I'll take a look at the list to see if there's anything I can buy on my way.
  • Is it calendar item? Move to calendar. I have very few of those so I'm using OmniFocus for calendar - it won't work well for most people.
  • Is it a random URL I might want to read someday? Move to "Someday/Maybe : Reading" list.
  • Is it a random idea I might want to follow through someday but not now? Move to appropriate sublist of Someday/Maybe.
  • Is it a well-defined action already? Is it simple enough to get it done in a few minutes? If so, do it (that might trigger another inbox item).
  • Is it a well-defined action that will take longer or I cannot do it right now because of wrong context? Move to appropriate project.
  • So it's something complex...
  • What am I trying to see accomplished anyway? If I'm very unclear about it, I might convert it to a new project + some @Mindmap / @Research actions.
  • If I'm clear about outcomes, do I want to move forward with it? If not, clarify description and move to one of the sublists of Someday/Maybe.
  • Am I clear about the next action? If so, turn this into a project, and put such action there.
  • If I'm not clear about next action, turn it into a project + some @Mindmap / @Research actions.
At this point inbox should be empty.
  • Go through project lists, make sure all projects have adequate actions. Some projects might already be completed, in which case mark them as complete.
  • Quickly go through contexts lists and make sure everything is sensibly contexted. Current list of contexts is: @Blocked @Calendar @Computer @Home @Linux @Mindmap @Outside @Research @Shopping @Waiting @Windows - but I change it if I need to.
  • Take a quick look at Someday/Maybe if there's anything I want to move forward soon. Usually there isn't, or at least not much.
After all this is done, I should be able to stay sane for a few more days.

Wednesday, July 11, 2007

Using home directory as GTD inbox - version 2

my name is Grisou by *Blunight72* from flickr (CC-NC)

The GTD software I described a few weeks ago evolved quite significantly since then.

Fortunately my inbox is still empty:

$ inbox_size
Your inbox is empty.

It can be used in two modes - either single-shot report of inbox contents with inbox_size, or continuous screening mode plus UI notification with inbox_size_notify. inbox_size.rb is a library (symlinked from /home/taw/local/bin/inbox_size) which finds all items in all my inboxes. It also handles special items:
  • Unread emails in Gmail inbox
  • Uncommitted changes to one of the repositories
  • Music log not committed to last.fm
  • Passwords file chanced since last encrypted copy
  • Last backup older than 3 days
  • Any things I wanted to be informed about

The code


The main code is in inbox_size.rb:
require 'time'
require 'magic_xml'

$offline = false

def inbox_ls
items_whitelist = %w[
/home/taw/Desktop
/home/taw/ebooks
/home/taw/everything
/home/taw/img
/home/taw/ipoddb
/home/taw/local
/home/taw/movies
/home/taw/music
/home/taw/ref
/home/taw/website
/home/taw/website_snapshot
]

files = (Dir["/home/taw/*"] +
Dir["/home/taw/Desktop/*"] +
Dir["/home/taw/movies/complete/*"] -
items_whitelist)
items = files.map{|x|x.sub(%r[\A/home/taw/],"")}

# Code for handling special inbox items goes here
# ...

return items.sort.map{|item| "* #{item}"}
end

if $0 == __FILE__
if ARGV[0] == '--offline'
ARGV.shift
$offline = true
end
items = inbox_ls
if items.empty?
puts "Your inbox is empty."
else
puts "#{items.size} items in your inbox:", *items
end
end


inbox_size_notify which scans the inbox continuouly and displays UI notifications if it's not empty is:
require 'inbox_size'

max_displayed = 30

big_timer = 5
old_items = []

while true
items = inbox_ls
next if items == []

if items == old_items
big_timer -= 1
sleep 60
next unless big_timer == 0
end
big_timer = 5

if items.size > max_displayed
displayed_items = items.sort_by{rand}[0, max_displayed].sort + ["* ..."]
else
displayed_items = items
end
system "notify", "Inbox is not processed", "#{items.size} items in your inbox:", *displayed_items

sleep 60
old_items = items
end


Script which displays KDE notifications is:
header = "Notification"
msg = ARGV.join("\n") # "All your base\nAre belong to us"

system 'dcop', 'knotify', 'Notify', 'notify', 'notify', header, msg, 'nosound', 'nofile', '16', '0'

Backup reminder


Since my disk died I became more serious about backups. I indent to have at least regular rsync of my SVK repository and some important files. Here's a script which rsyncs these files from shanti (my main box) to ishida (an old laptop).

t0 = Time.now

rv = system 'rsync -rL ~/.mirrorme/ taw@ishida:/home/taw/shanti_mirror/'

unless rv
STDERR.puts "Error trying to rsync"
exit 1
end

t1 = Time.now

File.open('/home/taw/.last_backup', 'w') {|fh|
fh.puts t1
}

puts "Started: #{t0}"
puts "Started: #{t1}"
puts "Time: #{t1-t0}s"


If backup was successful a time stamp is saved to /home/taw/.last_backup. inbox_size.rb reminds me if I didn't backup for more than 3 days:

  # Time since last rsync
time_since_last_rsync = Time.now - Time.parse(File.read("/home/taw/.last_backup").chomp)
if time_since_last_rsync > 3 * 24 * 60 * 60
items << "Over 3 days since the last backup"
end

Tickler file


The "tickler file" (/home/taw/.tickler) contains all things I want to be reminded about. Appointments, deadlines, new episodes of The Colbert Report, whatever. Of course usually I want to be reminded before the deadline, not on the deadline, so the date must be some time before the event of interest. Entries in the tickler file look something like that:
Sat Jul 21 05:49:14 +0200 2007
15 days to Wikimedia Foundation validation deadline


It can be edited as a text file, but it's more convenient to add new entries with add_tickler script:
$ add_tickler 24h "New TCR episode will be available"


unless ARGV.size == 2
STDERR.puts "Usage: #{$0} 'due' 'msg'"
exit 1
end

due = ARGV.shift
msg = ARGV.shift

due_sec = case due
when /\A(\d+)s\Z/
$1.to_i
when /\A(\d+)m\Z/
$1.to_i * 60
when /\A(\d+)h\Z/
$1.to_i * 60 * 60
when /\A(\d+)d\Z/
$1.to_i * 60 * 60 * 24
else
STDERR.puts <<EOF
Usage: #{$0} 'due' 'msg'
Due can be:
* 15s
* 15m
* 15h
* 15d
EOF
exit 1
end

due_time = Time.now + due_sec

File.open("/home/taw/.tickler", "a") {|fh|
fh.puts due_time
fh.puts msg
}


The tickler file is checked by the following code in inbox_size.rb:
  # Tickler items
tickler = File.readlines("/home/taw/.tickler")
while not tickler.empty?
deadline = Time.parse(tickler.shift.chomp)
msg = tickler.shift
if Time.now > deadline
items << msg
end
end

The passwords file


Pretty much every website requires an account nowadays. I don't want to reuse password on multiple website, so I generate them randomly (cat /dev/urandom | perl -ple 's/[^a-zA-Z0-9]//g' | head) and keep them in unencrypted file /home/taw/.passwords which I simply grep if I want to login to some weird website again (normally Firefox remembers these passwords anyway, but sometimes it's necessary).

As it would suck to lose all accounts, I AES-256-CBC encrypt this file and keep encrypted copies in /home/taw/ref/skrt/, which is mirrored to multiple servers. As I need to enter my password to encrypt the file, it cannot be done automatically. The most inbox_size.rb can do is reminding me if there's no up-to-date skrt file:
  # skrt up to date ?
pwtm = File.mtime("/home/taw/.passwords")
last_skrt_tm = Dir["/home/taw/ref/skrt/*"].map{|fn| File.mtime(fn)}.max
if pwtm > last_skrt_tm
items << "No up-to-date skrt available"
end


In which case I run the following skrt_new script:
t = Time.now
fn = sprintf "skrt-%04d-%02d-%02d", t.year, t.month, t.day
system "openssl aes-256-cbc /home/taw/ref/skrt/#{fn}

Music log


The iPod-last.fm bridge consists of two parts - one which extracts the log from an iPod, and one which submits the data to last.fm. They communicate using very simple format, with lines like that (time is local):
Sumptuastic ; Cisza (Radio Edit) ; Cisza (Single) ; 185 ; 2007-07-11 17:51:27


Nothing in the format is iPod-specific, so I wrote a wrapper around mplayer which logs music it plays to /home/taw/.music_log. It can also randomize songs and search for them recursively in directories. It uses a few extra programs - id3v2 to get song title, artist and album (from either ID3v2 or ID3v1 tags), and mp3info to get playing time.
def mp3_get_metadata(file_name)
song_info = `id3v2 -l "#{file_name}"`
artist = nil
title = nil
album = nil

if song_info =~ /^TPE1 \(Lead performer\(s\)\/Soloist\(s\)\): (.*)$/
artist = $1
elsif song_info =~ /^Title : .{31} Artist: (.*?)\s*$/
artist = $1
end

if song_info =~ /^TIT2 \(Title\/songname\/content description\): (.*)$/
title = $1
elsif song_info =~ /^Title : (.{0,31}?)\s+ Artist: .*$/
title = $1
end

if song_info =~ /^TALB \(Album\/Movie\/Show title\): (.*)$/
album = $1
elsif song_info =~ /^Album : (.{0,31}?)\s+ Year:/
album = $1
end

return [artist, title, album]
end

def mp3_get_length(file_name)
`mp3info -F -p "%S" "#{file_name}"`.to_i
end

def with_timer
time_start = Time.now
yield
return [time_start, Time.now - time_start]
end

randomize = true
if ARGV[0] == "-s" # --sequential
randomize = false
ARGV.shift
end

songs = ARGV.map{|fn| if File.directory?(fn) then Dir["#{fn}/**/*.mp3"] else fn end}.flatten
songs = songs.sort_by{rand} if randomize

songs.each{|song|
time_start, time_elapsed = with_timer do
rv = system "mplayer", song
exit unless rv
end
artist, title, album = *mp3_get_metadata(song)
length = mp3_get_length(song)

next unless length >= 90 and (time_elapsed >= 240 or time_elapsed >= 0.5 * length)

date = time_start.strftime("%Y-%m-%d %H:%M:%S")

File.open("/home/taw/.music_log", "a") {|fh|
fh.puts "#{artist} ; #{title} ; #{album} ; #{length} ; #{date}"
}
}


It's a good idea to commit the log to last.fm often, but I'm not doing it automatically yet, as network problems with last.fm are too frequent. Instead inbox_size.rb reminds me if there are old uncommitted entries in the log:
  # .music_log not empty and older than one hour
if File.size("/home/taw/.music_log") > 0 and File.mtime("/home/taw/.music_log") < Time.now - 60*60
items << "Music log not clean"
end

Uncommitted stuff in repositories


I sometimes get distracted by some interruption and forget to commit things to repositories.
I wrote uncommitted_changes script which checks local checkouts of all repositories I use (currently 1 SVK and 2 SVN repositories) if there are any uncommitted changes. I use svn/svk diff instead of svn/svk status as the latter finds all kinds of temporary files, and I always svn/svk add all new files when I start coding anyway.

Dir.chdir("/home/taw/everything/") { system "svk diff" }
Dir.chdir("/home/taw/everything/rf-rlisp/") { system "svn diff" }
Dir.chdir("/home/taw/everything/gna_tawbot/") { system "svn diff" }


inbox_size.rb simply checks that output of this script is empty:
  # Uncommitted changes
uc = `uncommitted_changes`
unless uc == ""
items << "There are uncommitted changes in the repository"
end

Unread Gmail emails


The last kind of inbox items tracked by inbox_size.rb are email inbox items. Google APIs are almost invariably ugly Java-centric blobs of suckiness, so instead of using Gmail API I simply get the list from RSS, parsed using magic/xml.
  # Unread Gmail messages
unless $offline
gmail_passwd = File.read("/home/taw/.gmail_passwd").chomp
url = "https://Tomasz.Wegrzanowski:#{gmail_passwd}@mail.google.com/mail/feed/atom"
XML.load(url).children(:entry, :title).each{|title|
items << "Email: #{title.text}"
}
end

Tuesday, June 12, 2007

How to be productive

Typical Teenageryness by Mr. Greenjeans from flickr (CC-NC-SA)

Personal productivity, Getting Things Done, or whatever you want to call it, became one of the biggest things on the Internet in the last few years.

Everybody seems to feel they're not achieving as much as they could. Most people feel overwhelmed by having too many things to do. They procrastinate on important things and feel guilty later. They would like to do something about it, but aren't exactly sure what can be done. Maybe they even tried something in the past and failed.

Now would be a great time to try again. The Internet contains all the producticity resources you will ever need, and so many new fun distractions that at some point you will simply have to act.

There are many productivity resources, each telling a somewhat different story. To a large extend they simply focus on different things, but some techniques recommended by some and strongly discouraged by others. This situation is not really much different from other fields. For example in software engineering pretty much everybody agrees about using revision control and test-driven development, but about things like which web framework to use or wheather to write specifications or not, there are as many opinions as people asked.

This post is not attempting to create The Grand Unified Theory of Productivity. It wouldn't really work, just like no Grand Unified Theory of Software Development is possible at this point. I think live and work of web developers, brain surgeons, and newspaper cartoonists differ too much, people's personalities differ too much, and even if a single "right" answer exists, we are likely not to know it yet.

Here's a quick walkthrough on things that people all seem to agree on.

  • You can do something about it. Being productive is a skill, not a innate ability.
  • Simple tricks may bring you some improvement, but if you want a major improvement, systematic approach is needed.
  • Never keep anything in your head. Human brain is great at thinking but sucks as a storage place. Paper is better. Plain text files are better. Personal wikis are better. Everything is better as a storage place than your head.
  • Always think on paper. Drawing mindmaps using colored pens works particularly well. Just like nobody creates software or does math in their heads, planning without some writable surface to put your plans on is just horribly ineffective. Personally I think that paper is far better than any computer-based writing system so far, but computer-based systems at least beat doing it in your head.
  • When in doubt, toss it.
  • Throw away reference material that you aren't sure if you will need.
  • Throw away good ideas. Write about them on your blog so someone else may use them or just toss them. Throwing away good ideas creates mental space for great ideas. Throw away bad ideas too of course.
  • Simple flat reference systems work better than complicated hierarchical systems. If you forget when exactly you put something in flat system there are only a few places to check. In a hierarchical system number of places is much larger.
  • Measuring efficiency in percents and trying to be "100% efficient" is one of the worst ideas you could have. Even if you spend all your time doing your tasks with the maximum humanly possible efficiency, are they the best things you could do ? Is it really impossible to have more impact, do more important things, earn more money, or whatever ? For example programmers are getting twice as productive every 6 years. How can you assign percent value to their current productivity ?
  • Perfectionism leads to a huge waste of time. 20% of effort generates 80% of value. So the other 80% of effort generates just 20% of value. Anything worth doing is worth doing poorly, getting it done fast, and improving it with time.
  • Things show in your life as amorphous "stuff". For each thing which shows up decide up front what is it, if you want to do something about it, what is your desired outcome, and what's the very next action leading there.
  • After you decide it, put it on some lists which you will look at often enough to keep it out of your head. Your world and your priorities change very quickly, so review this list often, at least once a week.
  • "Important" and "urgent" are not the same thing. Many things are very important but never get urgent - like learning new skills. Other things seem urgent but have very little long-term value. Spend more time doing the important, and less time doing the not so important but urgent things.
  • Every single productivity expert agrees that single-tasking is far more effective than multi-tasking. I'm not really convinced here. Maybe it's a personality issue, with some peolpe having much shorter attention spans than others. Even if you're not going to single-task it's a good idea to limit number of things you're doing at the same time to only a few.
  • If something can be done in less than 2 minutes, do it when it shows up or toss it, even if it's not very important. Managing such tasks takes more time more than doing them up front.
  • Some things are boring, but you want to do them anyway, and they don't take that much time. You know, like packaging and documenting software. So just do them right now and be done with them.
  • Detailed plans, deadlines, ABC priority coding and so on would only work well if things weren't changing fast. In other words - they don't well work for anyone these days.
  • Complex tasks should be split into small steps. "Make Ruby faster than Java" is a nice goal, but how do you even start ? "Create some benchmarks measuring performance of Ruby", "Profile Ruby interpretter to identify bottlenecks", and "Replace Ruby hash table implementation by Judy" are something you can actually do.
  • Whatever system you have, it will need regular review. Without it even the best systems would break and you'd be back where you started.
  • Take a lot of notes, throw away 80% of them later. Making too many notes it better than not making enough. Always have some pen and paper with you.
  • Don't accept too many commitments. If you don't care about something, just say no.
  • Eliminate floating information. Every information should have a "home", and be easy to retrieve.
  • Have a single system.
  • If you have something on your list of things to do, but avoid doing it, ask yourself why is it on your list.
  • Humans cannot work productively more than about 40 hours a week.
  • Feedback is important. Unit testing results, money, number of people who visit your blog, any feedback.
  • People give negative feedback much more often than positive feedback. It might be a good idea to change it.


The best known productivity book these days is Getting Things Done by David Allen. It's available on paper, PDF, and audio, and the GTD system is described on thousands of websites and blogs. Another popular one is First Things First by Stephen Covey.

High productivity is achievable for everyone, in every context, including contexts not usually associated with "productivity", what you can see on the following video by Melissa Gira from Sexerati (CC-NC-ND):

Tuesday, May 29, 2007

Using home directory as GTD inbox

fighting cats!!! by _Xti_ from flickr (CC-NC)
Here's a bit about my GTD system. It's mostly paper-based, with 85mm x 85mm paper cards, physical file folders and so on, but a lot of information comes in electronic form, and it needs to be managed.

So firstmost I have big directories for all kinds of information:

  • /home/taw/reference/* - electronic equivalent of the general reference system, with thing being in direct subdirectories, one "item" per directory
  • /home/taw/everything/ - checkout of svk (formerly svn) repository of all my software
  • A few directories like /home/taw/movies/* for The Colbert Report etc.
  • Everything else in the home directory or Desktop which is not a dotfile is "stuff" and needs to be processed.
There's a long way between knowing something needs to be processed and actually processing it in timely manner, so I want to be reminded about stuff I leave for too long. First I wrote a simple Ruby script that can be used to notify me about various events. It uses KDE DCOP service KNotify to actually display notifications.
header = "Notification"
msg = ARGV.join("\n")

system 'dcop', 'knotify', 'Notify', 'notify', 'notify',
header, msg, 'nosound', 'nofile', '16', '0'
And now the script which runs on detached screen or something like that to bug me about unprocessed things.
items_whitelist = %w[
/home/taw/Desktop
/home/taw/everything
/home/taw/ipoddb
/home/taw/music
/home/taw/movies
/home/taw/local
/home/taw/ebooks
/home/taw/img
/home/taw/website
/home/taw/website_snapshot
]

max_displayed = 10

big_timer = 5
old_items = []

while true
items = (Dir["/home/taw/*"] + Dir["/home/taw/Desktop/*"] - items_whitelist).sort
items = items.map{|x|x.sub(%r[\A/home/taw/],"* ")}.sort
next if items == []

if items == old_items
big_timer -= 1
sleep 60
next unless big_timer == 0
end
big_timer = 5

sz = items.size

if items.size > max_displayed
displayed_items = items.sort_by{rand}[0, max_displayed].sort + ["* ..."]
else
displayed_items = items
end
system "notify", "Inbox is not processed", "#{sz} items in your inbox:", *displayed_items

sleep 60
old_items = items
end
One more thing - I use Download Statusbar extension for Firefox and download everything to /home/taw/Desktop without asking any questions. That frees me from thinking about stuff I download - it's all going to the "home directory inbox".