Open sourcing our twime tracker

Courtenay : January 16th, 2009

Oh my god, I just came up with a new phrase. Twime tracker. Shoot me now, please.

Anyway, about a year ago we started writing a “twitter meets time tracking” application, XTT, over at ENTP to track our time. It was more than that, really.. more like 37signals’ In/Out (which they hadn’t released yet), but also like a closed-group twitter-style status update, the difference being we track the times for each status.

It’s invaluable to see who’s working on what, but also, what people spend their time on.

We used XTT pretty much since day 1, and it works swimmingly for a team of 4-14 people (which is how much we’ve grown over the year). We let a limited number of beta testers use it, but it never really took off. I think this is probably because the users were typically single programmers who didn’t need to know what other people were working on.

Add to the fact that there are many other excellent time trackers out there (Harvest, for example) and I didn’t feel that I could turn XTT into a saleable product (it would require another few months of polishing, for not much of a return), so we let it languish. It works well enough for us, but other people just didn’t get it.

Finally, I decided to just open source XTT, and there it is on github: xtt. If you run a small team and want to check it out, let me know how it goes.

A few notes you might find interesting:

  • Much of XTT’s timezone code was extracted and is now in Rails core itself.
  • We take the user’s browser cookie timezone offset, and use that to automatically figure out their local time. We have people in timezones from the UK all the way across the US (3 different zones) and beyond, and it’s worked fine.

  • It has a polymorphic notifier model called a Tendril that lets you notify Campfire or IRC (or anywhere!) when people change statuses
  • It has a mostly-functioning AIM bot, with a patched version of the AIM library Net::TOC (I released this separately). By mostly-functioning i mean that. It has difficulty staying up :(
  • The notifiers know that if you were on a project and then go work on something else, to notify (e.g. campfire) that you’re no longer working on that thing, just so your co-workers know.
  • Each user gets their own “contexts”, which are a way of grouping projects. So, your contractors might group your projects under your company name, but the boss might group projects by client.
  • Full import, export, and in-browser CSV editing of times.
  • You can enter times in the past like this: [-25] for 25 minutes ago, or [-4h] for 4 hours ago, when you forgot to enter your time.

Be aware that this code is released under AGPL, which means that there are limitations on how you can use the code. The main one is you can’t run a hosted version of this unless you release the source code. Other than that, it’s a fairly liberal license.

Where to from here?

If you’re interested in helping out, go fork it and send a pull request. Here are some places that need improvement.

  • There’s no setup/bootstrap
  • There’s no UI on tendrils; right now it’s hard-coded and you have to add a Campfire row in console
  • There are no blank-state messages (“You just signed up, here’s where to go from here”)
  • Some of the time logic is just nasty (particulary chart*.html)
  • There’s no limit if you accidentally forget to set “out”, on the maximum status time. So you could have a 10 hour time.. this could be limited with a user preference.
  • The AIM bot goes down ALL the time. Rather, it just stops responding. I was thinking of adding something like, touching a file every time it loops; if the file gets older than 5 minutes, restart!
  • While the AIM bot keeps a log of everyone’s “away” states (so you could, in theory, set someone “out” when they go offline) it’s not hooked up to anything. This could be a user preference, too.
  • The AIM bot doesn’t rate-limit when it re-connects, so often it’ll just keep sending requests until it’s banned
  • There’s a half-finished Jabber bot in there somewhere
  • Things break when you add statuses that are in the past, but where there was a more recent status
  • Some of the code is lightly tested
  • I’d love to integrate with other services, such as recording times on lighthouse tickets based on user input (Attach blah to #125)
  • Billable vs non-billable hours.
  • Entering actual billing rates for projects/clients/contexts/people so you can actually create an invoice
  • Create invoices

I look forward to how you might use this in your own company. Let me know!

If you want to file bugs, or want support, see our xTT Tender support site

2 Responses to “Open sourcing our twime tracker”

  1. dreamhost promo Says:

    I am new to twitter, this sounds interesting.

  2. Jason Green Says:

    Exactly what I have been looking for! Cheers guys

Sorry, comments are closed for this article.