# Design question

**URL:** <https://www.ruby-forum.com/t/design-question/136888>\
**Category:** Rails\
**Created:** [May 7, 2008, 5:00am UTC](https://www.ruby-forum.com/t/design-question/136888 "2008-05-07T05:00:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [May 7, 2008, 5:00am UTC](https://www.ruby-forum.com/t/design-question/136888/1 "2008-05-07T05:00:41Z")

</div>

Hi,

I’m developing a budget planner for myself and do have a table for  
recurring  
expenses, as well as a transaction table for my bank account CSV file  
uploads.

Questions: For the projections forward in time I’m wonder whether to:  
(a) keep it simple and just calculate future balance projections on the  
fly,  
then feed to gruff graphs  
(b) each time a recurring item changes, or transaction, project the  
future  
expenses into the one “transaction table” (i.e. one table for actual as  
well  
as projected)  
© create a separate table for future projections (but then have to use  
both to create a past to future balance plot)?

Comments on best design approach for a very low usage app.

Cheers

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [May 7, 2008, 4:53pm UTC](https://www.ruby-forum.com/t/design-question/136888/2 "2008-05-07T16:53:13Z")

</div>

I’d check into the runt or recurrence gems. Both provide a pretty  
simple way to manage recurring ‘events’ (where you have control over  
what an ‘event’ is). runt, for example, allows you to say “give me  
all the occurrences between May 1 and June 15”. Given that you could  
run through the calculated occurrences and build an array of debits/  
credits that you feed to gruff.

On May 6, 11:00 pm, “Greg H.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [May 8, 2008, 12:25pm UTC](https://www.ruby-forum.com/t/design-question/136888/3 "2008-05-08T12:25:16Z")

</div>

thanks Andy - I wasn’t aware of runt, it looks excellent. If I have  
hundreds of data point I wondering if I can let gruff handle this, or  
whether I’ll have to somehow “smooth” out the points prior to sending it  
to  
gruff (the graphing library)?
