December 2003


While fixing the mime-type validation in the query optimization code, I realized that search URLs with mime-type clauses would pass through to the query engine. A quick test of msearch proves it. It looks like someone's good efforts to optimize the clauses before performing the query inadvertently added a useful feature. The cause takes the form of 'mime-type type/subtype'

eg. msearch -u 'search:[file:///]file_name contains resume & mime_type is application/pdf'

returns all the PDF files that have resume in their name.

I will add this to msearch-gui. I may need to create an option menu listing all the registered mime-types on the system, but that will be one unruly list. I planned to introduce this feature after I replaced the backend. I don't use the file open dialog, preferring to use Nautilus, but I see an application's need for a smart open-file-dialog. The file-open-dialog could use search to display all the possible files it can open. The user could restrict the list by adding additional criteria like name, emblem (keyword), or location.

Having flu inspired me to work feverishly on Medusa. I've completely restructured msearch-gui. It's much more stable, and I squashed some bugs in the process. I cut some features I felt were frivolous. I don't think apps should be making private solutions for public problems: gnome-vfs needs a gnome_vfs_uri_is_valid, GDate should handle time. I'll need to spend some time on other libs and Storage soon to advance Medusa.

A word to the wise. Just because Medusa supports 'emblems do not include …' doesn't mean you should use it. I accidentally searched for anything that wasn't and application. The result set of more 200,000 files was returned in seconds, but displaying that many files in a window crippled my machine to 30 minutes before I could kill it. I think I'll add a sanity to msearch-gui to clamp the results to no more than a few hundred files.

msearch-gui quickly became a jumble of functions when I decided to make it available to users. 50% of the code was controlling the results tree/treeview. I neatly encapsulated that in an gobject named MedusaTreemvc. After I've created some more widgets, I'll move the MedusaTreemvc to a new components part of the tree. There's more code clean up to be done before I can start expanding the features again. I need to change the search URL format before the year is out so I can start on a new metadata backend in 2004.

I'm all for winter solstice celebrations and joy to the world. After a few days of the sappy music I, was terribly depressed. I put on some Interpol, Placebo, and Bork to pull me back to the center. It felt good, and it broke Scotland's stranglehold on my mp3 player.

I found a major gaffe in the file_type clause. The fix was simple (after making glade2 again because xd-unstable put GTK only glade in its place). Searching for music file_type is very fast, and it clearly shows the clumsiness of GNOME's mime-type handling–lots of text files in the results. I added a popup menu to select open file or open parent from the results list. Opening Nautilus views is dodgy on my system, but I let it pass because I see the same problem in other apps.

My last set of changes made the indexer very stable, I don't see any tmp files left next to the db indicating the indexer failed. I'm going to take the time to handle the .progress files when the indexer fails and close that bug. Two other changes I want to make soon are rename the vfs-module and fix the URI format. That will put me in a good position to start replacing Medusa's backend.

My home and work environments are a mess with GNOME 2.5 unstable. I need to use Eclipse for my work life, but it bombs when it tries to use the GTK 2.3 ToolBar. At home I used jhbuild to build G 2.4. The firewalls are closed at work, so I used gargnome to build G 2.4. So I've got a full G 2.4 installation on both machines to run one app. That's bogus. I like Eclipse's editing, versioning, compiling, debugging, and unit testing features for Java, but found its C features are inadequate.

I decided to make an effort to use Eclipse's CDT to develop GNOME software to justify a G 2.4 installation. For starters, CDT doesn't play with autotools; that is the single greatest flaw the IDE has. The CDT project is looking to add better Makefile handling in the future, but are not willing to commit to autotools. I'm surprised Redhat is promoting a tool that cannot manage the make tools used my most of the OSS software the Redhat uses. I added a couple sh scripts and hooked them up as external tools to configure the Makefiles. CDT Make itself is pretty dumb, so I needed a small sh script to compile the file I'm editing. Code assist (code completion) is limited to the symbols in the current project. I created a script that mines the common GNOME headers and updates Eclipse's code template feature to provide some code completion for types and functions that I commonly use hacking Medusa. The large number of templates really slow the editor down so ill need to refine that.

I've been hacking on Medusa for a week and without any problems. I really like using Eclipse's outline, version control, and debugging features. I guess the next thing I need to do is hook up gnome-doc to make API docs.

Some old errors showed on my system as I put Medusa through some duration testing this past week. Those naughty progress files were being left behind when the indexer failed. Cleaning those up automatically will require some subtle changes to the masterDB since C cannot catch an exception, and there is no graceful exit strategy. I'll create a small clean up function I suppose. This DB implementation has reached it limit, time to start working on Storage.

I located and fixed the error in the plain-text indexer that has irked me for more than an year. The fix will prevent Medusa's MasterDB from stepping into the error that left the progress files behind. I really want to toss the indexer–it will never be capable of handling Unicode. I'll do that at the start of next year. The next indexer will make an effort to keep the DB size to much less than the 95 megs I have for my 20 gigs of personal data.