Productivity with random numbers

One little productivity trick I use is to select tasks or work with a random number. The simplest form is numbering a list of things you could do, then selecting one randomly.

This can be applied to various things you might want to work on:

The random number generator on random.org is quite nice for this.

It’s helpful for a few reasons:

The idea is also summed up by this AJATT tweet:

If you have the list of tasks as a text file (e.g. todo.txt), then you can get a random task with shuf:

shuf -n 1 todo.txt

I use Todoist (referral link) to stay sane with all the various tasks I accumulate. I apply the “random task” approach to it with this Python script:

import todoist
import os
import random

api = todoist.TodoistAPI(os.environ['TODOIST_TOKEN'])
api.sync()

item = random.choice([i for i in api.state['items'] if i['date_completed'] is None])
print(item)

You can alias and run it as a one liner in bash:

alias randomtodo="python -c 'import todoist;import os;import random;api=todoist.TodoistAPI(os.environ[\"TODOIST_TOKEN\"]);api.sync();print(random.choice([i for i in api.state[\"items\"] if i[\"date_completed\"] is None]));'";

Then you can fill any bit of time with something useful by running randomtodo a few times until you get something doable in the time you have. You also keep your list fresh by regularly reviewing a random sample.


Tech mentioned