Monday, December 23, 2013

Emacs, Org-mode, org-pomodoro, todochiku and Growl

Following my previous post, my first test of the Pomodoro technique was to set up a configuration to use the Pomodoro technique itself :) It took me one pomodoro (25 minutes), so it was quite straightforward.

First, I installed org-pomodoro through the Emacs Lisp Package Archive (ELPA). org-pomodoro is quite simple, you just have to invoke M-x org-pomodoro on a task to start a clock. org-pomodoro automatically stops it after 25 minutes (or any custom duration) and updates your Org task. After 1 pomodoro, your task will look like this:

** TODO Test
   CLOCK: [2013-12-23 lun. 14:55]--[2013-12-23 lun. 15:20] =>  0:25


Then I had to make Emacs able to talk to Growl. For this I used this code, from "Justinhj's Coding Blog". I just had to modify todochiku-command in the Elisp file to link to growlnotify.exe, and to add (require 'todochiku) in my .emacs after putting the Elisp file somewhere in the load-path. Emacs was then able to talk to Growl, with a simple call to the growl function, like this: (growl "Hello" "World"). There even are custom icons.

Finally, I had to modify org-pomodoro so it could send a message when a pomodoro would be finished. org-pomodoro have hooks in its source code:

I just had to add this to my .emacs:

How nice!

Cognitive control and multitasking

I came upon an interesting article yesterday about the effects of multitasking (switching incessantly from one task to another) on the mind. It was published in 2009 in PNAS, by a team from Stanford, and has received substantial coverage by the media. Here is the link.

The abstract is pretty clear about was what observed by the researchers:
"A series of experiments addressed whether there are systematic differences in information processing styles between chronically heavy and light media multitaskers. [...] Results showed that heavy media multitaskers are more susceptible to interference from irrelevant environmental stimuli and from irrelevant representations in memory. This led to the surprising result that heavy media multitaskers performed worse on a test of task-switching ability, likely due to reduced ability to filter out interference from the irrelevant task set."
This is only one experiment, of course, but I can totally relate to these results. Indeed, it has been a while since I noticed my concentration abilities have decreased (maybe a few years now), notably my reading abilities, and I'm quite sure "media multitasking" is to blame here. I'm a heavy media multitasker. When I'm browsing the web, I'm constantly switching from one subject to another, to another, to another... until I forget what I was actually doing or looking for. I don't think my web-browsing behaviour is a consequence of an external change in my psychology, but a cause. The structure of the web itself encourages it, along with constant sollicitations from devices configured to notify you when something happens, or when someone wants to contact you. When I'm reading on paper, I feel literaly trapped. My mind wants to escape.

Lately, this symptom has taken a much more alarming turn. I'm a PhD student in biology and physics, with quite a long list of things to do. I use Emacs and Org-mode to keep things organized, which is an amazingly efficient way of having a whole picture of personal and professional projects, sub-projects, tasks... in my head. But this combination between my "multitasking syndrome" and this way of organizing has a huge drawback: I'm very often incapable of focusing on the current task because my mind is constantly switching its attention to another current/next task (often totally unrelated). Like I was feeling trapped in front of paper, now I often feel paralyzed, torn between two or more tasks, totally inefficient.

It's been a few years since I have been aware of the Pomodoro technique. The Pomodoro technique, as Wikipedia puts it, "is a time management method [which] uses a timer to break down work into intervals traditionally 25 minutes in length, separated by short breaks." Twenty-five minutes focused on a task (these 25 minutes being called pomodori), without interruption, then a 5 minutes break. After 4 pomodori, you can take a longer break.

This technique could be a good way to end my compulsion to multitask, like a cure for my mind. I intend to try it during these Christmas holidays. I was thinking of using good old Emacs and Org-mode with org-pomodoro for that. The workflow would be to clock-in for a particular task with org-pomodoro, work 25 minutes on the task, and then be notified by Emacs (through, for example, Growl) that I have to take a break. That way, the Pomodoro technique would be directly linked to my Org-mode task list!

So, this is day 1. To be continued...