JFDI, Dangers of [see also: reinventing the wheel]

Previous Entry Add to Memories Tell a Friend Next Entry
Recently, the Internet's Luis Villa has been using the mantra Just F-cking Do It.

So the other day, I was thinking about how the Baobab guys must hate me, because it looked like I slagged them off for suggesting that their piece of software might not be ready for prime time, default GNOME and about how Baobab could display the data on the screen in a way my Mum would understand. I came up with the idea of a pie chart style display, my Mum understand pie charts, every quarter she gets sent a brochure full of pie charts to tell her where her retirement money is invested.

So I took Luis' mantra to heart. "What did I need to make this a reality?" I thought to myself. I need a widget that can display a pie chart. Cool, but then I would want to select things in a pie chart. I need a table to store information relating to each row, as well as the label for that row, the size and perhaps some other arbitrary data, and I need a way to track changes to that table. So then it hit me, the solution was so obvious, use the existing models in GTK+, the ones we feed into our trees and combo boxes. Half of the infrastructure was already done for me. Great I thought, so I started writing a widget.

As an aside, no matter what people say about the MVC implementation in GTK+, it really is quite good. Especially when you're writing in C. Especially when you want to use those models as the backing data storage for arbitrary widgets. Especially when you want to use the same model with multiple views. Especially when you want to plug custom models that back onto disk storage into those views.

So, I get the fundamentals working, it draws a barebones chart, it responds to model changes, it allows you to set attributes to specify columns and it fires off a signal when you click in the chart. Excellent I think. What happens then? I discovered it's already being implemented. I'm not bitter about this, because I didn't do any research to start with. It also looks like they've done a pretty good job of implementing this too. Plus, it was good practice to hack together the basics of a widget.

Basically, the lesson is this: Luis is right, JFDI, but damned well make sure no one else has f-cking done it already ;)

For those who are interested, the source for my widget. is online.

As an aside, I think the ring view for Baobab looks as fantastic as I hoped it would. Minus some of the random extra buttons (zoom?), I would totally push for this to be the default mode. In fact, I've heard that is what they're planning to do. Unfortunately I also heard that this won't be ready for GNOME 2.16, which is a damned shame. The icon for Baobab should become a stylised version of this ring chart, although I wonder if that would be confused for the Ubuntu logo?
Posted 3/8/06 22:21 — 11 comments

Comments

From:(Anonymous)
Date:2006-08-03 14:57 (UTC)

Might want to look at....

(Link)
Filelight.

For KDE.

Same ring chart, presented very nicely:

http://www.methylblue.com/filelight/

Phil
From:[info]dannipenguin
Date:2006-08-03 15:15 (UTC)

Re: Might want to look at....

(Link)
Looks rather similar, could do with some Cairo love. Everyone loves antialiased curves.
From:[info]murraycu
Date:2006-08-03 15:03 (UTC)

yeah

(Link)
I think I've seen this in Star Trek.

Also, there's probably pie-chart code in libgoffice, for gnumeric's charting stuff.
From:[info]dannipenguin
Date:2006-08-03 15:13 (UTC)

Re: yeah

(Link)
It is a little Star Trek, isn't it ;)

I've had a look through Gnumeric's charting code (I wanted a specific type of chart that I ended up faking in Matlab). I don't think it would be too easy to remove it as a widget, and it's not really designed to do the kind of thing that I wanted to do.
From:(Anonymous)
Date:2006-08-03 15:14 (UTC)

same with the baobab guys...

(Link)
...I sure hope they were reusing code from GNOME Space Chart.

Oh, it's gone... see here:

http://72.14.203.104/search?q=cache:5nTmzp4l9L0J:www.netsplit.com/software/gnome-space-chart/+&hl=en&gl=au&ct=clnk&cd=1
From:(Anonymous)
Date:2006-08-03 15:31 (UTC)

and besides...

(Link)
aren't these functions more useful to have *in* the file manager? (ie: so you can find the hogs and deal with them right away)

I wrote this nautilus extension a little while back:

http://drewkerr.googlepages.com/disk-usage-column.py

Be cool if someone could improve/optimise it (as stated in the source comments).
From:[info]dannipenguin
Date:2006-08-03 15:33 (UTC)

Re: and besides...

(Link)
You're now getting into the realms of a mailing list thread I started recently: desktop-devel-list archives.
From:(Anonymous)
Date:2006-08-03 16:40 (UTC)

JFGI

(Link)
Step 0 of JFDI is JFG(oogle)I, dude ;)
From:[info]dannipenguin
Date:2006-08-03 16:42 (UTC)

Re: JFGI

(Link)
In my defense, I wasn't connected to the Internet at the time.
From:(Anonymous)
Date:2006-08-03 17:03 (UTC)

Icon

(Link)
I think the icon should be an hd with a regulus or something something similar
From:(Anonymous)
Date:2006-08-09 08:22 (UTC)

Some information regarding the ringschart widget

(Link)
I'm one of the developers of the ringschart widget, you can find the information about its little story in this post from another guy who is working with me:

http://blogs.igalia.com/mario/2006/07/19/the-new-baobab-widget/

We have reviewed your code and we have used some of the solutions. BTW, thanks for your great cairo widget tutorial we have also used a lot of ideas from it :-).