lundi 20 novembre 2017

Poor man's pomodoro

It seems that I have not written about it until know: I have to confess I'm a big fan of the Pomodoro Technique.

Now that I have a new laptop, I've been looking for a timer software. On Windows and MacOs, I used Tomighty. Cool, but Qt version is not in Debian repo and Java version… well it runs on the JVM!

Then I learned about a magical command, notify-send, which sends desktop notifications. So here we go, my timer will be super simple and written in shell script:

# pomodoro aliases
alias PS="pomodoro_start"
alias PSB="pomodoro_short_break"
alias PLB="pomodoro_long_break"

# launch a 25 minute pomodoro
pomodoro_start() {
    # I write the start time, in case I miss the notification
    echo "pomodoro start `date +%H:%M:%S`..."
    sleep 1500

    # using critical level of urgency force me to click on the notification
    # pop up to dismiss it.
    notify-send  --urgency=critical "Poor man's pomodoro" "Time for a break"

    # cvlc is VLC CLI. I play a sound to help me to get out of the zone.
    cvlc --play-and-exit --quiet /some/sound.mp3 > /dev/null 2>&1

    echo "pomodoro end `date +%H:%M:%S`..."

pomodoro_short_break() {
    echo "pomodoro break `date +%H:%M:%S`..."
    sleep 300
    notify-send --urgency=critical "Poor man's pomodoro" "Break over, go back to work"
    cvlc --play-and-exit --quiet /some/sound.mp3 > /dev/null 2>&1
    echo "pomodoro end `date +%H:%M:%S`..."

pomodoro_long_break() {
    echo "pomodoro long break `date +%H:%M:%S`..."
    sleep 900
    notify-send --urgency=critical "Poor man's pomodoro" "Long break over, go back to work"
    cvlc --play-and-exit --quiet /some/sound.mp3 > /dev/null 2>&1
    echo "pomodoro end `date +%H:%M:%S`..."

The Pomodoro Technique is far to make unanimity. I do not practice it strickly by the book. What I like is that it forces me to get out of the zone when I work on a long running task. Though being the zone and experiencing the flow feels good, relying on my timer helps me to get out of it, take a step back from your work and think. Does what I'm doing right know really worth it?

Contrary to what is usually told about the flow, I don't think it's more productive. It's just pleasant. So while it's a good thing for your hobbies to gain the most of energy out of them, it may not be so appropriate when you have stuff to do at work.