3rd August 2006
JFDI, Dangers of [see also: reinventing the wheel]
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?
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?
