« Beeminder home

Beeminder Blog

Abstract diagram illustrating a sorting algorithm

Last month we announced a handful of new features and we’d like to start by adding one more to the list. Namely, if you fail to enter data on a do-less goal and Beeminder enters a pessimistic presumptive report (PPR) for you, that goal will sort to the top of your dashboard until you add the missing data. (This has made do-less goals so much nicer for me personally.)

Screenshot of the top of my dashboard

As part of that change, we changed “DEADLINE” in the dashboard header to “URGENCY”, which brings us to the philosophical part of this blog post.

Paternalistic Black-Box Sorting

We believe in Opinionated Software and our Opinion is that urgency means seeing goals in this order on your dashboard:

  1. Frozen goals
  2. Do-less goals with PPRs
  3. The rest of your goals, sorted by safety buffer
  4. Tie-breaker: more expensive goals first

A frozen goal usually means one that you completed successfully. It has reached its end date and has a smiley face on it. (In rarer cases it can be a goal that derailed but couldn’t automatically rerail due to a problem with your payment method or because you scheduled it to be archived.) We need these goals at the top of your dashboard for anti-cranial-silicosis reasons. This is especially true because of how easy it is to inadvertently end up with a goal end date sooner than you intended, unfortunately. Letting frozen goals be buried at the bottom of your dashboard would be a behavioral economic disaster. We want them up in your face until you make the decision to restart them or archive them. It’s important that they don’t go out of sight, out of mind unless you explicitly choose for them to do so. (To be clear, this part has already long been the case.)

Next is what we described at the top of this post. Philosophically speaking, do-less goals with PPRs are next because these need to be up in your face as well, partly because of the QS First principle: PPRs make your graph less reflective of the real-world thing it’s measuring. Assuming you care about the accuracy of your graph — which we feel strongly that you should! — you need these goals to get your attention when they need data, even if they’re far from derailing.

After that, sorting by when the goals will derail is obvious, as is the tie-breaking. We’re all pretty deadline-driven here.

Tech Nerd Interlude: urgencyKey in the API

Thanks to our amazing iOS maintainer, Theo, for suggesting this part. The Beeminder API now includes an urgency key for each goal, that looks like this:


Technically that’s encoding all the layers of sorting described above, and which we’ll explain shortly, since this is the tech nerd interlude section, but the point is, even as a programmer using this, you don’t have to know or care how that key is constructed. You just sort (ascending) the goals by that key to get them in order of decreasing urgency. But in case you’re curious, here’s how we build it:

  • the first 4 characters are FRO1 or FROx for “is / isn’t frozen” so frozen goals sort first
  • the next 4 characters are PPR1 or PPRx for “has / doesn’t have a PPR” so goals whose most recent datapoint is a PPR are the next highest on the dashboard
  • the 10 digits after DL are the unixtime in seconds of deadline (now + safebuf) so goals due sooner sort higher
  • the 10 digits after the P are \(10^9\) minus the pledge in cents, so goals with higher pledges sort higher
  • the goalname at the end is a final tiebreaker to sort alphabetically by goalname so the sort is stable

Again, consumers of the API (like the Android and iOS smartphone apps) should just treat it as the definition of urgency handed down from God and sort by it (as ascii or unicode, whatever’s convenient).

Future Work

We expect this to come to the smartphone apps next month. Longer term, we’d like Beeminder to be smarter about what urgency means. We have an internal spec that involves generalizing our setting for numeric precision and letting the user specify how long a quantum of progress (measured in goal units) should take. Then we can sort goals not by when they’re due but by when you need to start them by. Work in progress! The beauty of the black-box urgency key implementation is that we’re free to define and redefine urgency to our hearts’ delight as we have such ideas.

In the meantime, you may have your own ideas about urgency and want to, say, pin important goals, bury ones you don’t need in sight, or filter goals in various ways. We view all of that as client-side choices to be made on top of Beeminder’s choice about urgency order. If you want a taste of such features, we recommend Benjamin Fox (zzq)’s browser extension, BeeBrowse.