Category Archives: Shotwell

Vala and C warnings

We’re frantic here at Yorba working to get Shotwell 0.4 out the door before the holidays, but I wanted to take a breather and point out a positive trend I’ve noticed with the Vala compiler.

As you may or may not know, Yorba is a 100% Vala shop — well, maybe not 100%, but the sliver of code that’s not Vala (and I’m including Make as a kind of scripting engine) is present only out of necessity.

We were sold on Vala from just about the beginning of Yorba’s existence.  One major concern was the number of C warnings gcc spat out when compiling valac’s generated source.  I’m from the medieval school of thought where Wernings Shalt Be Treatyd As Errours, but unfortunately there’s little recourse with a system like Vala.  Each warning had its own root cause.  There was no central fix that could be made to the compiler, nor was it a simple matter of rewriting the offending line.  Many warnings were due to const-correctness.

Recently I’ve noticed fewer warnings than ever.  Shotwell is approaching the 25,000-line ceiling (according to wc, blank lines stripped) and I was curious what kind of trend there’s been on warnings.  It’s positive all right:

18-Mar-2009 Vala 0.5.7: 746 lines, 4 warnings, 0.54% lines generating warnings
12-Apr-2009 Vala 0.6.1: 2,789 lines, 8 warnings, 0.29%
20-Apr-2009 Vala 0.6.1: 3,160 lines, 11 warnings, 0.35%
26-May-2009 Vala 0.7.3: 6,347 lines, 57 warnings, 0.90%
28-Jun-2009 Vala 0.7.3: 8,663 lines, 79 warnings, 0.91%
18-Sep-2009 Vala 0.7.5: 15,270 lines, 131 warnings, 0.86%
17-Dec-2009, Vala 0.7.8: 24,591 lines, 56 warnings, 0.23%

I suppose I could go crazy with the graphs, but you get the point: Shotwell’s code size is growing and the rate of warnings are dropping.  The big leap was between 0.7.5 and 0.7.8, which justifies my hunch that this was a recent development.

(I ran 18-Mar for giggles.  I don’t think a program under 1,000 lines is worth measuing in this context, but it’s fun to remember when Shotwell was just a tot.)

Zero warnings are, of course, the final goal here, but I’d say that Vala’s largest improvement of late has been its growing silence.  When you think about it, that’s what you’re really wishing for when you type “make”.

Shotwell 0.3.0 released!

Hello, world: this is the inaugural post of the Yorba blog!  I actually have quite a few topics queued up to blog about so you can expect more posts in the weeks to come ( and I know that my fellow Yorba engineers are looking forward to writing soon too.)

I’ll start out by writing about our latest release: after several months of hard work we released Shotwell 0.3.0 yesterday!  Without a doubt this is the most interesting release of Shotwell so far. We’ve spent lots of time improving Shotwell’s scalability and performance so that it’s now very reasonable to use Shotwell with a collection of thousands of photos.  We’ve also added a one-click autoenhance feature which I’ve found significantly improves most photos we’ve thrown at it. I really like that Shotwell’s autoenhance is non-destructive: it simply sets several adjustment sliders using built-in heuristics, but you can tweak the sliders afterward to your heart’s content.  There are zillions of other new features as well; check the Shotwell documentation for details.

In my mind this release marks the moment when Shotwell is reasonably usable for working with actual photo collections, and I’m starting to use Shotwell exclusively for my own photo library.

We made a couple of realizations only after releasing 0.3.0.  First, we found that Shotwell will build without any changes on Ubuntu but not on Fedora (and possibly not on other major Linux distributions as well).  This was our mistake: it’s our goal to be distribution-neutral.  We also realized that with the recently released GNOME 2.28 Shotwell displays no toolbar button labels by default. To fix these problems we’re planning to release a new version 0.3.1 in the next couple of weeks.  (By the way, there have actually been a number of user interface changes in GNOME 2.28; I might blog more soon about those.)

Meanwhile, the team is chugging along and working on features for Shotwell 0.4, which we’re planning to release this December.  In 0.4 you’ll be able to upload photos to Flickr and Facebook, to move photos between events, to display extended information about photos and much more.  See our ticket list to learn more – the tickets marked high are currently slated for the 0.4 release, though of course that’s subject to change as the release approaches.

Oh, and Shotwell 0.4 will also build on Windows and the release will include a Windows installer.  Yes, you heard it here: we’d actually like to make all the Yorba applications work cross-platform and this is a first step toward that.  Rest assured, however, that all our applications will remain absolutely first-class citizens on Linux platforms; that’s Yorba’s primary goal.  But we’ve actually found through recent experiments that GTK is surprisingly portable, and like other GTK-based applications such as Gimp and gedit we’d like to run on Linux first and foremost but on Windows and Mac OS as well.  (I’ll plan to blog more soon about the strengths and weaknesses of cross-platform GTK in our experience).

We’d love feedback on the 0.3.0 release, and we’re always looking for help: if you’d like to get involved and contribute code, documentation or bug fixes to Shotwell or our other projects then don’t hesitate to get in touch!