unsorted thoughts from Jonathon Anderson (old posts, page 6)

Getting things done after Getting Things Done

I first looked into Getting Things Done my first year out of university. Though I suppose having some sense of personal organization and time management would have been nice to have in the seventeen years of study prior, my new state as an employee sent me searching for something more than excuses and a general habit of procrastination.

I'm the kind of person who visits a bookstore just to hang out. (If I ever conquer my own commercialism I'll hopefully transform into a library patron.) It was at one of my many trips to the local Barnes & Noble that I saw a copy of David Allen's book. Though I had heard of the book before, but the simple cover, pleasing proportions, and unassuming title shone through my initial cynicism. I picked up paperback, and made short order.

Getting Things Done, by David Allen

Soon my life was awash in contexts… lists… habits… projects… actions. I had a little paper notebook that contained everything I needed to not have to remember; I had 43 folders in my desk and in my reader, and even more manilla in a box full of files; I had an other box full of "stuff" that kept the stuff out of sight; and I was trying (mostly failing) to have weekly reviews about what I had done, what I was doing, and what I needed to do next.

This actually worked pretty well. I spent less time worrying about forgetting things, because if I needed to remember it, I just wrote it down. I spent less time trying to spin up to productivity because I already had "next actions" for all of my "projects."

I even had an empty email inbox.

…but all of this new headroom gave me the freedom to notice seams between David Allen's proposed system and my own requirements. First was in the sense of contexts: though, in a corporate office, simple things like "@phone" or "@desk" or "@home" effectively partition a task space into appreciable chunks, I work in computers. The vast majority of my tasks are "@computer" or, at the very most, "@Internet." That doesn't do much to calm the mind when you're staring at a long to–do list.

I liked the ubiquity and tactility of paper, but the medium has its faults. Completed tasks clutter up the page, and to clear them you have to transcribe any remaining items to a new page. Reorganizing items into different contexts bring the same problem. There's no way to archive (let alone audit) task history without even more transcription, since tasks for different projects are physically intermingled. Most damningly, separating tasks from the notes that go with them is both a mental and physical context–switch that plagues every non-trivial task.

For its faults, GTD had actually taught me a lot of really good lessons:

  1. The brain is way better at thinking than remembering.

  2. The less you have to remember, the more you can think.

  3. The more you need to think, the less you want to think.

  4. Don't waste time making the same decision twice.

  5. Lists add a sense of progression to otherwise intangible work.

  6. There is too much to do to consider all at once.

All existing GTD software was powerless to placate a sysadmin's sensibilities. It's all point–and–clicky, high–friction, and, worst case, web-based. I did the only thing I could do: I moved all my lists to text files, added one project ("write command-line GTD software" and one action ("brainstorm requirements for GTD software").

That project didn't go so well; but it's ok, because since then I've migrated to Emacs Org-Mode.

The Org–Mode Unicorn

Rather than being a software environment that I had to re–factor my workflow into, Org–Mode provides a rich set of (extensible and seemingly–infinitely–configurable) functions to manipulate my text lists–cum–text–files as I see fit. All of that on top of a mature <strike>text editor</strike>lisp runtime (albeit one with which I had no experience).

First off, I configured Org–Mode with some familiar list item types:

(setq org-todo-keywords
      '((type "ACTION(a!)"            "|" "DONE(d!)")
        (type "PROJECT(p!)"           "|" "DONE(d!)")
        (type "WAITING(w!)"           "|" "DONE(d!)")
        (type "SOMEDAY(s)" "MAYBE(m)" "|")
        (type                         "|" "DELEGATED(g@)" "CANCELLED(x@)")))

…then configured some simple logging:

(setq org-log-into-drawer t)
(setq org-log-reschedule 'note)
(setq org-log-redeadline t)
(setq org-log-done 'time)

Suddenly my lists grew automatic logging in the form of the LOGBOOK drawer:

* PROJECT make a new first post on civilfritz
:LOGBOOK:
- State "PROJECT"    from ""           [2011-08-15 Mon 21:04]
:END:
** DONE figure out the post sorting problem
CLOSED: [2011-08-16 Tue 20:35]
:LOGBOOK:
- State "DONE"       from "PROJECT"    [2011-08-16 Tue 20:35]
- State "PROJECT"    from "ACTION"     [2011-08-16 Tue 08:04]
- State "ACTION"     from ""           [2011-08-15 Mon 22:31]
:END:
** ACTION write about getting things done after getting things done
SCHEDULED: <2011-08-16 Tue>
:LOGBOOK:
- State "ACTION"     from ""           [2011-08-16 Tue 21:09]
:END:

Of course, that's a lot of clutter, too; but that's just what's physically stored in the file. Org–Mode provides a flexible view of the outline. For example:

* PROJECT make a new first post on civilfritz
  :LOGBOOK:...
  * DONE figure out the post sorting problem...
  * ACTION write about getting things done after getting things done
    SCHEDULED: <2011-08-16 Tue>
    :LOGBOOK:...

That's much easier to look at. In Emacs, color is used to make the content even clearer.

As simple as these little bits of text are, the triviality of their automation means that they can be parsed by other parts of Org–Mode. Most notably, by the agenda.

(defun org-find-agenda-files ()
  (find-lisp-find-files "~/agenda" "\.org$"))
(setq org-agenda-files (org-find-agenda-files))
(setq org-agenda-start-on-weekday 6)
(setq org-agenda-skip-scheduled-if-done t)
(setq org-agenda-skip-deadline-if-done t)
(setq org-agenda-custom-commands
      '(("S" "Unscheduled actions" tags-todo "TODO=\"ACTION\"+SCHEDULED=\"\"")
        ("D" "Undefined deadlines" tags-todo "TODO=\"WAITING\"+DEADLINE=\"\"")))
(setq org-stuck-projects
      '("TODO=\"PROJECT\""
        ("ACTION" "WAITING")
        nil
        nil))
Org-Mode agenda view

The agenda serves the same function as the context "next action" lists from GTD; except where contexts are static, the agenda is dynamic, built on-demand and filtered by arbitrary tags (which replace contexts themselves). Further, the "stuck projects," "unscheduled actions," and "undefined deadlines" lists make it easy to find orphaned tasks (now a part of my weekly review).

* ACTION [#A] weekly review                                       :work:home:
  SCHEDULED: <2011-08-20 Sat ++1w>
  :LOGBOOK:...
  :PROPERTIES:...
  - Review stuck projects (C-c a #)
  - Review unscheduled tasks to be done this week. (C-c a S)
  - Review waiting items with no specified deadlines. (C-c a D)
  - Review someday/maybe items. (C-c a t 5 r, C-c a t 6 r)
  - Review the past week's accomplishments. (C-c a a l v w b)
  - Review the upcomming week's actions. (C-c a a v w)

All of the historical logbook data is pulled together in the global logbook view, which I can now inspect separately (again, as part of my weekly review).

Org–Mode logbook view

I use Org–Mode to record virtually everything that I do or need to do, either at work or at home. It really has become my post-GTD, and I have yet to find a requirement that surpasses it. On the contrary, I often find new solutions just as streamlining reveals deeper bottlenecks.

I'll post more of my .emacs and workflow in the future, I'm sure. Until then, feel free to send any questions or comments my way.

bash ‘local’ directive eats status codes

Did you know that the local directive in bash returns a status code? I didn’t.

#!/bin/bash

function return_nonzero
{
    return 1
}

function main
{
    v=$(return_nonzero)
    echo $?

    local v=$(return_nonzero)
    echo $?

    local v
    v=$(return_nonzero)
    echo $?
}

main

At runtime:

$ bash local-return-code.sh
1
0
1

At least some bugs teach you something new.

Numbers 12

Then Miriam and Aaron spoke against Moses because of the Cushite woman whom he had married (for he had married a Cushite woman); and they said, “Has the LORD indeed spoken only through Moses? Has He not spoken through us as well?” And the LORD heard it.

Now the man Moses was very humble, more than any man who was on the face of the earth.

Suddenly the LORD said to Moses and Aaron and to Miriam, “You three come out to the tent of meeting.” So the three of them came out. Then the LORD came down in a pillar of cloud and stood at the doorway of the tent, and He called Aaron and Miriam.

When they had both come forward, He said, “Hear now My words: If there is a prophet among you, I, the LORD, shall make Myself known to him in a vision. I shall speak with him in a dream. Not so, with My servant Moses: he is faithful in all My household; with him I speak mouth to mouth, even openly, and not in dark sayings, and he beholds the form of the LORD. Why then were you not afraid to speak against My servant, against Moses?”

birthdays | leaving Facebook

I’m in the process of closing my Facebook account. I never really used it: I’m just not that sold on the idea of a fake social network that rules your life. There are three use cases for me, though, and I need to port the relevant data (or service) elsewhere: the birthday calendar; the instant messaging service, and the photos that are already there.

The birthday calendar

I don’t want to lose track of the birthdays that people have published on Facebook. Going forward, I’ll have to maintain the calendar myself, and that’s fine; but I need to port those birthdays to something more standardized. (That is, likely a regular calendar with iCalendar support.)

Much to my surprise, Facebook makes an iCalendar file available explicitly for birthdays. It’s under Events→Birthdays→Export Birthdays. This link provides a webcal: url, which wikipedia tells me is an unofficial url for serving iCalendar files. In OS X 1.6, this url was automatically parsed by iCal, which wasn’t precisely what I wanted, so I just addressed the same path over http: and got a standard .ics file in my Downloads.

I already have a ‘Birthdays’ calendar in Google Calendar (which I’ll probably be trying to move away from at some point, too) so I just imported this .ics file and merged it into the existing calendar. There’s definitely birthdays in there that I don’t really care about (sorry, peoples!), but I can filter those down as they come up.

I thought I understood Unix filesystem permissions

I’ve been using ’nix operating systems (mostly Linux distributions) since my freshman year of college. I’m mostly self-taught, fair enough, but there was an appreciable quantity of ’nix in my coursework as well. I’ve worked in HPC since 2006. I use Apple OS X as a primary desktop OS because it’s a BSD that I don’t have to get working myself.

With this in mind, imagine my embarrassment to today discover a fundamental misunderstanding of ’nix filesystem permissions.

We, at the KAUST supercomputing laboratory, use a central LDAP directory for authentication and authorization. Predominately Linux hosts use a combination (not necessarily all at the same time) of nss, pam, and sssd to communicate with this directory.

Way back in time immemorial, a coworker designed a series of scripts for doing basic CRUD operations; e.g., create an account. This solution not only creates a posixAccount object, but also creates a posixGroup object. This group has a cn equal to the posixAccount’s uid, and a gidNumber equal to the posixAccount’s uidNumber. This posixGroup is used as the primary group for that account: it’s gidNumber is stored in the posixAccount’s gidNumber. The intent here is both to simplify management of “project groups” such that none of them are used as the user’s primary group and to protect user files from other accounts on the system.

For reasons based mostly in my own compulsive desire for neatness, we decided to eliminate these user-private groups in favor of the universal primary gid “100” (or “users”). The CRUD script was updated accordingly, and the long task of updating the existing filesystem began:

find /gpfs \( ${long_series_of_groups} \) \( \
    \( ! -type l -exec chmod g-rwx {} \; \) , \
    -exec chown -h :100 {} \; \)

The intent here is to chown any file currently owned by a user-private group to the new users group, and to chmod group rights from such files (since effectively no group rights were granted, given the ownership by a user-private group).

I was met with surprise when access was later denied to such files.

Apparently, ’nix filesystem permissions are disjointed. Access by the file owner is only mediated by the owner bits; access by group members (other than the owner) is defined only by the group bits; and the other bits only apply to users that are not in the first two categories. This means that a file like testfile:

-rw----r-- 1 root users 0 2011-07-03 07:38 testfile

is not readable by members of the users group, even though the r bit is set in the lowest order.

It seems that, rather than chmod g-rwx, I should have copied group permissions from the “others” access rights.

edit:

A coworker has advised that I post the find command that I’m using to fix this. Apparently using multiple -execs is convoluted or something.

find $fs -group users ! -type l \( \
    \( -perm -o+r -exec chmod g+r {} \; \) , \
    \( -perm -o+w -exec chmod g+w {} \; \) , \
    \( -perm -o+x -exec chmod g+x {} \; \) \)

Κωστας

We had a few days in Athens after we sailed the Aegean Sea with the crew of the Tahita. We didn’t have a lot of plans (aside from the obvious archaeological sites) so I asked Sotiris for some recommendations.

One thing that stuck out to me was Κωστας, which he described as, “the best Σουβλάκι in Athens.” In keeping with the rest of Mystic Blue, this place was the antithesis of tourism: a couple standing behind a counter, making up to two γύρος at a time.

It was, without a doubt the best Σουβλάκι we had. In fact, we went back again before we left.

things stolen from our house

Someone broke into our house and stole from us while we were on vacation in Greece. I had hoped that, when we returned home, I’d write a bit about our trip; but after the theft all I could think about is how broken my world felt.

I was upset about losing the things that were stolen. God has blessed us, and we’ll be alright, but I hate spending money. I didn’t like spending money to buy things in the first place, and it seems doubly wasteful to replace luxury items. Was it wrong to purchase these things in the first place? It certainly seems like it was a waste when they’re gone.

Before we left, a few emails were being circulated about break-ins on the KAUST campus. I usually think that such stories are overblown. People overreact, and panic, and I don’t want to be like that.

I felt like there was so little I could do to prevent this in the future. We’re on a closed campus, with photo ID’s checked at the gate. That gave me this implicit sense of security within these walls; but now I’m questioning everyting. One of the first things that we did was have key control replace the locks on our doors; but KAUST manages the locks: if someone in key control is stealing things, who can stop them? What if someone in the transportation department is targeting people that they know have gone to the airport?

I wrote all this pretty soon after it happened, when I was trying to make sense of my disconcertion about everything. A few days layer, though, we got a call from KAUST security telling us that they thought they had recovered some of our property. A group of four or five guys from the housekeeping service were using their positions to stake out houses that had things worth taking.

So there you have it: I got some closure. We didn’t get everything back (Andi’s necklace and my netbook, most disappointingly) but my relative peace with that makes me feel a little bit better about the materialism that I feared in myself. I think what I needed was an end to the story. That’s a different problem, but it at least disappoints me less than it would for me to find out that my material possessions possess me as much as they seemed to for a bit.

Here’s a list of what we’ve noticed missing so far:

  • Macbook Air ($1400) (returned)

    Part number: MC906LL/A Serial number: [redacted]

  • HP Mini 1000 netbook (approx. $300)

  • Fourth-generation, 8GB iPod Nano, green ($150) (returned)

  • Fifth-generation, 8GB iPod Nano, blue ($150)

    Part number: MC037LL/A Serial number: [redacted]

  • Nokia mobile phone for AT&T GoPhone service (approx. $40)

  • Nokia mobile phone and Mobily sim card (approx. $40)

  • gold necklace

    I got this for Andi last Christmas in Al Balad, but I don’t remember how much I paid for it at all.

  • yurbud Ironman earbuds ($50)

  • Nike+ iPod dongle ($30)

  • Foam laptop zipper sleeve (approx. $20)

  • 60W MagSafe Power Adapter for Macbook ($80)

    This was attached to an extended power lead (adapter-specific) that was also taken.

  • Olympus digital camera, waterproof (approx. $170) (returned)

    It wasn’t this precise model, but it was one of these Olympus waterproof cameras.

  • Power adapter for a Western Digital MyBook external hard drive (partial, unknown)

    I think this might have been taken by mistake for one of the phones that was taken.

  • Pocket watch (approx. $100)

    Andi got this for me when she was in Turkey.

Bible in a year

I regret that I’ve never actually read all of the Bible. It’s possible that I have, I suppose–I’ve been in the church long enough–but never intentionally. Never specifically and definitively have I read the whole thing.

Unsurprisingly and relatedly, I’m not very diligent in scripture reading. I know I’d like to be in the scriptures every day; but, for some reason, I’m not.

I’m picking out a reading plan. This particular one happens to be “chronological” (in order of events, not writing) which appeals to me, somewhat. I’ll start tomorrow, and maybe having a goal (read every day; write about it) will encourage me to stick with it. I sure hope so.

At the same time, I really want to know more about the history of the Biblical canon. I’ve got so many opinions about the scripture itself bouncing around in my head, but with no authority or knowledge to justify them. I’m less certain what the right move is to clear up that problem (just trolling the Internet is probably the wrong move), but I’ll look for a book or something.

migration-to-linode

I’m migrating to linode. I’m getting

  • Debian Squeeze

  • twice as much memory for the same price

  • IPv6

  • to avoid the forced migration to rackspace

I’ve already moved dns and mumble services, and that went smoothly enough. I’m afraid of moving http for some reason, so I’m just going to do it and fix problems when they arise.

Let me know if something breaks.

edit: Well, that seems to have gone well. Authentication even still works.

The only thing left is mail.

You, oh Lord, are a shield

You, O Lord, are a shield about me, my glory, and the lifter of my head.

I cried aloud to the Lord, and he answered me from his holy hill.

I lay down and slept; I woke again, for the Lord sustained me.

I will not be afraid of many thousands of people who have set themselves against me all around.