muflax65ngodyewp.onion/content_blog/personal/balancing-your-goals-a-prog...

5.7 KiB

title date tags techne episteme slug
Balancing Your Goals (A Programming Problem) 1970-01-01
:wip :speculation ?p=717

I use a GTD system called fume (short for "future me") that looks like this:

(Ruby Gem. No documentation because fuck you.)

It's driven by a specification file in which I tell it what contexts (projects) I'm working on, what (major) tasks are involved and how much time I'd like to ideally dedicate to each. (Current version. The syntax should be self-explanatory, or at least it is if you're muflax.)

Now, of course I know that "2 hours of studying per day" is optimistic. (I only studied 6.5 hours in the last 7 days.) That's not a problem. I use Beeminder to force myself to work at least 4 hours/day on something (or lose some money). This seems to work reasonably well so far. But this doesn't prevent me from just reading the Pre-Nicene New Testament all day (and if you look through the data, you can see there are some mostly-theology days). So I need to also balance my projects.

fume checks how many hours I've spent on each context in the last 24 hours / 7 days / 1 month / ever. For each period it then checks how much proportional weight the context has and how much it should have, according to the specification. It then calculates how much time I would have to spend on each context to balance it and recommends I work on the one that's the most behind.

Often I follow the recommendation, but sometimes I have additional deadlines or mood swings and just work on something else. Over time, contexts become unbalanced. I forget to actually read books or program stuff for fun because I took an overly complicated course.

So I also want to beemind how unbalanced my life is and minimize this value. For some reason I've never seen anyone solve this problem. (Am I the only one who has it? Do others just rely on a vague feeling?)

One way would be to enforce weekly minimums for each goal, but my weekly total productivity fluctuates a lot. I have weeks during which I get maybe 5-10 hours of stuff done, then others with 80 hours. So this doesn't capture the problem.

Ideally, fume would calculate the minimal effort I'd have to put into each goal to balance it, then add it up and use this as my current un-balance. But calculating this is surprisingly hard. (At least if you're muflax.) Balancing one goal will increase the total time worked, which will unbalance all other goals.

You could visualize the problem like so: the goals are a bar graph, each bar representing the time spent on each context. You have a curve laid over the bars. It's normalized so that the area beneath it is 1, i.e. it represents the (ideal) weight of each bar. You can stretch the curve by multiplying it with any arbitrary (positive) factor. Your goal is to find the smallest factor so that no bar is above the curve. The distance between curve and bar is how much time is missing, the sum for all bars the currently necessary effort to balance all goals. How do you determine this factor?

(If that is not understandable, well, sorry. I could draw a picture, but then I'm lazy. (Oh noes, I'm reinforcing a harmful identity! I'm not maximizing my expected utility! (Oh noes I'm signaling cynicism! (Oh noes I'm meta-cynical! I can see the Specter of Robin Hanson coming for me! (Oh noes I'm using too many parentheses!)))))

I've googled curve fitting etc., but couldn't find any existing solution, so I tried coming up with my own. (Try it yourself! Math is fun! [Lie] [Speech 55]) I trapped myself for almost 2 hours trying to figure out an elegant solution, maybe with some initial sorting, but finally the stupid left me and I did it the simple way: iteratively. I take all goals that are currently over-represented, pick one, and scale the curve so that it fits exactly. Repeat until no goal is over-represented. Done.

(A minor point: I only aim to get within a factor of 2 of the ideal ratio. This prevents small goals to escalate the total effort necessary to balance them. For example, if "learn something new" is supposed to take 1%, but has already 2 hours, then the necessary total to balance it is 200 hours - more than a week. The specific factor 2 is just a quick hack and I expect to calibrate it over time until small goals don't fuck things up too much.)

One last problem is that I need to normalize the results. If I spent 80 hours on various projects and forgot one for a bit, I might be unbalanced by 10 hours. If I only spent 8 hours total, I won't be as unbalanced, even if I did only one thing the whole time. Just going by the raw numbers feels like I'm punishing concentrated effort. But then, I get bored by concentrated effort and burn out at least twice a week, so maybe that's not a bad idea.

What I really want is a measure of how inefficient I'm spending my time. How unbalanced my life is. Not how much effort I'm putting in (separate measurement) or how hard it is too undo my damage. More like a health check: "You seem to ignore something. Would you like to work on that >200 books reading list?" So it should be dependent on total effort, but I