jefferai
I work for MIT doing all sorts of stuff and I hack on things in my free time, mostly in C++/Qt. I mainly work on KDE, where I do coding, sysadmin, community, event organization, security and promotion work. I also do a lot of development for Tomahawk Player. I love FOSS, and like most geeks I also love photography.
Home page: http://jefferai.org/
Jabber/GTalk: jeff@jefferai.org
Posts by jefferai
Git Repo (Resuming) Tarballs
5At various points the sysadmins have gotten a request to have repository tarballs made available. The idea is that some repositories can be very large; I believe test runs of the KOffice conversion produced a repository that is 350MB in size. Once you get this down to your system, updating with new refs is relatively fast, but what about that first part? What if you’re on a slow dial-up link somewhere (as some of our contributors are) and/or only have access to the Internet sporadically?
A solution to this is to provide repository tarballs to users which contain a snapshot of the repository. Once downloaded and expanded, you have a viable git clone; run a pull and you’re done (it’s pre-configured to fetch new refs from anongit.kde.org). Actually, run the init script and then a pull; to keep the tarball size as small as possible, it doesn’t include a checked-out working tree, only the .git directory and a tiny script that will a) delete itself and b) check out the working tree.
Now, the idea is to be able to start downloading at one time and to finish it later. The key here is that HTTP file transfers are resumable, so if you start downloading the tarball you can pick up where you left off. However, there was a question — how to be able to show a consistent link on Projects without a priori knowledge of tarball characteristics (since we can’t know any from within Redmine). In Redmine, all we could really do, without massive hackery, is display a statically-named tarball — in this case, it always ends in “-latest.tar.gz”. You can see this at https://projects.kde.org/projects/playground/network/aki/repository or any other project’s repository tab — note the “Tarball” checkout method.
This means however that the client needs some way of knowing whether it’s the same tarball or has been regenerated since. An easy way to do this is to use the If-Unmodified-Since header; however, the web server in use currently doesn’t support this (I checked and the author didn’t believe it was widely used; I pointed him to cURL/libcurl). The other problem with this approach is that it’s not very visible to the user.
So, I first changed the script such that the tarballs being generated weren’t actually named *-latest.tar.gz, but instead that they had more descriptive names and had a -latest.tar.gz version symlinked to the actual tarball. I then wrote a simple web service that the web server proxies to whenever it finds a “-latest.tar.gz” file being requested. This service resolves the symlink and redirects the client, so the user sees immediately what the name of the actual file is. For instance, right now a tarball of the aki repository via http://anongit1.kde.org/aki/aki-latest.tar.gz forwards to http://anongit1.kde.org/aki/aki_20101202050239_sha1-5f866b3a42872f8fd54adcf30bcb8a3a79d02542.tar.gz
Note the components of that filename: the name, the date/time stamp (to the second), “sha1″ indicating that that’s the algorithm to check the hash against, and the hash of the file for easy verification of the completed download. This should make it both easy for the client and the user to verify that it’s the same file, in addition to making it easy for the user to verify the integrity of the full file since they can check the sha1sum against the filename itself.
I think this provides a pretty nice solution to the problem.
KDE Git: Three servers, better commit URLs
4Two quick updates on Git stuff:
First, we now have three anongit servers in rotation. We could probably make do with 0.25 of a single anongit server at the current load, but that will change quickly once kdelibs and co switch over from SVN, so it’s good to be ready.
Second, the generated commit URLs will always be given with the full commit hash, but the commit resolver now supports using partial hashes in case you want to shorten it yourself. For instance, you could manually change the commit URL http://commits.kde.org/amarok/cf17de39f9021064a713db965487be6e3d75a186 to http://commits.kde.org/amarok/cf17de39 to give out a shorter URL.
That’s all; if you were in the States I hope you had a good Thanksgiving.
Multifaceted Git Update Post
7I haven’t blogged about updates to the Git infrastructure for a while and it’s *long* overdue, so here goes. There’s a lot and I don’t have much time so I’ll keep things brief. Credit for these items go to the sysadmin team as a whole plus Sitaram (the Gitolite author)…
anongit servers
We now have two anongit servers (the second one will be coming online on Monday or so — it’s 95% done). It is very likely that git:// and http:// protocols will be restricted to the anongit servers for better load balancing, so if you have been using git://git.kde.org/… as your clone URLs, please switch those to git://anongit.kde.org/… URLs. Wait, did I just say http?
http protocol support
The anongit servers support pulling/cloning via http. This is using the newer Smart HTTP support in which the Git protocol is run over HTTP via a special server. All pushing must be done via SSH (port 22 or 443) on git.kde.org.
trash/destroy
There are now two systems of deleting your personal clones/scratch repositories.
- unlock/destroy: You can destroy a personal repository, at which point it is gone forever; however, for safety you are now required to run the “unlock” command on the repository first.
- trash: You can trash a personal repository. When you do this, it will be saved for 28 days in case you change your mind. You can use the “list-trash” command in order to see the repositories you have in the trash.
More details can be found in the Git(.kde.org) Manual.
who-pushed
There is now a “who-pushed” command that, given a SHA1 and a repository, can tell you what user pushed that SHA1 to the repository. This is essential for auditing, since commit authorship information can be faked. Now, if a problem arises, we at least can know who introduced that malevolent commit into the public repository.
Repository nicknames
Remember my last post about short Commit URLs? One thing I wanted — and was much requested — was a way to have a more friendly repository identifier. Now they exist. If a friendly identifier exists for a repository, it will automatically be used in the commit URL that is generated. If you want a friendly URL, let the sysadmins know. (We need to figure out a way to make nice names for repo names longer than 8 characters — or just remove that artificial restriction.)
Clones path change
When we first started out, clones would live somewhere like clones/amarok.git/mitchell/myamarok. Why the “.git”in the middle (we were asked a lot)? Because the path was meant to match the actual name of the repository as it exists on the server.
The reason for *that* is that Git uses a “.git” suffix on repositories that are bare, to make it clear that it’s a Git directory. However (as we found out from Sitaram), this is not supposed to be user-facing, which is why if you use a Git URL with “.git” at the end of it, it’s dropped in the folder that actually is created on the client. So either the path has to lie about the original path on the server, or the client/user has to be made aware of it when it doesn’t really need to be.
What we ended up doing is removing that “.git” from the middle of the repo name (so now it’d be clones/amarok/mitchell/myamarok) and also took pains to ensure that when clone URLs are shown to the user, they are shown without a trailing “.git”.
At the same time, Sitaram made changes in Gitolite to better handle (in the various commands and in the built-in functionalities) cases where the user uses does or does not use the “.git” suffix so that it works correctly in each case.
Updated permissions on master repositories
Master repositories now allow users to create new branches; however, deletion requires the chosen repository manager(s) to intervene.
Updated permission granularities on personal repositories
Personal (clones/scratch) repositories now have a greater level of permission control settable by the user. (The git.kde.org user manual is not yet updated with this information.)
These are now the permission levels that the user can set, from least to most:
- All: everyone has read and basic write permissions on each repository
- Writers: writers can write new branches to the repository
- Managers: managers can also delete branches from the repository
- Dangers: people designated as dangers (to the repository!) can also rewind/force push to the repository
- Creator: the creator always has full rights
projects.kde.org tree view
If you check out the projects page on projects.kde.org (here) you’ll see that it now supports a tree view matching the structure of the KDE repositories. The URLs also match this structure.
projects.kde.org last activity indicator
On the same page (here) you’ll see that information about the last commit for that project is now shown next to each project.
…aaaaaaaaand we’re done.
Git Commit Semi-Short-URLs
11As you may or may not know, the KDE git infrastructure currently has two assets for viewing repository data — Redmine and gitweb.
Redmine powers Projects at http://projects.kde.org and is intended (pending theming and greater population of data) to be the real “home” of all of KDE’s projects, putting project information, news, repository browsing and more in a pleasant UI. Each project with a git repository will have a project on Redmine as well as on ReviewBoard.
However, Redmine doesn’t have *all* of the git repositories available. This is because in the short term at least there won’t be projects created for user clones of repositories. In addition, the “scratch” area, where KDE developers can maintain their own repositories for anything they wish (that’s KDE-related of course) will never be put in Redmine.
(The reason for this is that if a developer just wants to play around with some code, or perhaps wants a location to store their (versioned) emacs/vi config files or some such thing, there’s no reason that needs to be an “official project” with an entry in Redmine and ReviewBoard. Similarly, if a developer is writing new code but feels that the code is far too raw to actually have others having eyes on it, we believe it should be up to them when they decide to have it put into a project on Redmine and ReviewBoard.)
So, let’s say you’ve just pushed some code. Where would you go to see it on the Web — Redmine or gitweb? I took a first cut at solving this problem by, based on the location of the repository you pushed to, spitting out a Redmine- or gitweb-based URL in the output sent back to your git client. Unfortunately, these were quite long. For example:
http://projects.kde.org/projects/repo-management/repository/revisions/dcd43aacaa806a7a32779a0215b7ab8ed7b05dc8
This isn’t so nice. Especially if your terminal is only 80 characters wide.
So, I came up with a solution — commits.kde.org. It’s a simple Sinatra/Thin-based web application that parses a URL generated by the gitolite hook and forwards you to the correct place. If the repository is on Redmine, it forwards you there; otherwise it forwards you to gitweb.
These aren’t tiny URLs in the style of bit.ly, but they’re deterministic and not based on a database backend. In fact, you can construct these on your own and they’ll still resolve. The form is
http://commits.kde.org/<repoid>/<commitid>
The repoid can be found by looking in the URL that is spit out when you push your code. It stays fixed for each repository (and if it does change, aliases can be added to keep old URLs alive).
In this format, the above URL goes down to
http://commits.kde.org/99c5fdd6/dcd43aacaa806a7a32779a0215b7ab8ed7b05dc8
By doing this, the URL size drops from 110 characters-ish (depending on the name of the project, whether it’s on gitweb or Redmine, and so on) to a fixed 72; enough to make it fit on a single line in most terminals (with the “remote: ” prepended to the git output it’s 80 characters total), and to make it relatively tweet-/dent-able if you don’t need to include much other information in the post.
Update: I should mention that you can shorten those URLs further, but how much depends on when you start getting a collision. If gitweb encounters an ambiguous commit ID, it will 404, without giving information as to why it returned a 404. Redmine, however, will simply return one or the other of the commits — so you may get the wrong commit shown without even realizing it. Worse, this could also mean that URLs that were shorter (very short) but once worked may not work later if a collision comes up later. So you can use as many or few of the hash characters as you want, but I’d stick with at least 8 or so for safety. *Also*, right now the webapp only matches full hash values in Redmine’s database, so if you shorten it you will always get a gitweb URL.
For anyone interested, the current webapp code is GPLv2+ and can be found right here.
For Shame, “The Linux Critic”
126(Update at the bottom.)
Some people can’t be helped.
Today I saw a post by The Linux Critic. In the post the author, Trent, says “I’m really not a fan of the new Amarok“, which naturally got me curious as to why. After all, if you don’t know what problems people have with your software, it can be hard to improve it.
I had never interacted with Trent or any other member of The Linux Critic before, nor had I ever visited their site. I was there with the best of intentions.
I’m going to let the discussion we had speak for itself. I’ve reproduced it below, because Trent started removing my comments and modifying his own. You can see the original blog post here — it’s not even really relevant to most of the ensuing discussion — however I strongly recommend, in case further modification has been made to the discussion on that page, that you read the reproduction of the discussion below which is accurate as of the time of writing this post. At the beginning Trent was fairly hostile; by the end he was outright nasty.
Me:
What about Amarok 2.3 are you not a fan of?
Trent:
The fact that now it’s just another iTunes clone.
Me:
Um. Right.
I guess I will just assume you’re mixing Amarok up with Banshee or Rhythmbox. No other explanation for it.
Trent:
*sigh*
The purpose of this discussion wasn’t to discuss the problems with newer versions of Amarok. It was to discuss the new music player, Clementine
I guess I will just assume you’re mixing Amarok up with Banshee or Rhythmbox. No other explanation for it.
No. I’ve tried Amarok 2.
I don’t like the layout.
I don’t like the entire UI.
I don’t like that the playlist is too small and in the wrong place.
I don’t like the volume control.
I don’t like that it requires KDE4 to run.
I don’t like the enormous waste of space that is the center panel.
I don’t like the ugly look of the buttons.
I don’t like that I can’t figure out how to do a lot of the things I do in Amarok 1.4.
If it were more like Amarok 1, I’d probably be fine with it.
Me:
Sure, I understand the purpose was to discuss Clementine, but when you said you weren’t a fan of the new Amarok, I was interested in knowing why.
The reasons you give are at least mostly valid — aesthetic differences, which are personal for everyone — as opposed to calling it an iTunes clone, which would be very hard to justify. (I say mostly because it doesn’t require you running KDE4 to run. And if you take issue with it depending on KDE libraries, then it seems odd that this would not be an issue for you with Amarok 1.4, which also depended on KDE libraries.)
Trent:
Amarok 1.4 depended on KDE3 libraries. I’m not opposed to KDE3.
Me:
I don’t know why you’re opposed to KDE4. But it doesn’t really matter; they’re just libraries. I don’t run GNOME, but I don’t get upset when something depends on GTK+. If it’s a useful application, then it’s a useful application.
I then attempted to be helpful, by letting him know that many of his complaints could be addressed if he wished to give Amarok another try:
Me:
FWIW — again, not to go into too much detail, since as you said this post is about Clementine — you can adjust Amarok 2′s entire layout, as well as its playlist layout, however you want.
If you go to the View menu you can unselect the Context View if you don’t want it. You can also unselect Lock Layout and relayout the entire thing — have parts of it top-to-bottom, change the order…you can even drag the components on each other to turn them into tabs, so that your entire view could be the playlist, except for when you want to switch to the Media Sources pane to add music to it.
If you go to the Playlist menu, you can select one of four pre-defined playlist layouts, or customize it to your own layout, including a single line per track with whatever data shown that you want.
Also under View, you may want to check out the Slim toolbar — it has a different volume slider.
This is all based on Amarok 2.3.1; not sure which version(s) you’ve tried.
Trent:
Amarok 2.2 was the last one I tried. One could change a lot of that there too, but after about an hour of futzing around with it I just found myself getting too frustrated with it.
I shouldn’t have to go to those lengths just to get around the goofy design philosophy that went into Amarok 2 (much like the rest of KDE4 for that matter).
It’s like they took a look at Amarok 1.4 and said “Ok, let’s see… how can we break everything about this?”.
Ugh.
Clementine isn’t even close to finished yet, and it’s already more usable out of the box than Amarok 2.
Unless they made some rather massive, sweeping usability changes from 2.2 to 2.3.1, which I doubt.
Me:
I don’t remember all the changes between 2.2 and 2.3, but there are plenty. The Amarok team has always been very responsive to user feedback, and that has driven much of our development in the Amarok 2 series just as it did with Amarok 1.
Regardless of you considering the design philosophy of Amarok 2 to be goofy, the entire point of Amarok was always to provide contextual information to your music — Rediscover Your Music. Amarok 2′s goal was to take that further, by allowing for a context space that didn’t have to compete with your collection browsing, so you can still e.g. see lyrics to the song that’s playing while you browse your collection for the next track.
These days Amarok 2 is pretty much feature-complete w.r.t. 1.4 features, and has huge numbers of features never in Amarok 1. It’s always interesting to me how if you look at Amarok 1.1 vs. 1.4 you see *huge* differences, and people tried out each release and gave feedback which made things even better. With Amarok 2 some people seem to think that it’s static, and never changing, and never improving — so they, say, try Amarok 2.1, don’t like how it works or miss some feature that hadn’t been ported yet, and don’t bother trying 2.3, regardless of the fact that in the same series of point releases in the Amarok 1 days they would have seen massive changes. So instead of providing useful feedback and helping Amarok grow and improve, which it still continues to do quite rapidly, they simply turn venemous about it, often complaining about things that have long been fixed or capabilities that have long since been added.
Fortunately, not everyone is like that, and we still have a great user base that provides feedback that we try to address. For instance, the ability to change layouts and make the playlist hugely customizable was the direct result of feedback from Amarok 2 users that wanted to be able to make it behave similarly to Amarok 1.4, which it can do to a very large extent.
Trent:
So instead of providing useful feedback and helping Amarok grow and improve, which it still continues to do quite rapidly, they simply turn venemous about it, often complaining about things that have long been fixed or capabilities that have long since been added.
I’ve seen the KDE forums and I’ve seen enough of the attacks on users who try to provide feedback. It was enough to tell me that if a person isn’t gushing with love over it, a person is therefore just “resistant to change” or “doesn’t get it”.
Most of the things I label as bugs or design flaws are pointed out time and time again as intentional in KDE4 and related applications.
The philosophy itself I find repugnant. That’s why I left KDE completely after trying KDE 4.0, 4.1, 4.2, and 4.3.
While I’m sure Amarok 2.3.1 might be different and maybe even flexible enough to emulate Amarok 1.4, I’ve found that every time I’ve tried anything KDE related in the last 2 years I get frustrated, angry, and venomous.
So no, I haven’t been forthcoming with feedback. I never even know where to begin. There are so many things wrong with the directions KDE4 and Amarok devs have gone, I find myself overwhelmed any time I try to enumerate them.
And again, this discussion is about Clementine, not Amarok 2.3.1. Amarok 2.3.1 might be awesome, that’s great. For people that don’t mind the layout, and the difficult UI, and all the other stuff I simply can’t stand, that’s fine by me. They can use it.
But as Jules said in Pulp Fiction, “Sewer rat might taste like pumpkin pie, but I wouldn’t know, because I wouldn’t eat the filthy m**********r.”
Fortunately, not everyone is like that, and we still have a great user base that provides feedback that we try to address.
Ah. Gotcha. “We”. Meaning that you’re one of the Amarok developers that ruined my favorite music player.
Well, that explains why you’re trolling my blog post.
Me:
Yes. Trolling. Asking for details as to a comment you made in your blog post, and then trying to provide helpful information based on your feedback. Right.
I guess I shouldn’t be surprised. From your comment, you clearly are determined to put down KDE4 and anything related to it, and attempts to be helpful are unwanted.
This is the point where Trent starts modifying history. This was his original reply:
Considering that I don’t use KDE4, I’m not sure that “attempts to be helpful” are even relevant.
To which I replied:
You listed complaints about Amarok 2; I explained how they could be addressed. That’s attempting to be helpful, and relevant to the discussion.
At this point Trent deleted my comment above, and went through two revisions of his previous comment. The first one is below:
Considering that I don’t use KDE4, I’m not sure that “attempts to be helpful” are even relevant.
As an FYI to any other KDE developers or fans that might be reading: If you have something useful to contribute to any discussion on The Linux Critic, your comments are welcome.
If all you are going to do is pick fights about why EVERYBODY can’t love every little thing KDE4 and its apps, your comments are not.
This has happened again and again, and I’m not going to tolerate it any further.
And here is his second revision, which is still the latest at the time of publishing this post:
Considering that I don’t use KDE4, I’m not sure that “attempts to be helpful” are even relevant.
As an FYI to any other KDE developers or fans that might be reading: If you have something useful to contribute to any discussion on The Linux Critic, your comments are welcome.
If all you are going to do is pick fights about why EVERYBODY can’t love every little thing about KDE4 and its apps, your comments are not.
This has happened again and again, and I’m not going to tolerate it any further. Play nice, or play somewhere else.
Thanks.
So there you have it. Not much else to say. I’d never heard of The Linux Critic before, and now I know why.
Update: Trent replied with more accusations of trolling (does he even know what that word means, considering he’s the one trolling on KDE4?), of purposefully trying to derail a discussion about Clementine (what discussion?), of some sort of KDE4 lovefest, and all sorts of other manners of odd accusations against a person he’d never met before today and the discussion above. This guy is off his rocker. Here’s the comment:
And I see my KDE troll has gone off to sulk.
Just as a heads-up, trying to derail a discussion about the Clementine music player and turning it into all about KDE4 is not “trying to be helpful”, and it is not “relevant”. It’s rude, insulting, and I consider it to be trolling.
While I don’t typically behave like a topic nazi here with respect to keeping every single comment on-topic, when it comes to KDE4 trolls, I have very little patience, because those comments always end up going the same places, and it’s never constructive, always just fight-picking.
In this case, I’ll freely admit at least some culpability, because I responded to the initial question about Amarok, despite my better judgement.
Here’s a hint: not everybody loves KDE4. Not everybody wants to use it. Some of us prefer not to use KDE4, and some of us (gasp!) even prefer the KDE3 versions of those apps!
Baffling, I know. But it’s true. That’s why I made this post yesterday about Clementine. There are lots of other people out there that used to love Amarok 1, and don’t want Amarok 2.
For those people, seeing a new, stable, usable fork of Amarok 1.4 is a really great and exciting thing, and I thought that others should know about it. It’s very positive news when for a lot of us, the past few years have been spent trying in vain to find a replacement for that now dead application.
And in my experience, when KDE4 trolls come around, trying to change the discussion into an argument about why????????, it’s not relevant, not helpful, and is anything but useful to the topic at hand.
The reason I’m commenting like this is because I want to clarify that. I’m drawing a line on this subject because I’m tired of this.
To Jeff: those of us who have left the KDE world don’t want your help. You can keep it. Don’t call us. We’ll call you. So scurry off to your KDE4 lovefest and leave the rest of us be to solve the problems you created for us. You’ve done more than enough.
What a swell guy.
Update 2: Here’s Trent’s response to one person who attempted to go onto his blog and tell it like it is (thanks Marand!). One editorial note: Trent claims “you also didn’t see some of the other garbage of his I deleted.” Every tiny bit of my interaction with him is in the original post above. Not one word has been omitted. It’s possible he has since deleted some more of my comments from his blog in order to rewrite history, as I have shown above, but what you see above in the original post is all of the “garbage”.
Marand:
Maybe I’m missing something, but I don’t see how he was trolling. I see a developer trying to communicate with a former user to get useful feedback and being treated with hostility for it.
If you don’t like something, that’s fine. If you can’t explain why you don’t like it, that’s also fine. However, it isn’t his fault you can’t offer a well-reasoned explanation of why you dislike the application, so I think you crossed a line lashing out at him over your inability to express your opinions constructively.
It looks like the discussion fell apart when constructive advice was offered to solve your various complaints. Lacking better arguments, you lashed out. You should have just left it at “I don’t like it because it’s different, and I have an irrational hatred of the number 4″, it would have been more mature.
Here, let me give you a better example to use when saying you dislike Amarok 2. This is a problem that has plagued the app for me in all versions since the change. Frequently (several times a day), I have to restart Amarok 2 because the dynamic playlist breaks and stops updating. Haven’t been able to figure out why, but it seems to be related to the collection scanning. It’s frustrated me enough that I’ve considered changing players, though I like Amarok enough (even 2!) to still use it despite this problem.
For the record, I’m not a developer of KDE, Amarok, or anything else. I use KDE4 and I actually like it, but I don’t care what anyone else uses or likes. My only motivation for this post is I think that, if you like or dislike something, you should either be able to provide clear explanation of why, or you should admit you cannot.
Trent:
Maybe I’m missing something, but I don’t see how he was trolling.
He was, as happens frequently, someone who tried (successfully, I might add) to derail a topic to talk about something else after being repeatedly warned that it was off-topic. While that can pretty easily fit the definition of someone needing their comments moderated, he was doing it in an inflammatory, extraneous manner. You also didn’t see some of the other garbage of his I deleted.
My biggest mistake was in responding to him to begin with, given that his very first comment was off-topic (and I know from experience where those usually end up leading).
If you don’t like something, that’s fine. If you can’t explain why you don’t like it, that’s also fine. However, it isn’t his fault you can’t offer a well-reasoned explanation of why you dislike the application, so I think you crossed a line lashing out at him over your inability to express your opinions constructively.
I’m perfectly capable of explaining why I don’t like Amarok 2. If you bothered reading before you posted, you’d notice that I gave him several valid reasons why I don’t use Amarok 2, despite the fact that this article was about something else, specifically a program that Amarok 1.4 users may not be aware of that I’ve found to be a very positive direction in music player development for a change.And considering that The Linux Critic is my blog — not his, and not yours –, and it’s my prerogative to determine content here, including content of discussions about posts, and considering that his discussion was off-topic and inflammatory, I was in no way “out of line” in lashing out at him. As I’m sure you know, Jeff has his own blog where he went to whine, and note that I didn’t go over there and change the subject to something that he found inappropriate, or spout idiocy at his opinions. He can have his opinions, he can say what he wants.
And he can express them somewhere else. They were inappropriate here. As I mentioned, I made a mistake in responding to him to begin with.
It looks like the discussion fell apart when constructive advice was offered to solve your various complaints.
The discussion “fell apart” when he tried to change the subject from Clementine 0.4 to Amarok 2 and KDE4. After repeated warnings he continued to do it, so I deleted his further attempts at doing so and I blacklisted his IP. I have made it very clear here in the past that I will not tolerate spammers and trolls, and I felt that I was pretty reasonable in the amount of leeway I gave him. Most of the time I just delete those types of comments outright, because they inevitably lead to (surprise!) more off-topic discussion like we’re having right now.
Lacking better arguments, you lashed out.
Ah. So, since I went out of my way to present arguments that were in response to off-topic, inflammatory trolling, and you happen to disagree with my opinion, they’re “lacking better arguments”. Gotcha.
You should have just left it at “I don’t like it because it’s different, and I have an irrational hatred of the number 4″, it would have been more mature.
And you were wondering why I don’t like KDE4 trolls commenting on my blog posts? Again, you apparently missed the several valid reasons I gave why I dislike Amarok 2. And you apparently missed the part where I mentioned that I’ve used KDE 4.0, 4.1, 4.2, and 4.3, and have dismissed it as a valid replacement for KDE 3.5.10.If I didn’t like things because they are “different”, I’d still be using Windows 2000.
And on the subject of maturity, derailing a topic to insult people because you disagree with their opinions, that wins a prize too, sport. Keep it up.
Here, let me give you a better example to use when saying you dislike Amarok 2. This is a problem that has plagued the app for me in all versions since the change. Frequently (several times a day), I have to restart Amarok 2 because the dynamic playlist breaks and stops updating. Haven’t been able to figure out why, but it seems to be related to the collection scanning. It’s frustrated me enough that I’ve considered changing players, though I like Amarok enough (even 2!) to still use it despite this problem.
And the next time I write an article here about the problems with Amarok 2 and how they could be improved, that will be a valid and relevant thing to discuss. But considering that this particular one is about Clementine, that would be a bit out of place here, as I told Jeff several times before I banned him.
I use KDE4 and I actually like it, but I don’t care what anyone else uses or likes.
No, like other KDE4 fanboys I’ve encountered, you obviously can’t stand it when someone doesn’t get all starry-eyed at the desktop environment you love so much, and just have to shoot your mouth off any time someone expresses an opinion to the contrary, whether it’s appropriate for you to do so or not.
My only motivation for this post is I think that, if you like or dislike something, you should either be able to provide clear explanation of why, or you should admit you cannot.
And I did, above, in response to Jeff. Even though it was against my better judgement, and in violation of my own policy against feeding the trolls here as it was off-topic and inflammatory.What I probably should have done was delete his posts and ban him right off the bat. Had I known he was just an Amarok developer coming here to pick a fight, that’s what I would have done.
The biggest problem is, I tend to give people far too much leeway here sometimes, and look what it gets me.
Yes, look what it gets him.
Update 3: Another brilliant post from Trent in the comments of his blog. The real highlight is his characterization of my interaction with him, in which I apparently expressed, using lots of punctuation marks and emphasis, my disbelief that he didn’t like every tiny thing about, apparently, anything. He says “here’s how these almost always go” and finishes by saying “Every. Single. Time.” Which shows that his arguments aren’t even internally consistent.
Trent:
I actually like KDE4
but I’m certainly not going to push it on someone who’s not interested.
There’s nothing wrong with liking KDE4. It’s not for me, that’s all.
I’ve tried engaging with the developers at the Amarok forums, they are not interested in any critiques or comments on the UI. Politeness gets you ignored or patronised, frustration gets you deleted. Unless you’re part of the echo chamber don’t bother.
*nods*I found that most of the issues I had with KDE4 and Amarok, when I looked around where one would submit such feedback, were things that were there by design, and would never be “fixed”, because they weren’t broken. Things like this convinced me it was best to just move on entirely. Despite what any of them said, they weren’t really interested in feedback that didn’t reinforce what they were doing.
They even come here and try to offer “help”.
If they truly wanted to help, they’d have done what the little team working on Clementine has done. Port Amarok 1.4 to Qt4 to take advantage of some of Qt4′s features, and make it worthy of the name, rather than… whatever it is they’ve done with it.
That would have helped. Trolling blog posts about replacement applications doesn’t help at all. It just makes me mad.
I actually don’t mind they have their vision and are somewhat single minded about it – that’s their prerogative as the developers, its this pretence that they are open to feedback that is quite irritating and the tendency to evangelise.
Yeah, that’s exactly what spins me up so much. Here’s how these almost always go.1) Wait, you don’t LIKE *whatever*???? Inconceivable! Why?
2) Well what don’t you like about it?
3) Oh. Well, I think you don’t like it because youdon’t understand it.
4) Oh. In that case then, you don’t like it becauseyou’re resistant to change.
5) Well, I’m going to assume you’re stupid then, since you don’t like it. Here’s how to use it.
6) Why are you getting mad at me? I’M ONLY TRYING TO HELP.
Every. Single. Time.
Meh – Amarok is dead (for me anyway). Long live Clementine. And RhythmBox. And Banshee. And Bangarang … you get the idea
Yeah. Amarok died with 1.4 for me. I’ve moved on, particularly now that it looks like a replacement (in Clementine) is in the works. It might take a while for it to catch up, but I’m pretty hopeful that those of us still using Amarok 1.4 can move on from it soon enough.Thanks for the comment.
Update 4: Valorie Zimmerman wrote a nice reply on Trent’s blog encouraging him to work with others, instead of simply spewing bile. Trent’s idea of responding to such a nice comment is to entirely miss her well-articulated point, insult me some more (to be expected), continue to insist that my comments were inflammatory and “intended to start an argument”, and then command her to “move on”:
Valorie:
You’ve completely misconstrued Jefferai’s response to you. Why the hatefullness?
Really, everyone here agrees on two things: we love music, and we love free and open software. So why not use the player you like, and contribute to that if you can. F/OSS works when people work on the projects they love.
F/OSS is just dragged down by hating on people and projects. Please stop doing that. I love Amarok, but point people to Clementine (or other players) if they want help finding alternatives. No project can meet all needs, or keep everyone happy. Enjoy diversity!
Trent:
I love Amarok, but point people to Clementine (or other players) if they want help finding alternatives. No project can meet all needs, or keep everyone happy. Enjoy diversity!
That was precisely the entire point of this article. To point people to Clementine, and to provide some reasons “why”. I think I did a reasonable job of that, unless you read a different article than I did.
My responses to Jeff were responses to off-topic, inflammatory comments intended to start an argument. I’ve already admitted that I should not have responded to him. It was my fault, I’ll freely admit that. Move on.

Prosody, the first password-hashing XMPP server
9(At least, AFAIK!)
Recently, I have been contributing to another project outside of KDE: the Prosody XMPP server. Prosody is fairly new (the project began in 2008) and is written in Lua. I’ve been using it for a long time now, and it’s a really nice, rock-solid server. The code is also pretty hackable, being both modular and fairly clean.
My impetus for working on it was that at work we have been using the OpenFire XMPP server. It’s a big Java beast and is all but unmaintained at this point. Since I’ve had good experiences with Prosody and it already supported most of the functionality I needed, I decided to see how it handled a migration at work.
One thing it *didn’t* support was pluggable authentication. The basics for this were in existence, but the code was not yet right. After some pestering, Matthew Wild and Waqas Hussain, the two main Prosody developers, fleshed out the API necessary, and I began to work on separating out the built-in authentication code into a plugin that could be swapped out for other providers.
Once this was working, my next step was to attack something that has been bugging me on various XMPP servers to this point: plaintext password storage. To the best of my knowledge, every other XMPP server stores your credentials in plaintext or via easily reversible encryption with the key stored with your user account — in essence, simple obfuscation. The reason is because of the XMPP standards’ mandate that SASL PLAIN and DIGEST-MD5 be supported authentication methods. While SASL PLAIN transfers the password in cleartext (over the encrypted tunnel between client and server), thus lending itself well to comparison against a hash, DIGEST-MD5 does not. It consists of multiple possible authentication schemes based on the abilities of the client/server, and with different tranferred credentials depending on which scheme. It would require at least four saved tokens for every user, to be used depending on the mechanism the client and server negotiated, and updating these when passwords changed was not necessarily trivial.
So, I decided to make a tradeoff — you can store a plaintext password on the server and have DIGEST-MD5 available, or you can be limited to PLAIN and have a plaintext password go through the encrypted tunnel between client and server but have it hashed in the server’s storage. Personally, since I trust the server I’m connecting to, I’d rather have the latter. ejabberd makes a claim here that it’s more secure to have passwords sent in hashed form over the network and stored in plaintext on the server, but I think this claim is not well-reasoned. Like in many cases, security in this instance is relative. If you’re using SSL/TLS communications, which is by far the norm between XMPP clients and servers these days (in fact, in most clients you must explicitly enable plaintext authentication over unencrypted streams), the passwords are already encrypted when sent over the network — so unless you fear a MITM attack, you’re not going to be vulnerable to snooping. But you *will* be vulnerable to someone hacking onto your server and simply reading your plaintext passwords from a file, and that’s bad. I think that ejabberd’s claim is out-of-date now that encrypted communications between XMPP clients and servers are the norm, and you’ll be better off in most cases with having the one place the password is permanently stored be in a hashed form. (As you’ll soon see, you’re about to be able to have your cake and eat it too, anyways.)
The next step was deciding which hash algorithm to use. There’s something called SCRAM, which stands for Salted Challenge Response, and is an upcoming SASL authentication paradigm. It uses an open standard hash function called PBKDF2, which basically works like this: take the password, salt it with a large random series of bits, and then run it through the SHA-1 function. 4096 times. Rainbow table *that*. If you like, you can swap out which hash function you use, so you could use SHA-256 or some other function, and you can do it more than 4096 times if you like, too.
By limiting what information is passed between server and client, using secure hashes like PBKDF2, and never transmitting the password in cleartext to the server, SCRAM provides a SASL mechanism that is both highly secure and more standardized than DIGEST-MD5.
Now, back to the hashed password backend. Support for SCRAM is beginning to appear in some XMPP clients, and support was mostly coded into Prosody as well, so I asked the guy who wrote it, the excellent Tobias Markmann, to expose some bits of the SCRAM capabilities such that I could use the PBKDF2 functionality to store password hashes, as well as allowing arbitrary salts and iteration counts to be defined. He did this, and I coded up the backend, and suddenly Prosody became the first XMPP server, to my knowledge, that can securely store your password server-side.
The backend provides seamless upgrades from the plaintext backend; it will simply take the password that currently exists for the user, generate a random salt, and create the hashed credentials, removing the plaintext password.
Tobias is currently taking it a step further: he’s modifying the backend to store bits of information required by the SCRAM algorithm instead of the direct password hash. What this means is that if you end up using a client that only supports PLAIN authentication, those bits can be generated by your password on the fly and used to verify against. However, if your client supports SCRAM authentication, the backend will now be able to serve up the bits necessary for SCRAM-SASL. So you’ll have secure server storage *and* a secure exchange from client to server (in addition to the normal SSL/TLS tunnel). Tobias is, I believe, working as a SoC student on Psi — so I’m sure it’ll be working between Psi and Prosody pretty soon, if he doesn’t have it done already.
The hashed password backend isn’t currently the default, but if you’re running Prosody you can enable it by adding auth_internal_hashed to your modules and defining (in your host) the line
authentication = "internal_hashed";
Once it’s tested more thoroughly, and especially when SCRAM support is finished and working in more clients, expect it to become the default backend.
Amarok Mobile – The Beginning
4This post is actually rather after the fact. I’ve been super busy, and my blogging tends to fall way, way behind when that happens. But I wanted to tell people about plans for Amarok Mobile, where things stand now, and what needs to be done. (And how you could help!)
First off, I need to give a big shout-out to Nokia. A while back, they donated ten n900 devices to KDE developers who submitted proposals describing what they would work on. I was one of the lucky winners, and this provided both the motivation and means to start working on an Amarok Mobile.
I actually was not initially supposed to use this for Amarok Mobile development — I had sumitted a proposal to bring functionality similar to the beloved* Popup Dropper into a library for Maemo programs. Problem: having never used Maemo before, I didn’t realize it had longpress functionality (my previous phone was an iPhone).
So, not wanting to reinvent the wheel needlessely, I instead decided to start working on exactly what everyone had assumed/thought/wanted me to be working on when they heard I was one of the n900 recipients: Amarok Mobile.
Below is a record of some of the work that has been done, and that remains to be done.
Core work
In large part due to its very rapid pace of development, Amarok’s code base has had a habit of growing haphazardly, and one of the results has been a lot of incestuous code…things coupled when they really shouldn’t be, code being referenced and implemented all over the place, and so on.
As a result, one of the first things I did was to work on separating out code that provide core functionality — things like podcasts, playlists, our metadata system, collections, and more — and boil them down to the basics. The rule for the core library is: no GUI code, and nothing inside core may reference any files outside of core. The point is that core should comprise the essence of Amarok, and much of what’s left are the possibly platform-specific implementations. In addition, I standardized namespaces for the parts of core, standardized include headers (which makes it much easier to handle file moves later, since they are fully-pathed from the top level source directory), and had absolutely countless compilation cycles. It was an absolute fsckload of work.
However, I think it paid off. We now have, inside src/, a core/ directory and a core-impl/ directory. If we studiously keep core/ separated, it will provide an excellent base on which alternative GUIs and implementations of those core classes can be built. In addition, more things will be moved there, or at least the paradigm will continue being followed; for instance, our great contributor Erik Hovland has been making progress on separating out the GUI layer from our Services framework so that we can have the great services like Ampache and Magnatune and Last.fm and so on be relatively easily activated on other platforms.
SQL
Amarok 2 currently uses MySQL exclusively, allowing you to either use a MySQL server or libmysqld for an embedded database. This has pros and cons, but the really relevant pro is the huge speed gains we get over SQLite. (Before people comment about how we must be doing something wrong: we’re not the only project that has seen serious speed problems with SQLite — I know that Quassel has had similar issues; and if you’re convinced that it’s our schema or some other such thing, you’re welcome to help us improve it. Many others have made this claim, and none of them have ever taken our invitation to actually help us improve things.)
So the obvious question comes up: what about Amarok Mobile? I’m not sure how realistic it is to expect that we can get libmysqld running efficiently on the n900, especially given its memory limitations. At the same time, SQLite is readily available. But, we want to avoid writing tons of custom code.
As it turns out Quassel has a really great storage abstraction using QtSql, and they use both SQLite and PostgreSQL. So, if we copied their really nice approach, we could maybe support SQLite with Amarok Mobile while reducing developer effort to a minimum (since none of us are SQL experts).
One of the big problems we’ve had with QtSql before is that the QMYSQL plugin can support libmysqld (except that it can’t; more on that in a second), but in one of the most boneheaded software design choices I’ve ever seen in my life, MySQL determines whether you’re connecting to a server or an embedded server based on which library your program *links* to. This is not a runtime option. Wut.
So — the obvious option is to bring to Qt what we do in Amarok — instead of having a QMYSQL driver that has to link to one of the other, have a QMYSQL driver linking to the server libraries and a QMYSQLE driver linking to the embedded libraries, and let application developers choose one or both. I began working on this, and have been successful in building both drivers, and have high hopes I can get it included into Qt 4.8 (there’s necessarily a lot of code duplication, so I’ll have to see what they say about that…I may be able to abstract some of it into shared functions, but anywhere that mysql in any case was used, I had to replace with mysqle).
Now, I said that it can’t actually support libmysqld. The reason is that you pass in options for the embedded server upon library init — but QtSql *always* initializes the library with null options. Which means, among other things, that it will use /var/lib/mysql (or whatever your compiled-in default is) for its database directory, which normally means that if you’re not the root user, you can’t actually do anything because it can’t create its files. Whoops.
I can’t break ABI or API, so I’ve been wondering what to do about this — some of the Qt guys suggested I create a new SQL framework with these drivers in it, but I don’t think that’s a great option. Instead, I plan on creating a new connection option (see the table here). Normally these are basically mapped to MySQL options and used like this:
db.setConnectOptions("CLIENT_SSL=1;CLIENT_IGNORE_SPACE=1");
This connection option will not be mapped directly to a MySQL option, but will instead take a delimited list of options, something like this:
db.setConnectOptions("CLIENT_SSL=1;CLIENT_IGNORE_SPACE=1;MYSQLD_INIT_OPTIONS=myoption1=myvalue1;;myoption2=myvalue2;;myoption3=myvalue3");
This would let you pass arbitrary options, and this list would be split and each of the options would be passed into library initialization. It’s API/ABI compatible and relatively straightforward, so it’s the best thing I can think of right now.
Future work
The next steps are to finish the QtSql modifications and get those submitted upstream. Maemo right now has Qt 4.6, but *eventually* will have 4.8…so when 4.8 is coming around, if my QtSql changes are in there, Amarok can try migrating to QtSql; to finish services GUI separation and separation of other parts of Amarok (like AmarokURLs), and to begin writing a GUI, ideally using the Qt Kinetic declarative UI library — when you’re starting from scratch, you might as well do it right. Fortunately some of these tasks will be much easier now that Qt is fully supported/included in the proper locations with the n900 PR 1.2 firmware release.
My time has become incredibly limited in the past month, so if you have time and are interested in helping, join us!
* Okay, I know one person that really, really hates it. And a lot of people that never really realized it was there. But a lot like it!
Rescanning Single Folders
7Quite often — or at least, “often enough” — we get people that want to rescan a particular folder in Amarok. This is usually the result of them changing tags and wanting Amarok to pick it up. (Remember, for efficiency reasons Amarok watches the modified times of the collection directories, not the collection files, so adding or deleting (or renaming) files will trigger an incremental scan but modifying a file’s contents won’t.)
Previously, our advice was “touch the folder” or in the worst case “just do a full rescan.” Now there’s slightly better advice we can give. If you right-click on a folder in the collection setup dialog, and if the folder was already in your collection (i.e. you didn’t just check it a moment ago), it will give you the option to rescan that folder.
The text above that field has also been modified slightly to indicate that this is possible. Check it out:
This is in current git master and will be in the 2.2.3 release!
The Collection Scanner’s Ultimate Speed Bump
7A couple of weeks ago I spent a long period of time looking at ways to increase scanning speed. Yes, again. I had written previously (here and here) on changes I’d made to increase the speed of scanning collections, and I’d made a lot of other changes that I didn’t write about. These certainly helped in many situations, and made significant differences for particular users, but overall we still had a large speed boondoggle: the number of queries issued per track to the database.
This number was at least three. At the very minimum, assuming the artist, album, genre, composer, and year had been cached, you had a lookup for the uniqueid, a lookup to check for whether the track was part of a compilation, and an insert. This number could be significantly higher in some situations; but these database queries were a large part of the reason that a scan might run, finish disk I/O, and then spend quite a long time eating up CPU time before it was done.
I looked at increasing the number of values I was pulling in using UNION queries, which was currently up to five values (depending on whether they were already cached). I also looked at prepared statements, which it turns out were not likely to give us a large speed bump and are an absolute and utter pain in the ass when using the C API as we are. (We use the C API for historical reasons; also, the official C++ API is not easily available in many distributions, and there are many unofficial contenders.)
Finally, I looked at ripping the guts out of the scan result processor and doing what several of us devs had decided would probably be the best way to improve speed, but was at the same time the most challenging: replacing the SQL statements with local memory storage, populating these at the beginning of a scan and re-populating the database at the end. It wasn’t easy. I selected data structures very carefully for speed, looking at how often each query would be run and the time complexities of insertion and lookup into various types of structures. In addition, because of a few complex queries using joins, the behavior we needed could only be emulated by using very complex data structures (one of them is a QHash<QPair<int, QString>, QStringList*>; another is a QHash<QString, QLinkedList<QStringList*> *>). I also wanted to minimize memory usage…I did some rough back-of-the-hand calculations which indicated that using my design, for the vast, vast majority of collections, memory usage during the scan was likely to go up by only a couple of megabytes at the very most, which would be reclaimed at the end.
In addition, I implemented logic to drastically decrease the total queries needed for insertion. Since I’m constructing the final queries from the data structures, I could easily do insertion of multiple values at once. So now the database is queried at the start to see the maximum query size it will accept; then values for insertion are appended to the query up until this value is hit, at which point the query is run and a new query begun. By default I think this is one megabyte for most installations, which means that instead of possibly thousands upon thousands of insertion queries (depending on the size of your collection), you’d have to have an absolutely extraordinarily large collection to have more than 25 or so queries for the entire scan. Since there is not only round-trip delay sending data to and receiving responses from the database but also the database must parse each query each time it’s run (the purpose of prepared statements is to reduce this), then this makes a drastic difference. To put it another way, the number of queries per track has gone from a minimum of three to an asymptotic value of zero.
Overall, the work seems to have paid off rather nicely. Benchmark reports that I got back indicated anywhere from 30% to 300% gains in the total time for a scan, depending on size of collection and your particular I/O throughput/CPU/etc.
I call this the Ultimate Speed Bump in the title because there is far less that can be done from this point on to increase speed, at least as far as I can currently tell — this was the Big Mama, the elephant in the room. But hopefully it will increase scan processing enough that further increases won’t really be so much of a necessity anymore.
One other data point: the database is now case-sensitive, which is something we’ve intended to do for a long time but is now being done. It’s been a very long-standing feature request that we’ve finally implemented (we wanted it too), and thankfully it wasn’t much work to do this and change the appropriate points in the rest of the code.
(By the by, this will all be in 2.2.1 — enjoy!)
Award-winning professor Philip Bourne to speak at Camp KDE
3Philip Bourne, the 2009 Benjamin Franklin Award-winning computational biologist, will be speaking at Camp KDE 2010.
Professor Bourne is well-known in his field for contributions to open-source bioinformatics software and is a leading advocate of open access to data. Quoting from the UCSD News Center:
Bourne is co-founder of SciVee, the Web 2.0 resource dedicated to the dissemination of scientific research and science-specific research networking. Launched in late 2007 as a collaboration between the National Science Foundation and the San Diego Supercomputer Center (SDSC) at UC San Diego, SciVee has been used by hundreds of thousands of students and professional scientists as a means of learning and sharing their research through online science videos that supplement peer-reviewed journal articles, stimulate discussion, and promote collaboration. SciVee earlier this month announced a number of significant upgrades to its site, along with the addition of 32 new science categories.
Open data access and open source share similar goals, and Professor Bourne’s discussion of his experiences with open data access should prove informative and interesting to all.


Recent Comments