Kerry Buckley

What’s the simplest thing that could possibly go wrong?

Big Visible Belly

leave a comment

Firstly, acknowledgment to Brian Marick, from whom this idea is blatantly stolen.

In an attempt to shame myself into losing a bit of weight, I’m adopting the XP Big Visible Chart approach, with the ‘Big Visible Belly’ graph that now appears at the top of my blog.

The graph is generated by a simple Rails app (here’s the source), using the Sparklines library. The red area above the line represents weights above the top of my ideal weight range, and the green areas below the line indicate a healthy weight. The scales are one pixel per week on the x-axis, and one per pound on the y-axis.

[UPDATE] After posting the initial version I realised that something was wrong, as there ought to have been a tiny bit of green on the graph, and it was all red. After playing with the sparklines library for a while I decided that either it had a bug or I was completely misunderstanding something. I’ve now given up on it, and implemented the graph using raw RMagick calls.

Written by Kerry

August 1st, 2007 at 7:11 pm

Posted in General nonsense

Leave a Reply

You must be logged in to post a comment.