Friday, January 18, 2008
Banshee's search code is getting revamped. Before getting into the technical discussion, I want to note that simple queries that you can perform in stable today will most of the time produce the same results in trunk. In trunk, the default operator in user-queries is AND, so a query dave matthews is parsed as dave AND mathews. Filtering is done in real-time as you type, and mal-formed queries are handled gracefully. You can also specify fields (by:dave, album:"under the table", rating=4). Trunk is well organized into assemblies that break along logical boundaries. One of these assemblies is called Hyena, and contains reusable data-oriented classes. I want to highlight one namespace in it that has come a long way in the last few weeks. Hyena.Data.Query The fundamental data structure in Hyena.Data.Query is the QueryNode tree, made up of QueryTermNodes (literal values, field queries) and QueryListNodes (and, or, not). We have two parsers, UserQueryParser and XmlQueryParser, as well as methods to take a tree and produce user or XML queries. This means we can go from a user query to XML and back, or vice-versa. Given a list of queryable fields and their mapping to Banshee's database (a QueryFieldSet), we can also take a tree and produce SQL for actually carrying out the search. You can see all this in action if you run trunk from a terminal:
All this work makes searching much faster (straight against the database), unifies our search infrastructure, and makes it trivial to implement features like dragging a smart playlist onto the search entry and turning a search into a smart playlist.
Both our user-query language and XML are extremely close to the XESAM spec, and we want to be compliant. We're working with the XESAM team to make sure it meets our needs.
Wednesday, January 9, 2008
I'm in Boston this week working with Aaron and hanging out with Miguel and others. In between amazing people with the XO retroscope, we've been busy getting Banshee 0.13.2 out - and it's here! Support for new iPods, a Last.fm plugin (see below), updated TagLib#, and lots of other fixes and features got in during this long release cycle. Over 10 people contributed to this release - thanks to everybody! Aaron has blogged about the release too.
Screencast demoing the new Last.fm radio plugin. Ogg/Theora, 69 seconds, 4.1 MB.
Besides Last.fm server errors, which cause some songs to be skipped, and a bug where new stations don't show songs on the first run, the plugin works great. I discovered five new artists with it and already bought their CDs.
We will do one more release off the stable branch within the next couple weeks to fix the Last.fm new station bug and make the new MTP support rock solid before we focus 100% on trunk.
Wednesday, January 2, 2008
I got Karl Fogel's excellent Producing Open Source Software for Christmas and have been enjoying reading and learning from it. One suggestion he has is to have a svn-commits list that includes full diffs to allow for fast, easy code reviews. I brought this up on the GNOME infrastructure list, where Olav Vitters raised some concerns and asked me to solicit planet-wide opinion. As a project leader and/or svn-commits subscriber, would you like to see full diffs?
By e3000, used under the CC BY-SA license.
I think this simple idea could help projects (like Banshee) add more committers and increase the pace of progress since every commit is reviewed by many eyes, most commits will be good, and you can always revert ones that aren't.
Assuming there is enough support for the idea, the next step will be modifying the script to pull configuration data from some yet-to-be-implemented DOAP setup.