A program's obsolescence

In 2005, I had a crazy idea upon which I started the Specto project. Initially, I thought I’d call my revolutionary piece of software WhileYouWereOut (continuing the world’s tradition of ill-chosen project names), because it really was about solving a core “want” in my life: to leave my computer alone and catch up with events when I’d come back in front of it.
The core feature was to watch webpages for updates: back then, I did not know about syndication feeds, and I was sick of refreshing ifolder.com every single day hoping for a release of the peer-to-peer version of iFolder (for which we still have no equivalent today).
But why stop there? Why not handle events such as new emails, network failures (in those days, I ran my web server on my flaky residential connexion), software updates becoming available, and so on? You can grasp the whole genius of the idea by looking at one of the first mockups I drew back then:

Some old-timers among you may have noticed a ressemblance with Beagle‘s old user interface — back when it was called “Bleeding-Edge Search Tool”. Aaah, another nostalgic memory of the Novell desktop days.
Specto taught me that even if you have an arguably brilliant concept/mockup, random strangers on the Internet won’t magically jump onto your bandwagon and write code for you. Once this “reality check” finally set in after a couple of months, I took the dive and taught myself Python programming. Specto holds some sentimental value as it was my first OOP learning platform, but I’d probably be horrified if I were to look at its code now, after having considerably improved my skills by contributing to Pitivi. How the hell can Specto have nearly as much code as the current Pitivi development version, anyway!?
But I disgress. Where was I? Ah yes.

GNOME 3.6 made it all obsolete — finally.

Continue reading “A program's obsolescence”

Specto 0.4 released

I’ve been holding off a Specto release for way too long. See my previous post on the matter for some insights into why Specto 0.4 was released after Duke Nukem Forever. This development hell streak ends today.
If there are still people out there using this piece of software, go grab the new tarball. Distro maintainers, please package it. This release drops the python glade and gnome dependencies and fixes compatibility with NetworkManager 0.9. See the ChangeLog file for further details.
Thanks to Francesco Marella for some great contributions (gtkbuilder port and code cleanup) that made this possible.
Given that nobody came up wishing to take my place as the maintainer since my previous announcement, I decided on the following new policies (at least until a new maintainer comes up):
Continue reading “Specto 0.4 released”

The most annoying Specto bug ever

There is this infamous bug in Specto where emails that are not in English would show up with messed up encoding:

It is the single most infuriating bug I know in Specto, annoying me daily.
Today, I spent three miserable hours trying to fix it, and went 90% of the way towards that goal. It now correctly parses weird encoding in subject or sender lines in POP3 and IMAP:

…Except that it doesn’t work with GMail IMAP.


Continue reading “The most annoying Specto bug ever”

Adopt a Specto

As you can see I haven’t touched Specto in quite a while. I’m not going to start fixing things or implementing new features myself anytime soon. This is because:

  • I consider Specto “good enough” and I lack the time/hacking skills to devote to it
  • I spend lots of energy on other projects such as PiTiVi.

Continue reading “Adopt a Specto”

0.3.1: a small bug fixing release

I just released Specto 0.3.1, not long after 0.3 (in terms of commits), after having addressed some bugs myself. The changes are minor and I don’t expect regressions, so it should be pretty safe to upgrade from 0.3. Maybe I can start a habit of actually releasing stuff more often, if we don’t again plunge into a huge refactoring endeavour like the 0.3 release was.
One particularly annoying bug for French users was caused by a wrong string in the translation, which caused some watches to be “stuck” and not show notification balloons. See the release notes for more details on what has changed in this minor release.
A tarball is available, and I will try getting someone to build Ubuntu packages (if anyone wants to volunteer to maintain it, you’re welcome to do so), and, if it’s not too late, get it into Ubuntu 9.10.

Notify-OSD compliance

After much bikeshedding, I delved in Specto’s code for a few hours this morning to get it working with Ubuntu 9.04’s controversial notification system daemon. The ability to set notification durations is now gone, and Specto only displays actions in the notifications if they are “allowed”. This should not impact users of vanilla libnotify. If people complain, it’s all Ubuntu’s fault now 🙂
As you may have noticed, I have made some subtle changes to the actual contents of the notifications. The notification summary is now a proper summary with the watch name instead of “Specto”, and this means we put less “redundant stuff” in the actual “long description”.
Overall, this whole “conform to notify-osd” issue had a positive side-effect: it kicked my ass into actually doing the content cleanup I had on the back of my mind for quite some time.
When the notifications are not attached to the tray icon anymore, messages like this one become glaringly wrong: their uselessness becomes quite apparent. I therefore filed bug 221.
All these changes are currently available for testing in my personal Specto branch. Translators will need to update some strings (mainly just remove obsolete stuff), so please send your updated translations for them to be included in Specto 0.3 final.

Specto 0.3 release candidate 1

Since hell is freezing over today, I’ve been nailed to my chair to prepare a new Specto release, at last. Uploaded packages, checked release notes, and reworked the website. Now, 0.3 RC1 is available for the masses, go test it! If no significant problems are found, this will become Specto 0.3 final. Special thanks to Wout Clymans for working so passionately on this release for over a year.

Specto is a free and open-source desktop application that will watch configurable events (such as website updates, emails, file and folder changes, system processes, bazaar branches, etc.) and then trigger notifications.
This is a “release candidate” for the 0.3 release. It is considered stable and feature-complete and is intended for last minute testing and to allow you to send us your translations. If you are proefficient in your native language, please help by translating Specto into your language. It is fun, easy, and you get your name in the translator credits. Instructions are available on this page.
Upgrading to this release is strongly recommended, as it solves a huge amount of issues reported in the 0.2.x series, is more stable, implements new features, is more secure and easier to maintain.
This release contains lots of architectural changes. The watch system is now a plugin system, the watch list has changed, GNOME keyring is now used for encrypting passwords by default (though you can disable it), and the configuration/cache directories are now based on the XDG user directory specification. As such, you will need to import your watch list if upgrading from Specto 0.2.x.
Updated packages for Ubuntu are already available on our download page, and might also appear in Ubuntu’s universe in time for 9.04. If you want to provide packages for your favorite distribution, feel free to contact us.
What is new in this release: see the release notes
We are a volunteer project, free “as in beer” and free “as in GNU GPL v2”, and contributions are very welcome. If you like this software and want to fix annoyances that itch you, we value all the help we can get. You don’t need to be a hacking guru! [see contributing page].

Improved Specto startup times

After my post on profiling Specto’s startup, Wout Clymans put on his Hero Hacker Hat and fixed the major problem that was causing Specto to do too much work for nothing. Now, Specto starts in 2 seconds instead of 10 seconds.
What happened there? Well, for making sure that we are using the same “internal” watch list as the actual watches in ~/.config/specto/watches.list (if I’m not mistaken), Specto loaded the file each time and parsed it. The problem is that this is useful (not even 100% sure about it) only when you manually ask Specto to refresh, not during startup, where the watch list is obviously up to date. What Wout did to fix the problem is create a special parameter that makes those method avoid opening and parsing the watch list all the time on startup.
The question remains, however, if the startup time can be further optimized (with the profiling technique in my previous post), or if 2 seconds really is the bottomline; my understanding of profiling outputs is not deep enough to answer that, so any input would be welcome.
Being able to figure out why Specto takes 21 Mib of RAM would also be a nice thing. If it’s Python + GTK’s fault, well, “sho ga nai, desu yo~”. If we can optimize something in our existing code, however, that would be a problem that we should try to address.

Profiling Specto (and whole Python applications in general)

A few months ago (when we still thought we were about to release 0.3 “real soon now” ;), I noticed that Specto is noticeably slow to start up, even on warm starts (when it is not the first time you launch it). It always takes at least 6 seconds to paint the list of watches and start refreshing them. During that time, there is a notably high CPU usage spike (surprisingly, no noticeable hard drive I/O), as shown below:

I talked about this problem with Wout when I first found out about it, and looked at various profiling tools (sysprof, oprofile, valgrind…), but could not find anything that was supposed to work with Python directly, let alone anything a mortal could use. Thus, we shrugged, and the problem sat there without further investigation, lacking the tools (and time) for that.
Tonight, I wanted to be the next Federico Mena Quintero, and so I tried it again. My first hypothesis was that Specto surely must be doing way too much work, or doing inefficient I/O in some way. I consider it unacceptable that a simple application like Specto does not launch instantly, instead taking as much time as a warm-start OpenOffice.
If you don’t know about software performance profiling, there is some truly awesome “hecho in Federico” material that you must see first. It is easy to understand and funny as hell:

Continue reading “Profiling Specto (and whole Python applications in general)”

The Joy of Merging, and Google Code Hosting bug integration with Bazaar

This graph makes me happy. As it shows, I have been quite merge-a-holic in the past few weeks, and I think it has been my most productive time of the year working on Specto (once I finally gave up trying to fix up the mess in a “perfect” way when we migrated to bazaar). This bazaar revision history graph can be obtained simply by doing bzr visualize if you have the bzr-gtk package installed.

The other command I use quite often is “meld .” to get a graphical diff of my current directory, or “bzr gdiff” to get a more textual view.
What is interesting in the screenshot above is that you can see the result of the bazaar bug tracker integration. In this case, it allows doing stuff like:
bzr commit --fixes specto:155 --fixes specto:156
Which then tells bazaar to indicate that these two bugs were fixed by that revision, and link to them. Before you do that, you need to set your bug tracker in ~/.bazaar/bazaar.conf. In my case, it is Google Code Hosting, so I had to enter it as a custom bug tracker, with a line like this:
bugtracker_specto_url = http://code.google.com/p/specto/issues/detail?id={id}