Bugfree.dk – Ronnie Holm's blog

Not anti-anything, just pro-quality

Creating a DSL for personal accounting in Ruby

Posted by Ronnie Holm on December 30th, 2006

I’ve been reading up on Ruby (and Rails) lately, and I’m in need of a project for getting hands on with the nuts and bolts of the language.

So as an exercise I’ve been thinking about constructing a DSL for describing accounting transactions (debits and credits) and describing reports (income vs. expense and account summaries).

For a couple of years, I’ve been using Gnucash, a double entry accounting system, for simple personal accounting. It works great except it’s Linux only, which is not ideal since I’ve been running Windows on my desktop lately. So every time I need to do accounting stuff, I’ve got to fire up VMware.

Instead it would be fun to literally do double entry accounting in Ruby, by expressing each transaction and report in terms of the DSL.

This way my accounting information can all be recorded using the DSL and when entering the information, you can make use of the arithmetic features and function of Ruby itself, e.g., if an entry must be the sum of several values, you can enter each value and have Ruby do the summing.

  • Share/Bookmark

One Response to “Creating a DSL for personal accounting in Ruby”

  1. Greg Says:

    Hi,

    This is a great idea. I’m sure that people would find it useful if you built it.

    You might be able to take care of some of the reporting needs using my software, Ruby Reports (http://ruport.infogami.com).

    Though I’m going to be busy for the next couple months, I’d keep a close eye on a ruby accounting package and might jump in to help if it got off the ground.

    If you’d like, contact me and maybe we can shoot around some ideas.

    warm regards,
    -greg

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>