Teo Mrnjavac

Subskrybuj zawartość Téo's weblog » Amarok
Diary of an Amarok developer
Zaktualizowano: 2 min. 6 sek. temu

Evading the Microsoft tax

December 6, 2009 - 16:30

A few months ago I submitted my work for the Social Desktop Contest, organized by Frank of openDesktop.org. As you may remember, my submission was the social about dialog for KDE apps, currently only in Amarok, but I hope to move it to KDElibs when my university thesis work, my work work and other IRL stuff gives me a break.

Turns out, lots of people seemed to really like it (thank you for voting!), and it won the first prize, which was a Dell Mini 10v netbook with Ubuntu – a really great and appropriate gift for a Free Software contest.

Unfortunately Dell has a really weird way of doing business, long story short, regardless of the free movement of goods inside the EU, because of Dell’s arbitrary business choices it was virtually impossible to ship the netbook from Dell directly to me in Italy. Anyway, Frank and I found an alternative solution with me placing the order on Amazon.co.uk, and a few days ago I received an EeePC 1008HA (they didn’t have the Dell Mini 10v). The netbook market has changed a lot since its beginnings and nowadays it’s very hard to find a netbook without Windows, this one was no exception as it had the Microsoft tax on its price and that ghastly Windows license sticker on its underside. I hoped to get back the cost of the license, mostly for ethical reasons, and I hoped that Amazon.co.uk would do the right thing as described here, but a few weeks ago I picked up some random report on Slashdot about Amazon now refusing to cooperate in honoring Microsoft’s EULA, which made me worry a bit.

EeePC 1008HA with Archlinux and KDE SC 4.4

After I got the package, I just sent a polite message through the official Amazon.co.uk support channels, and at first, I got a canned response from a support guy offering me a full refund for the netbook. When I replied kindly requesting that they actually read my message, the support person replied with an e-mail full of apologies and offered me a ~30€ refund for the Windows license, without asking any further information or proof of any kind. I wouldn’t bet that the 30€ bill made it all the way to Microsoft through Asus, but I hope that if enough people bother Amazon with this, they might eventually poke Asus. So, including shipping and after the Windows refund, this netbook cost about the same as the Dell Mini 10v with Ubuntu would have, and it’s an awesome little gadget.

I’m running Archlinux on it, installed with the Chakra live distribution (the latest Archlinux live USB stick image isn’t recent enough for a confortable installation on this hardware), but I removed the stable (and awesome) KDEmod packages to replace them with packages from a KDE SC 4.4 snapshot repo. Hardware support under GNU/Linux is great, aside from the wired ethernet adapter which required some tweaking but it works now. Battery life is incredible. I had no trouble getting used to the keyboard, which is quite good, but the touchpad buttons are hard and they make middle-clicking difficult. The Atom N280 based system feels reasonably fast.

I want to take this chance to thank Frank Karlitschek for his hosting of the OCS contest and his help and cooperation.

Thumbs down Dell for actively refusing to do business like any decent internet store in the EU, and thumbs up Amazon.co.uk for cooperating with me in exercising the rights that the Windows EULA grants me.

Posted in Amarok, KDE Tagged: Amarok, KDE
Kategorie: Planet Amarok

Social Desktop integration in KAboutDialog

August 23, 2009 - 14:45

A few years ago when I still wasn’t an Amarok developer, the development team appeared to me like a bunch of uber-l33t geeks with mad sk1lls locked up in some ivory tower, performing their arcane incantations. Obviously it’s not the developers’ fault, the issue was that no matter how hard you try to reach out to the wider community, there is always a not so blurred line between users and developers, and this social distinction raised the barrier to entry for me probably even more than my lack of coding skills did.

I’m trying to change this, by bringing the Social Desktop to one of the most prominent places where users learn about the development team of a program: the About dialog. By tying some openDesktop.org profile data into a modified KAboutBox, it’s much easier to convey the message that the project is developed by real people, with a new potential channel of user-developer interaction right inside the app. For users, the advantage is that developers are now easier to reach, and I also hope that this might increase the quality of the communication by making some potential trolls realize that they are not talking to nameless nicks on IRC. For contributors, this might also be a nice recognition of their accomplishments: many of us do this unpaid, for fun and for love, and it’s nice if at the end of the day one can at least get a pretty dialog with a picture and a few rows of credit.

But what does “integrating Social Desktop features” really mean? Well, it can mean everything and nothing, in this case it means a new dialog called ExtendedAboutDialog for lack of a better name. Contributors have additional extended entries with data downloaded from openDesktop.org that can be viewed if the user has internet access and an openDesktop.org account. The About dialog becomes a small social desktop client.

The implementation is currently based on Amarok, but I’m keeping it as generic as possible. It uses the OpenCollaboration Services API, through the Attica library. Attica is a library, not yet independent, as I understand originally developed for the OCS dataengine and currently in kdeplasma-addons. Though the dataengine with Attica is already in 4.3, the Attica library may land into KDE 4.4. Until then, I have crudely copied over libAttica into Amarok’s source tree.

This dialog is already integrated in Amarok’s master branch on Gitorious, and my work on this about dialog can be tracked on my Gitorious page http://gitorious.org/~teo.

What follows is a screenshot of the dialog on startup. We can’t try to download data right away because the user has to sign into openDesktop first. So we just show the old style credits, with a button on top.

extendedabout3

When the user clicks on “Connect to openDesktop…”, a login dialog appears and the data is fetched from openDesktop.org. Meanwhile, authors who don’t wish to use openDesktop.org are already added to the list.

extendedabout4

Finally, when the data has been downloaded, the list is completely populated.

extendedabout6

This works for contributors without author status too, with the profiles being shown in a thinner format to save space.

Social Desktop integration in KAboutDialog

This dialog is still a moving target, and I’m posting quite regular updates and screenshots on its openDesktop.org entry.

Posted in Amarok, KDE Tagged: Amarok, KDE
Kategorie: Planet Amarok

GSoC final report: Amarok’s playlist, hacked into submission

August 22, 2009 - 19:44

When I started working on my proposal for what would eventually become my Google Summer of Code 2009 project, I was a much less skilled coder with no experience on something as large as this project turned out to be. I’m not bragging about becoming so insanely wiser now, but I have certainly gained tons of valuable experience, learned a lot about software development, and had a great time doing it!

So what exactly have I accomplished this summer?

Those who have been following my updates might remember the first part.

Well, the initial idea was to implement multilevel sorting in Amarok’s playlist, with a nice GUI, and throw in configurable grouping if there’s time. However right from the start it was clear that much more invasive changes were needed. As I already mentioned, Amarok’s playlist uses Qt’s Model/View design pattern. When I began working on my project the playlist had a source model (a class which feeds the rows), a filter proxy model (which filters out some rows that don’t need to be shown when a filter is active), a grouping proxy model (which decides which tracks should be grouped together because they belong to the same album) and finally, the view. Ideally, each model should talk only to the model right below it (if any), and the view should only talk to the “topmost” model to avoid any screw-ups in row presence and order. Failure to enforce this results in spaghetti code, which is exactly what was going on in the playlist code at the time.

So most of my first GSoC month I spent despaghettifying these Model/View classes, so that the Playlist::Model feeds data only to the FilterProxy, which feeds data only to the GroupingProxy, which feeds data only to the view. During this despaghettification, I also added a new proxy model: SortProxy, which is the class that actually implements the multilevel sorting backend. A month or so later I also added another proxy, SearchProxy, by decoupling searching from filtering. So the final result, as I already mentioned, is Playlist::Model->Filter->Sort->Search->Grouping->View: 5 models and one view. Doing all this without Qt’s Model/View classes would have been *a lot* harder and much more chaotic. So by the end of the second month the playlist code was refactored and made much clearer, the right auxiliary classes had been associated with the right model or proxy (mostly the topmost one, GroupingProxy) and a simple testing GUI was in place for multilevel sorting.

For the GUI, I chose to adapt a familiar paradigm to a new use case, so I used a breadcrumb path based widget. A sort scheme is a progression of levels, which represent sorting criteria, and those are applied to the playlist in real time. What’s even better, sorting is not an action but a state, which means that the original sort order can be recalled at any time. One of the sorting levels is also “Random”, so almost for free this interface also implements configurable multilevel shuffle!

Multilevel playlist sorting interface

In the last weeks, which were quite busy, I implemented configurable grouping, so the user is no longer forced just to group by album or not group at all. Finally, as a bonus, I took advantage of the existing Amarok URL infrastructure to implement playlist view bookmarks. These bookmarks define a URL for each playlist configuration, which aggregates a sorting scheme, a grouping category, a playlist layout and a filtering expression, and store it in the bookmark manager. The user can then instantly apply these bookmarked states and avoid having to rebuild a sorting scheme, a grouping category, select a layout and enter a filter string manually.

Playlist view bookmarks!

Playlist view bookmarks make it much easier to control this mighty playlist, which will be landing on a GNU/Linux distribution near you with Amarok 2.2 some time this fall!

I’d like to take this chance to thank my GSoC mentor Nikolaj Hald Nielsen and the whole Amarok team for their patience, dedication and help.

Posted in Amarok, GSoC2009, KDE Tagged: Amarok, GSoC2009, KDE
Kategorie: Planet Amarok