Daniel Reeves from Beeminder recently announced that you can now use that service to help you keep your GMail inbox down to zero, as suggested by Merlin Mann in his kinda-famous Google Tech Talk.
You know what? That’s fine for Merlin, but I don’t have a problem with e-mail stacking in my inbox. My physical inbox is my weak point, especially a pile of receipts waiting to be entered into my personal finance app. Chores can be ordered from least troubling to most troubling, and something has to be at the end of that list, right?
Getting Things Done (which is copyright DavidCo 2001) really stresses the importance of regular review. There’s no point in having inbox that you’ll never look at. In my case this pile of receipts developed into a kind of an ugh field, which discourages me from processing my inbox in a timely manner.
There must be a way to use Beeminder to help with this problem. Prima facie there is no easy way to quantify how much should be done. Counting how many items are there in my physical inbox would be a tremendous waste of time. I think I’ll make do with something simpler. Quantifying time spent on processing this inbox isn’t a good idea either. Once I’m done, I’m done, so I might lose simply by running out of work to do.
The idea is to simply count days when I did any amount of work, not
necessarily until the mythical Zero state. Getting a little bit done every so
often should do the trick. There’s also a big chance that once I start work, I
wont stop for a while because of simple inertia.
So, here’s a day counter written in python, using the recently announced Beeminder API. It will help me process my inbox in a timely manner, and can be used to track any „do every so often” type of goal.
#!/usr/bin/python #Beeminder Day Counter by Tadeusz Andrzej Kadłubowski. #A simple Beeminder utility to increment yesterday goal value by one. import argparse import httplib import json import sys import time parser = argparse.ArgumentParser(description='Increment yesterday Beeminder goal value.') parser.add_argument('--user', dest='username', help='Beeminder username') parser.add_argument('--goal', dest='goal', help='Goal') parser.add_argument('--auth_token', dest='auth_token', help='Authentication token (from https://www.beeminder.com/api/v1/auth_token.json)') args = parser.parse_args() username = args.username goal = args.goal auth_token = args.auth_token if not username or not goal or not auth_token: parser.print_help() sys.exit(1) def entered_yesterday(datapoint): yesterday = time.localtime(time.time() - 24 * 60 * 60) datapoint_time = time.localtime(datapoint["timestamp"]) return yesterday.tm_yday == datapoint_time.tm_yday \ and yesterday.tm_year == datapoint_time.tm_year def get_yesterday_value(): connection = httplib.HTTPSConnection('www.beeminder.com') connection.request("GET", "/api/v1/users/%s/goals/%s/datapoints.json?auth_token=%s"%( username, goal, auth_token )) datapoints = json.loads(connection.getresponse().read()) return min([dp["value"] for dp in datapoints if entered_yesterday(dp)]) def add_today_datapoint(value): connection = httplib.HTTPSConnection('www.beeminder.com') connection.request("POST", "/api/v1/users/%s/goals/%s/datapoints.json?auth_token=%s×tamp=%d&value=%d&comment=%s"%( username, goal, auth_token, int(time.time()), int(value), "created+automatically" )) reply = json.loads(connection.getresponse().read()) print reply add_today_datapoint(get_yesterday_value() + 1)
You can download this script from github.
It’s to be placed in a crontab somewhere and run once a day in the middle of the night
30 3 * * * beem_day_counter.py --user=joe_doe --auth_token=abc123abc123 --goal=inbox >> $HOME/log/day_counter.log 2>&1
(Grab your personal authentication token on https://www.beeminder.com/api/v1/auth_token.json)
To use this script with Beeminder create a new custom goal. Pick initial value that is equal to your desired frequency (in the example below I’ll go with „at least once every 4 days”). Start with a flat Yellow Brick Road.
You must also set two advanced options. Set good side of the road to (obviously) „below”, and aggday to „min”. The latter means that Beeminder will pick the lowest out of multiple values for each day. Once you’re done for a day simply enter „0” data point: it’s 0 day’s since you’ve last done the task. The python day counter will start again from 1 tomorrow. That’s it.
That’s my current setup. We’ll see if it makes any sense in the long-term.
Pingback: Beeminder API | Beeminder Blog
Tadek, this is fascinating and I can’t wait to hear how this works for you. I should point out that Beeminder supports something similar: if you create a Do More goal and enter a 1 (instead of a 0 like in your scheme) whenever you do the desired thing, then Beeminder plots your cumulative total on the y-axis and you have to stay above the road (instead of below it like in your scheme).
Do you prefer your scheme because it puts a hard limit of 4 days that you can go without doing the desired habit? With a Do More goal you could build up a safety buffer, which you may not want (we’ll be implementing a feature related to that; stay tuned!). But the Do More goal would enforce an average rate of once every 4 days, or whatever you set.
Any other reason besides unwanted safety buffer that you might prefer your version?
We’re delighted that people are using Beeminder so creatively! Thanks so much for posting this!
Pingback: Beeminder Buzz at 30,000 Feet, and other New Year’s Coverage | Beeminder Blog