Posts tagged ‘prickle’

Prickle v0.4: CouchDB to MongoDB

I took some free time to port Prickle, my stay out of your way time tracking tool, from CouchDB to MongoDB. I originally wrote it to use Pylons and Couchdb specifically because I felt like studying a couple of technologies I hadn’t tried before. I found CouchDB to be a bit unwieldy to code with, and it didn’t take long for it to get slow on my Prickle datasets. Rather than figure out how to optimize CouchDB, I decided to port it to MongoDB.

The port was relatively straightforward. I was able to use pretty much the same model layout (Prickle has a very simple data layer). I tightened it up a bit to use actual references between models instead of implicit foreign keys by ids.

I chose to use MongoEngine for the database layer. I started with pymongo, but decided that a more abstract object-document-manager would be more useful.

I found querying in MongoEngine to be much simpler than the map-reduce queries in CouchDB. It is very similar to the Django ORM with which I am very familiar. Document creation and mapping is also familiar. Overall, I think Prickle will be a lot easier to maintain and extend using MongoDB than it was with CouchDB.

Prickle v0.4 does not contain any new features over 0.3. It also contains one bugfix to the date validation, submitted by Shelby Munsch.

Another release of Prickle, the stay out of your way time tracker

I just released version 0.3 of Prickle, a time tracking tool I’ve mentioned before. Prickle is a simple stay-out-of-your-way time tracking program that I find very useful for my day-to-day work as a consultant. In originally developing it, I modeled it after Freckle. With version 0.3, I consider Prickle to be more usable and more powerful than Freckle for my specific purposes. It may be useful for you as well.

The major improvement in this release is the ability to have multiple types of work for a given project. Each type is represented in the invoice by a different line-item, and can optionally have a different rate. So if you bill admin work at a different rate than development, prickle can handle it on one invoice. This required adding one more field to the log it form, which means one extra keypress for logging line items, but the new field is perfectly comfortable staying blank. It also autocompletes the types for a given project, so it is still stay-out-of-your way convenient.

The other major change is the ability to edit timesheet rows. I find this useful when I occasionally bill a timesheet for the wrong date or project. This is done using inline editing and is very ajaxy. At a user request, I’ve also changed the timesheet view to use hours and minutes rather than decimal representation.

Prickle is now working pretty much as I want it. I may add some reportlab pdf generation at some point so I can automatically e-mail pdf invoices, and a little extra customizability may be in order. The entire interface really wants some design love, but I am really hoping another user will jump up and do that. I’m not what you’d call a design guru. But overall, I think the current feature set is what I need, and I believe it may be useful for a few other people in the consulting field as well.

Prickle version 0.2

Yesterday, I sent out my first invoices using Prickle. Having tested it in production (I had a to fix a couple sort order issues), I decided it was time, already, to release the second version (release early and often, catb says).

In case you missed the introduction: Prickle is a simple time tracking tool I whipped up to avoid fighting with spreadsheets or paying for Freckle. Source is available from github. Dependencies include pylons and couchdb.

So what’s new in v0.2? Mostly minor bug fixes or data display. The invoice summary is a little more useful, most of the display tables have meaningful sort orders (descending by date, usually), and timesheets can be deleted. One bigger feature is a simple javascript timer with start/stop/pause buttons. When you stop the timer, it automatically adds the time to the duration field to allow you to log it. Another is the ability to mark timesheets as “invoiced” without actually creating an invoice. I use this to clean out timesheets that I’m not actually billing for, such as time spent working on prickle, or arch schwag, or editing for my Dad’s new book.

I’m finding Prickle exceptionally useful; If you do a lot of time tracking for freelance work or other tasks, I hope it might be useful to you as well. Please try it out, and if you have any questions, or problems, get in touch!

Here’s a screenshot of Prickle in action:
2010-10-01-151414_1920x1848_scrot

Introducing Prickle, a time tracking tool

I’ve been doing a lot of Django coding lately, and I’ve been doing it very well. But I’ve felt bit of stagnation settling in. I’ve only been coding what I know. I needed to explore, experiment.

So I picked a couple of technologies I’ve heard about but haven’t tried, and started coding. The goal wasn’t to make something useful, it was to learn some new APIs and frameworks. I accidentally made something useful.

So here I present Prickle. Prickle is a time tracking tool for freelancers written using Pylons, CouchDB, and Jinja2. (Those are the technologies I chose to play with.) I decided to write an app to replace Freckle, a stay-out-of-your-way time tracking tool that has been highly recommended to me by favorite alternate freelancer, Dan McGee. Freckle is a great service, but I have a couple problems with it: I hate hosting my data on other people’s machines, and I hate paying money to use a service. Granted, at $12 a month, it’s going to take me years to earn back the hours I put into developing Prickle, but that’s not the point. Replacing Freckle in my daily use was just a little bonus I got while studying Pylons and CouchDB.

All Prickle does is allow me to enter the number of hours I’ve worked on a project, along with a description. It makes entering hours as simple as possible; the date is selected semi-automatically. Hours can be entered in a variety of formats (0:30, 30, 0.5, and .5 all map to 30 minutes 1, 1:00 1.0 all map to 1 hour), so it tends to “just work”. Project names are autocompleted, so it’s just a few keypresses to get to the description box. Now I type a description, press and I’m done.

There are a bunch of views of the timesheets that allow me to see how much uninvoiced time has been spent on a particular project or during a particular month or day. If I set a rate for a project, I also get a summary of how much money I’ve earned on a given day or month, or how much I’m going to have to bill a client for a specific project.

And Prickle does invoicing. It’s very simple invoicing, but very simple is all that I need. It summarizes the hours since the last invoice was created, displays them in an invoice template (I currently use print to pdf to generate the invoice. Maybe later I’ll automate sending an e-mail to clients). Even here, Prickle has some handy helpers to speed up the process. It keeps track of billing addresses for a given project, so I don’t have to enter it each time, and it guesses what the next invoice number should be so I often don’t have to type it in.

Prickle doesn’t have all the fancy graphs and reports that Freckle has, but it quickly answers the primary questions that I ask of my data: How many hours have I billed today? How much money have I earned this month? Am I on target for this project’s budget?

Prickle is open source, and I’m hoping some people will find it useful enough to contribute back to it. I use it daily already, and don’t really have any complaints. Some things I intend to add include:

* A timer with a pause button. I hated this when I first tried Freckle, but it grew on me.
* improved historic view of invoices
* editing or deleting time entries

Some things I invite others to add include:
* authentication. I like to run things locally, so auth wasn’t important to me. It’s also confusing to implement in Pylons.
* styling. I applied some semi-random CSS rules, but I know it’s ugly.
* browser support. This thing works great in chromium, but I’m using some of the most experimental stuff: html 5 inputs, CSS 3, etc. It’d be nice to add some Javascript to make it work on other browsers.

So, Dusty, now that you’ve played with Pylons and CouchDB, what’s your take?

CouchDB is pretty cool to work with. Map/Reduce based queries take some getting used to, but once you’ve learned them, that’s all you have to know. There’s no tuning SQL, the ORM is a very thin layer, it just works. If CouchDB is as scalable as they say it is, I think I’d like to use it some more.

Pylons is kinda nice. Formencode sucks, but other than that, the libraries bundled with or suggested for pylons are pretty intuitive. I’m finding Django is a bit over-engineered these days, or maybe I’ve just been pushing its limits. I was hoping Pylons would be a less bossy solution, but I don’t think I’ll be switching to it or suggesting it to my clients anytime soon. It seems a bit rough around the center, and doesn’t seem any less complicated than Django, in practice.

Next on my list of tools to play with is node.js. I also want to play with web2py, and I may try a zope 3 app just for fun someday, too.