Tuesday, July 31. 2007
Nikolaj is busy uploading his aKademy photos.
I liked this one:

Foreground: Martin, Bart and Wendy
Background: Me and Leinir
In-between: Some guy
Its official. Starting on September the 1st, I will be working as an independent software developer, hired by Magnatune.com.
Besides working on Magnatune.com itself, part of my time ( most of it in the beginning ) will be spent working on improving Amarok, integrating some of the cool new features that Magnatune has in the pipeline into Amarok, as well as helping out with the Window and Mac versions.
In practical terms, this will mean that I will have more time to work on Amarok and, as I will also be working on the Magnatune API, I will be able to add some of the features that has been requested by the users of Amarok.
As I am equally passionate about Free Software and Free Culture, this is a unique chance for me to make a living working where these two movements intersect and hopefully help to further both!
I am really exited about this, and cannot wait to get started.
I was asked today if LGPL licensed code could be used in a commercial application. Trying to answer the question, I came to realise I couldn’t accurately answer the specifics. Is somebody able to provide a clear and simple explanation on where LGPL code can be used, and under what conditions? Every time I read the license I convince myself of another interpretation.
Share This
Ian writes some more:
In yesterday’s blog I talked about my issue of wanting to use (animated) GraphicsView’s in an Interview system for Amarok’s playlist. Ivan ?uki? pointed me to a 2006 Trolltech Developer Days presentation about Advanced Item View. The presenter did show a pretty brute force way of doing animations in delegates, by just firing a timer every 40 ms. I tried this out two different ways.
First was similar to how he did it, firing a timer. It was not to my great surprise that this resulted in 30% CPU time for just one row needing to be animated, and it went up from there as additional rows were added It actually still looked and reacted fine though, so before I noticed the CPU usage I was feeling like I had cracked the case.
Then I tried it by connecting (indirectly, since I had to translate a QGraphicsScene into a QModelIndex) QGraphicsScene::sceneRectChanged to QAbstractItemView::update. However this didn’t work. Apparently QGraphicsScene doesn’t consider a flashing cursor as a scene change worth mentioning?
So now I’m basically back to where I was. Except the presentation did hold out another possibility of subclassing QAbstractItemView and then doing setViewport. This is what he did for the QGLWidget views that he made (instead of just writing a view from scratch). However its not quite clear to me what the QAbstractItemView provides when you override the viewport. More importantly none of the examples had scrolling, so they just painted the whole area all the time. And figuring that out is the biggest issue with perhaps using a QGraphicsView (whether by itself or as a viewport of a QAbstractItemView.)
More Playlist Details
Benjamin Meyer had a few questions about the playlist that I’ll address here:
- I think Ben you know what the playlist does.
The user queues up music to listen to and can also edit their tags.
- I see no reason for multiple views.
- Animations - yes. I don’t know if I’ll have time to do cool animations this summer, but I do want to have a framework in place where someone could implement nifty animations easily.
- Editing - currently the reason I want to get animations to work. Users can do some basic bulk tag editing using the playlist.
- As far as what the playlist looks like, its the thing on the right in Nikolaj’s most recent blog. In the future we want to do more complicated things such as grouping tracks from the same albums together.
- Each row is a single cell, so the entire row is drawn in a single delegate paint. So the view itself is a fairly basic subclass of QListView.
In yesterday's blog I talked about my issue of wanting to use (animated) GraphicsView's in an Interview system for Amarok's playlist. Ivan ?uki? pointed me to a 2006 Trolltech Developer Days presentation about Advanced Item View. The presenter did show a pretty brute force way of doing animations in delegates, by just firing a timer every 40 ms. I tried this out two different ways. First was similar to how he did it, firing a timer. It was not to my great surprise that this resulted in 30% CPU time for just one row needing to be animated, and it went up from there as additional rows were added It actually still looked and reacted fine though, so before I noticed the CPU usage I was feeling like I had cracked the case. Then I tried it by connecting (indirectly, since I had to translate a QGraphicsScene into a QModelIndex) QGraphicsScene::sceneRectChanged to QAbstractItemView::update. However this didn't work. Apparently QGraphicsScene doesn't consider a flashing cursor as a scene change worth mentioning? So now I'm basically back to where I was. Except the presentation did hold out another possibility of subclassing QAbstractItemView and then doing setViewport. This is what he did for the QGLWidget views that he made (instead of just writing a view from scratch). However its not quite clear to me what the QAbstractItemView provides when you override the viewport. More importantly none of the examples had scrolling, so they just painted the whole area all the time. And figuring that out is the biggest issue with perhaps using a QGraphicsView (whether by itself or as a viewport of a QAbstractItemView.) More Playlist Details Benjamin Meyer had a few questions about the playlist that I'll address here: - I think Ben you know what the playlist does.
The user queues up music to listen to and can also edit their tags. - I see no reason for multiple views.
- Animations - yes. I don't know if I'll have time to do cool animations this summer, but I do want to have a framework in place where someone could implement nifty animations easily.
- Editing - currently the reason I want to get animations to work. Users can do some basic bulk tag editing using the playlist.
- As far as what the playlist looks like, its the thing on the right in Nikolaj's most recent blog. In the future we want to do more complicated things such as grouping tracks from the same albums together.
- Each row is a single cell, so the entire row is drawn in a single delegate paint. So the view itself is a fairly basic subclass of QListView.
Monday, July 30. 2007
I thought it was time to post a screenshot of how Amarok2 development is moving along.
As my focus is on the service integration, I have chosen to show a few of the new things that are happening in this area, as well as some of the more general and cool stuff that is being worked on.
the following things are noteworthy:
- The new playlist. I am absolutely in love with this thing! Service previews tracks (Magnatune and Jamendo) can now cache album covers on the fly so they show up even when you are streaming. This means that the services now appear really well integrated.
- Magnatune genres are now used in a better way in the Magnatune list, and an artist can belong to several genres. This gets rid of the "Genre box" hack from the previous versions,
- Purchasing from Magnatune now supports using gift card codes as an alternative to credit cards. For those coming to FrOSCon later this month, the Amarok team there might have a nice little surprise for visitors involving this!
- An opengl playground at the bottom with an experimental"CoverFlow" inspired album selector "CoverBling" is being worked on. Just playing around for now, so please don't flame it just yet!!!
- The big central area has just been switched to using Plasma, the coll new desktop and widget technology in KDE4. As can be seen, it has not really been customized for Amarok yet, but it should allow for really neat context information. I plan on moving to small info view at the bottom of the Magnatune service out into the central context area where there is much more room for doing really interesting and interactive things.
As you can hopefully tell, there is lots of interesting stuff going on, and even though nothing is really finished yet, there is a bunch of highly motivated developers coding too much and sleeping too little because they are passionate about Amarok.
One of the Amarok developers, Ian, has run into some trouble in his summer of code project for the summer. I’m posting a copy of his blog at his request to reach a greater readership. Please, lend your eyes for just a minute!
Background Info
My Summer of Code project is to spruce up the playlist. My idea was to use Qt’s new Interview system to make Amarok more memory efficient and less laggy even with large number of tracks in the playlist - performance of Amarok 1.x suffers noticeably with large playlists. This has largely worked out well.
To make the playlist look good I decided to use GraphicsView. So for the past month I’ve been using QGraphicsScene to paint the items in a QListView using a QAbstractItemDelegate subclass. The subclass overrides the ::paint method, which provides a QPainter. I send the painter to QGraphicsScene::render and it paints the item.
The problem
What I’ve come to find out is that QGraphicsScene render is really meant for printing, not for screen display. Since (you might have noticed) there’s no QGraphicsView involved, there’s nothing to translate normal QWidget events into their GraphicsView counterparts. After looking at qgraphicsview.cpp, I found it
wasn’t hard to simply put that sort of functionality into QListView. So currently double clicking works in QListView and you can initiate edits this way.
What initiating edits has made quite clear is that there animation’s do not work (the cursor doesn’t blink), and unlike with the event-translation issue, there is no clear solution. Without a QGraphicsView and with Delegate’s simplistic painting system (which is all-or-nothing) I don’t see how to do it easily.
Possible Solutions
Widgets Everywhere
Using some hack or another (setItemWidget, abusing the editor widget stuff, dark magic) I could make each item on the playlist a widget. Andrew of Skype (who attended aKademy) apparently has similar issues (wanting to use Interview, but with interactive custom widgets which you can see if you use Skype). He made it pretty clear to me that this was a life-sucking endeavour. It also has obvious efficiency issues… playlist items can’t be QObjects due to memory issues, let alone QWidgets (though if there was some smart way to only have 100 qwidgets at a time that would work).
Overlay Editor Widget
Somehow overlay a text edit line just over the text that the user is editing. No idea if this is possible. And it doesn’t allow any other animations to be used.
Pixie-dust the delegate or QListView to display the animations
Under the current regime, somehow let the delegate or the QListView know when and where it needs to repaint the QGraphicsScene to show the animations.
Replace QListView with a QGraphicsView
…and implement everything that QListView does in a QGraphicsView subclass. Really this is what I’m leaning towards at the moment. This would be very similar to what the Drill Down Example does, except with 100x the data.
One of the main benefits of Model/View is that it only has in memory the data being displayed. It doesn’t really store any data, on every paint operation the
View asks the Model for the data. I really don’t know where to start on replicating this sort of functionality in QGraphicsView. Would I just constantly delete and add items as the user scrolls?
I would appreciate any suggestions. Whether its something (else) I’ve missed or how I would go about implementing the last solution.
Thanks!
Sunday, July 29. 2007
Background Info My Summer of Code project is to spruce up the playlist. My idea was to use Qt's new Interview system to make Amarok more memory efficient and less laggy even with large number of tracks in the playlist - performance of Amarok 1.x suffers noticeably with large playlists. This has largely worked out well. To make the playlist look good I decided to use GraphicsView. So for the past month I've been using QGraphicsScene to paint the items in a QListView using a QAbstractItemDelegate subclass. The subclass overrides the ::paint method, which provides a QPainter. I send the painter to QGraphicsScene::render and it paints the item. The problem What I've come to find out is that QGraphicsScene render is really meant for printing, not for screen display. Since (you might have noticed) there's no QGraphicsView involved, there's nothing to translate normal QWidget events into their GraphicsView counterparts. After looking at qgraphicsview.cpp, I found it wasn't hard to simply put that sort of functionality into QListView. So currently double clicking works in QListView and you can initiate edits this way. What initiating edits has made quite clear is that there animation's do not work (the cursor doesn't blink), and unlike with the event-translation issue, there is no clear solution. Without a QGraphicsView and with Delegate's simplistic painting system (which is all-or-nothing) I don't see how to do it easily. Possible Solutions Widgets EverywhereUsing some hack or another (setItemWidget, abusing the editor widget stuff, dark magic) I could make each item on the playlist a widget. Andrew of Skype (who attended aKademy) apparently has similar issues (wanting to use Interview, but with interactive custom widgets which you can see if you use Skype). He made it pretty clear to me that this was a life-sucking endeavour. It also has obvious efficiency issues... playlist items can't be QObjects due to memory issues, let alone QWidgets (though if there was some smart way to only have 100 qwidgets at a time that would work). Overlay Editor WidgetSomehow overlay a text edit line just over the text that the user is editing. No idea if this is possible. And it doesn't allow any other animations to be used. Pixie-dust the delegate or QListView to display the animations
Under the current regime, somehow let the delegate or the QListView know when and where it needs to repaint the QGraphicsScene to show the animations. Replace QListView with a QGraphicsView...and implement everything that QListView does in a QGraphicsView subclass. Really this is what I'm leaning towards at the moment. This would be very similar to what the Drill Down Example does, except with 100x the data. One of the main benefits of Model/View is that it only has in memory the data being displayed. It doesn't really store any data, on every paint operation the View asks the Model for the data. I really don't know where to start on replicating this sort of functionality in QGraphicsView. Would I just constantly delete and add items as the user scrolls? I would appreciate any suggestions.  Whether its something (else) I've missed or how I would go about implementing the last solution. Thanks!
Saturday, July 28. 2007
So finally I got ultimately annoyed by the fact, that I have to keep 4 logins to access the Amarok web infrastructure. ITS THE SUCK! I finally started to OpenIDify the website(s), and since Mark pointed out that I'm the wiki guy, I started with mediawiki  . As Professor Farnsworth will use to say "Good news everyone!" --> it's working.
Yesterday I setup a mediawiki for testing, and with the somewhat new extension I got to a proper result within no time. See the screencast. As soon as I can reach our admin I'll move the Rokymotion wiki to OpenID. After testing and polishing, I hopefully also was able to move either Drupal or SMF to OpenID, so that I finally can move most of the websites to OpenID.... especially meaningful for the wikis since we got 2 of them (a dirty one and a polished end-user one)Anyway, next on the TODO is Drupal, it looks like getting OpenID to work with it might not be a big problem, since current trunk actually already includes OpenID by default, so I hope it's a save bet for 5.x as well. ...now if KDE would switch to OpenID...
Tuesday, July 24. 2007
Driving around Sydney city can be a right headache, but I stumbled upon this number plate this week:
For the colour coded out there, #CC26CC is the RGB hex value for purple, the colour of the plate and car. I admit, it is a little difficult to tell, so blame the crappy camera on my phone.
Share This
Friday, July 20. 2007
Read the entire KDE development with Git thread yesterday. There's been a lot of talk of such things lately... Mark Shuttleworth made the point that using a system with easy branching could really change how we worked (and made it overly clear that he didn't mean that we should all use Bazaar).
Someone linked to a page which linked to Linus's Git talk. He gave KDE very high praise by calling us "not smart" (in having one big repo). Everyone else who disagreed with Linus was stupid and ugly. So that was neat.
The problem with Linus's talk is that he uses a "pull" method of development, where he pulls in patches or merges from Git. And he doesn't recognize any other methodology as having any value. It really wouldn't work for a project like KDE and probably most projects, since there would be no one to do the pulling. Linus's full time job is pretty much to decide what to pull into the kernel. It would just slow development down to have someone like that with KDE or Amarok. Really I guess Linus doesn't see the Linux development model as being very unique in the open source world, even though it is. Or maybe Linus is a bit like the Douglas Adam character who considers his house the "outside of the insane asylum" and the rest of the world the "insane asylum" - we're all just crazy.
SVK was surprisingly not mentioned much in the KDE thread. SVK does serve me pretty well for doing local commits and transversing through the history of Amarok (since I have all 9800+ commits of Amarok stored locally). But its not really distributed at all in the way Linus meant it... I can't easily share a branch, it'd require commiting to SVN. Also its quite a bit slower then SVN, which wasn't a speed demon to begin with.
The thread concluded that having parallel VCSs would be pretty horrible, since it would require people to learn more then one system and thereby increase the barrier of entry to KDE development. But also Dirk said he would be willing to help someone setup a Hg->SVN/SVN->Hg system.
Thursday, July 19. 2007
The Amarok 2 Jingle Contest is well underway, and even though the contest runs until the 1st of October we have already received some pretty cool submissions. Check out this hip-hop theme or this one with a western guitar feel for a few cool examples. I am having a lot of fun checking these out as they arrive!  Keep up the good work and keep the jingles coming!
All the submissions can be heard by going to ccMixter.org and typing "Amarok" in the search field.
Wednesday, July 18. 2007
My friend Ruth IMed me today and wondered how the trip to Scotland went. Which reminded me, I haven't blogged about all the photos I posted.
I think this photo sums up the experience of Scotland:
And as far as aKademy itself is concerned:

No explanation needed.
See the rest of the photos, including giraffes, Unionists parades and various hackers in my Flickr aKademy set.
Friday, July 13. 2007
So after a straightforward flight from Glasgow to Philadelphia to St. Louis, Missouri, I had a nice couple of days hanging out with Sherry. The important thing accomplished is that I installed Kubuntu Linux on her laptop. Its a dual-booting system (Windows is installed), but I did make sure that she has only 3 seconds to decide to boot into Windows instead of 10.  Default OS being loaded made a pretty big difference back when I was a dual-booter.
Anyways when the school year starts and hopefully Amarok 2 will be somewhat usable, I'll have a convenient guinea pig way of doing user-testing.
Came back to my parents home in Fulton, Missouri to find my functional desktop greeting me. Its entire motherboard and CPU had been bad and were replaced. Took me last night and this morning to compile a kernel (ended up using basically the .config from the Gentoo Install CD, the default genkernel has no SATA support at all) and tweak the system a bit.
If I was going to install a new CPU and mobo I thought I might as well get an upgrade... now I have a AMD64 3800 x2 instead of just a AMD64 3800 (was pretty limited in choice from wanting to keep my current RAM). This makes my Icecream Monitor even more hypnotizing... though obviously nothing compared to the -j20 compiles I was doing at aKademy.
Saturday, July 7. 2007
As Amarok 2 will be quite a different beast compared to the 1.4 series, it will need a distinctive new first run theme. Since none of the developers are up to this task, we have teamed up with Magnatune.com and ccMixter.org to host a competition for the very best new jingle.
The details can be found here
This is your chance to shine. The winner will get his or her composition added to Amarok and it will be heard by hundreds of thousands (some say even millions) of users when they first start up Amarok 2.0.
And of course, the winner takes away some cool Amarok swag (Amarok the t-shirt, Amarok the key-chain, Amarok the flame thro.... oh... never mind...) and a $100 cash price! The 2 runners up will receive the swag but not the cash ( those t-shirts do look cool though! ).
Submissions will be judged by the Amarok team.
Fame and glory awaits, so get mixin'!
EDIT: Oh, the Amarok team will pick the jingle that will be used on October the 1st, so there is still plenty of time to get that jingle juuuuust right!
|