Planet XMMS2

August 24, 2010

Cherif YAYA (allad)

GSoC 2010: End of summer

The end of summer is already upon us. Time to wrap up the GSoC 2010.

As you probably know, I set out to write a XMMS2 client for mobile devices in the framework of the Google Summer of Code.

The goal was to use the latest web technologies to build a  web app with a native look-and-feel that could be used to remotely control XMMS2 playback. I’m happy to announce that I have successfully completed that project.

The new client is called Oritide and offers the following features :

  • Now Playing screen
    • play/pause, previous, next command
    • volume control
    • playback position control
    • cover art support
    • now playing songs list with tap support for playing any of them
    • playlist shuffling
  • Playlists screen
    • list all non-hidden playlists of the daemon
    • support for playing any song of any playlist at any time
  • Media library browsing
    • library browsing by artist > album > songs
    • quick filter for easily finding artist
    • artist’s albums playback support
  • Search screen
    • support for finding songs from artist, album or title queries
    • direct playback of any song
  • Mobile devices
    • support for touch input
    • automatic artwork sizing
    • support for adding the app to the home screen on iOS devices
    • support for running the application fullscreen on iOS devices

Here’s a demo video of the app running on the iPhone :

Oritide is still in beta testing but is stable enough for everyday use. You can download it here.
Since it is a web application, all you need is a modern browser (with good support for HTML5 specifications) .  It has been successfully tested on iOS devices (iPhone and iPad) as well as Android handsets.

Please give it a spin and test everything you can. Help us improve Oritide to make it a top notch client for XMMS2 and report your findings on our bug tracker : http://oritide.lighthouseapp.com

Finally I’d like to thank my mentor, Daniel Svensson, the whole XMMS2 organisation and Google for giving me the opportunity to work on such a fun project. I really hope that through Oritide, more and more people will get to know and appreciate the awesome media player that is XMMS2.

by admin at August 24, 2010 09:12 AM

August 16, 2010

Sivert Berg (cippo)

The End

GSoC is coming to an end, and it is time to wrap it all up and show the results of a summer of code. Since the last post I have implemented the Collections 2.0 query concept with some minor changes. I have also written a simple command-line tool for S4 to query, add to and delete from S4 databases without using XMMS2. You can read more about Collections 2.0 here and S4 and the S4 cli tool here.

If you want to try out the new code you can checkout git://git.xmms.se/xmms2/xmms2-cippo.git (the master branch). On the first run it should convert your old sqlite database into a new S4 database automatically. As the code has not seen extensive testing I would recommend that you back up your sqlite database before using the new code.

For client developers interested in the new query system I recommend you take a look at this. There is also a simple client using the new query API in the s4coll2 branch in the previously mentioned git repository. You can also take a look at how xmmsc_coll_query_ids and xmmsc_coll_query_infos are implemented, as they use the new xmmsc_coll_query function underneath.

Before logging off and starting to think about other things than GSoC again, I would just like to say thank you to the good folks at XMMS2 and Google. It has been a really interesting and enjoyable summer of code!


by Sivert Berg at August 16, 2010 05:01 PM

July 22, 2010

Daniel Svensson (nano)

The Garbage Garbage Collector of Python

Two years ago we started our journey to write what would become an enterprise server software in the Python language. Over time we’ve done some pretty nutty things that wouldn’t have been made if the Python VM wasn’t crap. The reason we started with Python was due to a constraint on how to communicate with a core component in the environment. In hindsight we probably should have written our own library from start (we have done so today), but it was also an interesting ride.

Like everyone else we noticed that Python becomes slower and slower for each thread you add, specially on SMP systems, thanks to the glorious Global Interpreter Lock. With the help of python-multiprocessing we later were able to take advantage of the 8 cores available to us, at the cost of copying a lot of data between processes (5-60 processes depending on configuration), and consuming a heap of RAM (16-24GB were not uncommon). To reduce the work of using multiprocessing, python-orb was created (which could do with a bit more polish, but it suits our needs).

Later on we noticed that our software pretty much crawled to a halt at a regular interval. At last we started to realize that this might be caused by the Python garbage collector. After some investigation this turned out to be the case, and we decided to just skip the garbage collector altogether as it only helps when you have circular references in your application (Python is otherwise reference counted), and those can be fairly easily circumvented.

Python being a dynamic language means that you pretty much have to make up for the rapid development and compact syntax with twice as many test cases (yes, your application will start with completely broken syntax, and typos until it’s time to execute that particular line of code). This is not really that bad as the tests too are rapidly developed, and you need to have tests to prove that your software does what you want even after a major refactoring.

At the time we found the problem we simply disabled the garbage collector in our test-framework and started logging gc.collect()’s after each test method had run. In addition to this, we added support for running the garbage collector on demand in our software so that we could run it for some hours with tons of data and then see if a gc.collect() returned something. Some days later we had nailed the last of the few cyclic references and were ready to run the whole application with the garbage collector disabled. Result was a lot better performance, and the end of stop-the-world garbage collections. Win!

The new version of our product relies on a much better virtual machine, namely the JVM, we do however still use Python a lot for non performance critical scripting, and for analyzing data and so on. During last week I analyzed a lot of data to locate a bug, this involved loading up a blob of JSON data and juggle it around until something interesting popped up (and it did!). This is a prime example of what disabling the garbage collector can do for you on a daily basis, so here it comes:

> import cjson, time, gc

> def read_json_blob():
>   t0 = time.time()
>   fd = file("mytestfile")
>   data = fd.read()
>   fd.close()
>   t1 = time.time()
>   parsed = cjson.decode(data)
>   t2 = time.time()
>   print "read file in %.2fs, parsed json in %.2fs, total of %.2fs" % \
>                                                   (t1-t0, t2-t1, t2-t0)

> read_json_blob()
read file in 10.57s, parsed json in 531.10s, total of 541.67s

> gc.disable()
> read_json_blob()
read file in 0.59s, parsed json in 15.13s, total of 15.72s

> gc.collect()
0

Ok, so that’s 15 seconds instead of about 9 minutes until I’m able to to start to analyze the data, and of course there was nothing for the garbage collector to collect afterwards. The file in question is a 1.2GB JSON text file, the disks perform at about 110MB/s sequential reads, and we have 8 cores of Intel Xeon E5520 2.27GHz to use (only one core used in this example).

I hope this saves someone elses time as it has saved mine.


by Daniel Svensson at July 22, 2010 10:34 PM

July 14, 2010

Sivert Berg (cippo)

Halfway There

Summer is at its peak and GSoCers all over the world are submitting mid-term evaluations. What better time to give a quick status update on S4 and Coll 2.0? Since the last post S4 has seen some big changes, most of them to make implementing Coll 2.0 possible/easier. It started with midb which I mentioned in my previous post. midb made indexes memory only, and only the data was saved to disk. This helps to keep the on-disk format simple. Together with a log this provides a pretty reliable database (something the old S4 was not). The other big change was adding source preferences. Source preferences gives sources priorities, and the property (or properties) with the highest priority source is chosen to be matched/fetched. On top of the new changes a new query system was fitted, removing confusing functions like s4_entry_contains, s4_entry_contained and similar, adding just s4_query. All in all those changes morphed S4 from whatever it was and into a set of entries, where each entry can have a different number of properties. Matching is done on an entry-by-entry basis, and if an entry matches data is fetched from it. Here’s an example:

Key Value Source
song_id 1
artist Foo plugin/id3v2
title Bar plugin/id3v2
rating 4 client/playa
Key Value Source
song_id 2
artist Crazy Jazz Band plugin/id3v2
title 2 hour jam session plugin/id3v2
rating 5 client/playa
Key Value Source
song_id 3
artist Generic Artist plugin/id3v2
title Incorrect Title plugin/id3v2
title Correct Title client/playa
rating 3 client/playa

Above we see three entries with some properties set. Properties have key, value and source. We see that the first property, song_id, is special; it has no source. This is because song_id is the parent property of the entry.  It can be thought of as the key of the entry, there’s no two entries with the same parent property.  Now say that the user wants to find the artist of every song with rating >= 4. He would then do something like this (in pseudo-code).

s4_query (fetch = ‘artist’, condition = ‘rating >= 4′)

s4_query would then visit each entry, see if rating exists and is >= 4, and if it is return the artist. So the above query would result in the result set: {“Foo”, “Crazy Jazz Band”}.  Now say the user wanted to query the title of every song in his library. He would then do something like this:

s4_query (fetch = ‘title’, condition = ‘everything’, sourcepref = ‘client/*:plugin/*:*’)

We see that the user this time provided a source preference too. This sourcepref will be used when choosing what data to fetch. s4_query would again visit every entry, the condition would match all of them so it would fetch the title of all of them. For the first two it’s simple, but the last one has two properties with the key ‘title’. Which one to choose? If we look at the sourcepref we see that sources matching ‘client/*’ comes before ‘plugin/*’, so it would pick the one set by ‘client/playa’, and s4_query would return the result set {“Bar”, “2 hour jam session”, “Correct Title”}.

Matching by visiting every entry is of course slower than using an index, but it turns out in most cases it is Fast Enough (TM). There are however some cases where it is too slow, for example when searching for entries matching a property many times per second, and S4 therefore supports creating indexes on specific property-keys. By default it creates an index on parent properties, so in the example above searching on song_id would be fast, but the user can also specify other properties to make an index on. XMMS2 creates indexes on ‘url’ and ‘status’, because they are searched on a lot.

We can compare it to the benchmark we ran earlier to show how this new design affects performance:

Query S4 old S4 new
Avg (µs) S (µs) Avg (µs) S (µs) Result size
“one” 127.7 ~3.7 14812.3 ~369.5 5
“*” 148165.8 ~3209.5 50732.8 ~1476.6 9410
“artist:metallica” 3336.5 ~219.5 10192.7 ~272.7 192
“tracknr>20″ 1871.7 ~132.7 9448.8 ~464.1 107
“tracknr>30″ 236.1 ~7.5 8913.5 ~143.1 13
“+comment” 58894.9 ~2003.7 21995.1 ~589.6 3297
“tracknr:4″ OR “artist~foo” AND NOT “artist:weezer” 18785.8 ~638.8 20717.0 ~388.8 776

As we can see small queries (small result size) have a big slowdown, while large queries have a speedup. This is because fetching is faster with the new code, while the checking is slower. If the result size is about 1/10th of the total size the fetching starts outweighing the checking, and the new code starts getting faster.

With the new functionality in place S4 is ready to be used for Coll 2.0. Two weeks ago I started implementing the Coll2 operators, and I’m now just about done with the server code. The collection parser is also updated to produce the new operators and nycli has been hacked to compile. The different language bindings still needs to be updated to use the new operators. The next thing to do is fix the language bindings (this could possible break quite a lot of clients, not good) and start to look at the new Coll2 query concept. I had also planned to write a standalone S4 client, like the ‘sqlite3′ command-line application, but it looks like time might run out.


by Sivert Berg at July 14, 2010 05:58 PM

July 07, 2010

Cherif YAYA (allad)

Oritide : XMMS2 new mobile client

In a previous post, I presented some components that were built from scratch and which formed the foundation of a new client for XMMS2. This client is geared toward handheld devices and is being developed as part of Google Summer of Code 2010.
After a month of hacking I was able to make good progress on the code and we now have a first version of the app ready for testing.

I made a little demo video of the app.

Oritide : XMMS2 mobile client from allad on Vimeo.

Here is quick overview of the features supported at the moment:

  • Now Playing screen
    • play/pause, previous, next command
    • volume control
    • playback position control
    • cover art support
    • now playing songs list with tap support for playing any of them
    • playlist shuffling
  • Playlists screen
    • list all non-hidden playlists of the daemon
    • support for playing any song of any playlist at any time
  • Media library browsing
    • library browsing by artist > album > songs
    • quick filter for easily finding artist
    • artist’s albums playback support
  • Search screen
    • support for finding songs from artist, album or title queries
    • direct playback of any song

The new client is called Oritide and is being developed as web application. So if you have a modern browser (with good support for HTML5 specifications) you are good to go.  The client has been successfully tested on iOS devices as well as Android handsets.

You can download the beta application here : oritide-beta

I look forward to getting your feedback.

by admin at July 07, 2010 01:56 PM

June 10, 2010

Cherif YAYA (allad)

XMMS2 Mobile Client status

As part of GSoC 2010 I’ve been working on a new mobile client for XMMS2. It is a web app that can be used to remotely control XMMS2 playback.

This web app consists of two parts. First, a python script which exposes an HTTP server and acts as a bridge to the XMMS2 daemon. Second, the actual web app which is gonna use the Sproutcore framework.

We’ve decided to use the Sproutcore framework to build the web UI because it gives us great flexibility. Sproutcore has a very good rendering layer which can be used to build web equivalent of virtually any widget. Plus Sproutcore, in its latest devolpment version has very good support for touch enabled devices.

Here is a mockup of what we want the interface to look like .

The goal is to use the latest web technologies to design an app with a native look-and-feel. In order to achieve that,  I’ve identified 3 core components that are needed and will be reused throughout the app:

  • an iPhone-like tab control
  • a iPhone-like list view
  • a navigation component that offers push/pop like views management

For the past month I’ve been working on them  and we now have working and functional implementations. There’s a live demo of the tab control and navigation system at the following address : http://cherif.ycsoft.org/static/xmms/en/1b1/

Below are two captures of these components :

Tab Control and navigation bar

List view component

Please note that the list view is not present on the previous demo link. This is due to some development limitations. However you can check out the source for the components using git : git://git.xmms.se/xmms2/x2web-allad.git/ or view it online at x2web-allad.git

These components have been packaged under in a framework called Iweb. (framework is Sproutcore lingo for libraries) and will be later contributed back to the open source Sproutcore project.

Now that we have these, work has started on the actual client web application. Stay tuned for some more updates soon :)

by admin at June 10, 2010 08:00 PM

May 31, 2010

Sivert Berg (cippo)

Benchmark update

It turns out Erik Massop (nesciens) had some code to speedup SQL queries in his repository. Here it is compared to the old SQL code and S4 midb:
UPDATE: Erik pushed some new code, making some queries faster. The queries that saw improvement are marked in red. The rest of the queries performed the same as the old code. One change in the new code is that it keeps the SQLite connection alive instead of creating a new one for every query. The difference can best be seen on a short query like “one”:

The old code:

query_infos took: 878
session took:     827
select took:      386

Compared to the new code:

query_infos took: 432
session took:     370
select took:      365

We see that the select takes about the same time, but the whole session takes about twice as long with the old code. For large queries like “*” the difference is less visible:

The old code:

query_infos took: 228048
session took:     228024
select took:      227569

Compared to the new code:

query_infos took: 224097
session took:     224062
select took:      224052
Query SQL Old SQL Experiment S4 midb
Avg (µs) S (µs) Avg (µs) S (µs) Avg (µs) S (µs)
“one” 180115.3 ~5521.6 326.0 ~8.9 127.7 ~3.7
“*” 365540.5 ~7049.7 225482.8 ~1011.7 148165.8 ~3209.5
“artist:metallica” 6864.2 ~214.3 3755.7 ~16.7 3336.5 ~219.5
“tracknr>20″ 30378.6 ~789.9 14682.2 ~214.8 1871.7 ~132.7
“tracknr>30″ 27624.5 ~1372.5 10996.5 ~23.3 236.1 ~7.5
“+comment” 238729.9 ~7028.3 73566.2 ~1553.5 58894.9 ~2003.7
“tracknr:4″ OR “artist~foo” AND NOT “artist:weezer” 188794.7 ~4773.8 49245.6 ~1210.9 18785.8 ~638.8

As we can see most queries are getting a nice speedup. Most notably “one” which is about 500 (!) times faster. But also “+comment” (3.2 times faster) and that long last query (3.8 times faster) gets a nice boost. The only one getting slower is “*” (taking over 2 seconds). S4 is still faster than SQL, but all the SQL queries (with the exception of “*”) are under 100 milliseconds on a moderately sized media library (~10,000 songs).


by Sivert Berg at May 31, 2010 12:35 PM

May 29, 2010

Sivert Berg (cippo)

Benchmarks

I finally had time to run a few benchmarks. I wanted to measure how the different back-ends compared to each other in query performance, memory consumption and disk usage. The back-ends being compared are SQLite (the current back-end used in xmms2-devel), S4 mmap (the “old” S4 back-end) and S4 midb (a new experimental S4 back-end).

Just to cover my back: I do not have much experience with benchmarks, and I am in no way an objective observer (slight bias towards S4, me?). If you see something that seems wrong, let me know; I probably made a mistake.

Query performance

First we will look at query performance. This is perhaps the factor that is most visible to the end user. The time measured is the time spent inside the xmms_collection_client_query_infos. It was measured by running gettimeofday at the beginning and end of the function and printing the difference in microseconds. I also used a slightly modified nyxmms2 that uses xmms_coll_query_infos instead of xmms_coll_query_ids.

So, to the results. The table shows the average time used in the query (calculated by \overline{X}=\frac{1}{n}\sum_{i=1}^n X_i where X_i is the time used on the i’th run) and the sample standard deviation (calculated by S^2=\frac{1}{n-1}\sum_{i=1}^n (X_i - \overline{X})^2 and then taking the square-root to get S). n was 10 for all benchmarks. The last column is the average time that SQLite used divided by the average time S4 midb used.

Query SQLite S4 mmap S4 midb SQLite / midb
Avg (µs) S (µs) Avg (µs) S (µs) Avg (µs) S (µs)
“one” 180115.3 ~5521.6 203.2 ~5.2 127.7 ~3.7 ~1410
“*” 365540.5 ~7049.7 286972.0 ~5489.7 148165.8 ~3209.5 ~2.47
“artist:metallica” 6864.2 ~214.3 5377.6 ~175.7 3336.5 ~219.5 ~2.06
“tracknr>20″ 30378.6 ~789.9 2885.1 ~89.4 1871.7 ~132.7 ~16.23
“tracknr>30″ 27624.5 ~1372.5 454.7 ~77.0 236.1 ~7.5 ~117.0
“+comment” 238729.9 ~7028.3 106268.0 ~3277.4 58894.9 ~2003.7 ~4.05
“tracknr:4″ OR “artist~foo” AND NOT “artist:weezer” 188794.7 ~4773.8 26407.7 ~793.9 18785.8 ~638.8 ~10.05

As we can see S4 is faster in all cases, ranging from about 2 to over a 1000 times faster. Why “one” is so much slower on SQLite I don’t know, could be inefficient SQL query, could be something else. Also worth noting is that S4 is mostly bound by the size of the result set. Queries resulting in small result sets (“one” for example) gives short query times. I’ll get back to why later.

Memory consumption

To get good performance S4 trades memory for speed. The big question is if the trade-off is worth it. For now we will settle for finding out exactly how much memory the different back-ends use. Memory consumption was measured by using massif, a valgrind tool. The back-ends were run two times, once by just starting up and shutting down and another time with a query for “*” before shutting down. That way I hope to visualize idle memory usage versus usage when searching. All numbers are in MiB.

SQLite S4 mmap S4 midb
Idle Search Idle Search Idle Search
10.43 17.77 1.13 10.59 23.79 32.56

As we can see both S4 implementation adds about 9 MiB when searching compared to the 7 MiB SQLite add. Also it may seem like S4 with mmap is the big winner here, but what massif does not show is shared memory, the kind mmap uses. If that had been counted in we would have added about 22 MiB to S4 mmap, bringing it up to about the same memory usage as S4 midb. So with a media library with 9,361 entries S4 uses a little over twice the memory SQLite uses at idle.

Disk usage

Finally, the one most people probably will not care about with today’s abundance of disk space: disk usage. It’s simply the size of the datafile.

SQLite S4 mmap S4 midb
41.5 MiB 21.7 MiB 5.4 MiB

Summary

In terms of performance and disk space S4 (especially the midb version) is the clear winner, but it eats up about twice as much memory compared to SQLite. Fair tradeoff? Maybe for a 10,000 entry media library, but what about one with 100,000 entries? We would probably see memory usage around 200 MiB.

A note on S4 query performance

As I said earlier S4′s query speed is mostly bound by the size of the result set. To see why we have to dig a little. Running XMMS2 in Callgrind (another Valgrind tool) is a nice way to find bottlenecks and hotspots. Opening the generated callgrind.out file in KCachegrind reveals a few interesting things:

As we can see xmms_medialib_query_ids (the function calling s4_query) only contribute 3.64% of the running time of the query. The rest of the time is spent fetching the properties (artist, album, …) of the entries we found in the query and inserting them into the dictionary we return. We see that _entry_propery_get_ is called 28,000 times. The media library this was run on has about 500,000 relationships (a relationship is an entry-to-entry mapping, for example (“songid”, 1) -> (“title”, “One”)). Using B+ leaves with room for 101 entries and a fill rate of 50% (it was measured to be around 53%, a bit away from the normally assumed 67% for B+ trees) this gives about 10,000 B+ leaves. A simple traversal of the 10,000 leaves would probably be faster than calling _entry_property_get_ 28,000 times. An observation well worth taking into account when we design the S4 query layer.


by Sivert Berg at May 29, 2010 06:44 PM

May 24, 2010

Sivert Berg (cippo)

Hey!

Summer is here, and we all know what that means: GSoC and hack time! This year I will try to document the progress here. Who am I? I am a 22 year old computer science student from Norway attending GSoC for the second time. Once again I was given a chance to work on XMMS2 and S4. It is off to a slow start at first because of some exams, but after June 4th it is full speed ahead. As you may know my project this year involves developing a new database backend called S4 for XMMS2. The project will be mentored by Sébastien Cevey. Some of goals of this year’s project is

  • Proper support for source preferences
  • A standalone S4 query layer
  • Coll 2.0 support

To keep track of time we have set up some milestones with associated deadlines. The first one coming up at June 6th is to have a benchmark set up so we can track performance against the old database, but also against itself as we do changes to see if they are worth it.

I cheated a little and started early. The last week I have been trying a new approach in S4. Instead of storing the index data structures on disk as before we build them on startup. The start up takes a little longer (about 0.5 seconds on a media library with 10,000 entries), but otherwise it seems to perform better or on par with the old code using mmap. With this new approach we will hopefully get a more reliable database, smaller on disk file and some performance improvements. A more thorough analysis will be provided when I have time to run some proper benchmarks.

Happy hacking everyone!


by Sivert Berg at May 24, 2010 06:33 PM

May 17, 2010

XMMS2 Offical News Channel

Don't trust XMMS.ORG for XMMS1 source code

Just a brief warning to anyone looking for the XMMS1 source code. Please don't use the code at http://xmms.org since the domain is no longer controlled by the people in the community. Please use http://legacy.xmms2.org instead. For background information you can see the following post by Tobias: http://thieta.wordpress.com/2010/04/28/what-ever-happened-to-xmms-org/

by Tobias Rundström (noreply@blogger.com) at May 17, 2010 04:27 AM

April 26, 2010

XMMS2 Offical News Channel

Four students accepted for Google's Summer of Code 2010

Today Google announced the students accepted for this year's Summer of Code. We received four slots this year, and selected some really great sounding projects this year.

  • Sivert Berg (cippo) - Mergeable S4 with Coll 2.0 mentored by Sebastien Cevey
  • Konrad Scorciapino (konr) - GIMME - GIMME Interesting Music, Mr. Emacs! mentored by Alexander Botero-Lowry
  • Bruno Ronzani (Bruno') - Crossfade plugin & co mentored by Anders Waldenborg
  • Cherif Yaya (allad) - XMMS2 mobile web client for iPhone and Android devices mentored by Daniel Svensson
In the past we have not had a heavy focus on client development during the Summer of Code, but this year we were happy to see a number of proposals that allowed us to split the selection fifty-fifty between client development and infrastructure work. We are also very happy to have Sivert Berg back to continue his work on s4. We've already seen excellent performance results from initial looks at integrating s4, so we expect with a bit of polish and close work with Sebastien and Erik to assure good integration with Collections 2.0, that XMMS2 will have a great new database backend ready to go for users!

by alexbl (noreply@blogger.com) at April 26, 2010 04:19 PM

April 13, 2010

Tobias Rundström (tru)

March 28, 2010

Igor Ribeiro de Assis (greafine)

GSoC 2010

Again, XMMS2 has been accepted as a mentoring organization \o/. As you probably already know, if you are reading this blog, last year I participated as a student for XMMS2 in the awesome GUI client project, I can’t say it was very successful and that I have fulfilled my expectations,  I won’t discuss the reasons here, but I can say that the fact that it is a very big contributed.

My work was basically related to prototyping and experiment with different ideas trying to find the best ones.

This year there are two independent sub-projects:

Collections browser, try new ways browse your media library, find what to play, build collections and more. If you have some crazy, creative ideas on how to do that this is the project to apply. Take a look at last year mockups to get the feel of it, as you will probably have to do some too.

Collection column browser

Column browser mockup

Infrastructure, in this project you will be doing the base code for the client. Will it be based in plugins? How new elements can be added to it? Communication between GUI elements? Use QML, QtScript? Lots of questions and coding to do.

In my opinion both are interesting with lots of coding, thinking and ideas. The collections browser probably being the most creative one and the infrastructure project for the ones that want to build the awesome base for the awesome client.

I recommend everyone to read theefer’s Star Wars series of posts about the awesome GUI client and if you are thinking of applying for one of the related GSoC projects  they are a must read.

Ep. IV: A New Hope

Ep. V: The Flamewar Strikes Back

Ep. VII: Return of the GUI

Ep. I: The Fandom Menace

If your not much into GUI, there are a lot of other interesting ideas for GSoC projects at the xmms2 wiki, take a look, go to IRC, discuss and apply.

Now, if you are already reading this post, you are probably interested, so, follow the steps (if you haven’t already):

  1. install xmms2
  2. git clone git://git.xmms.se/xmms2/xmms2-devel.git
  3. git clone git://git.xmms.se/xmms2/calypso.git
  4. go to #xmms2 @ freenode and ask about GSoC

Some great ideas were discussed and proposed during last year GSoC, unfortunately, not many implemented. I will be doing another post summarizing last year’s GSoC, hoping it will help this year students.

Happy (summer) coding!


by greafine at March 28, 2010 06:15 PM

March 25, 2010

Daniel Svensson (nano)

Setting up Redmine

About one and a half years ago I got tired of using Trac and started looking for alternatives. There were (are?) a lot of issues with Trac, but one of the more visible usability problems is that you write filters in SQL. As I’m accustomed to filters in a fire-and-forget fashion, from my years with the Mantis BTS, this doesn’t really work for me. The Almighty Google Machine led me to a heap of people recommending Redmine as a drop-in replacement, with nice import scripts. A couple of days later I’d created my first Redmine instance and have not since looked back.

We’ve also started using Redmine in my project at work, and now the other projects are getting jealous on our fancy setup, hence this post.

Pre-reqs: One piece of hardware with Debian Lenny installed.

First start with adding the Debian Backports Apt repository to your sources.list:

# echo "deb http://www.backports.org/debian lenny-backports \
            main contrib non-free" >> /etc/apt/sources.list
# aptitude update
# aptitude install debian-backports-keyring
# aptitude update

Next up you’ll need an Apache module with a very fancy web page, Passenger:

# aptitude -t lenny-backports install \
                    libapache2-mod-passenger

You’re also going to need some database to store your crap in. I’m just going to base this on MySQL as that’s the DB that was already running on those machines I run Redmine on, and there’s no specific reason why I select version 5.1 here either:

# aptitude -t lenny-backports install mysql-server-5.1

During the installation you’ll be asked to enter a password for the root account on the MySQL database server. If you’re out of ideas I can really recommend installing the pwgen package which will happily generate a secure password for you:

# pwgen -sy | cat

Armed with a MySQL database and a secure password it’s now time to create the Redmine database:

# mysql -u root -p
mysql> create database redmine character set utf8;
Query OK, 1 row affected (0.00 sec)
mysql> create user 'redmine'@'localhost' identified by 'my_password';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on redmine.* to 'redmine'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye

…where you’d obviously use that fancy pwgen tool to generate yet another super secure password that you’ll forget before reading the rest of this text.

Armed with a database and a Ruby on Rails hungry Apache module you’re now ready to grab Redmine:

# cd /var/www
# wget http://rubyforge.org/frs/download.php/69449/redmine-0.9.3.tar.gz
# tar xvfz redmine-0.9.3.tar.gz

Now it’s time to remember that fancy password of yours:

# cd redmine-0.9.3
# cat <<EOF > config/database.yml
production:
  adapter: mysql
  database: redmine
  host: localhost
  username: redmine
  password: my-sikritt-passw0rd
EOF

Ok, so now Redmine is configured to access the database, but Rails is missing, lets grab it:

# gem install rails -v=2.3.5
# aptitude install libopenssl-ruby libmysql-ruby

Got Rails! Next up, prepare Redmine, and then populate the database:

# RAILS_ENV=production rake config/initializers/session_store.rb
# RAILS_ENV=production rake db:migrate
# RAILS_ENV=production rake redmine:load_default_data

The last step here will ask for the default language, select something you can understand.

Ok, we’re getting closer to actually run Redmine for the first time. The following steps will hook up Redmine to be run by Apache:

# chown -R www-data:www-data files log tmp public/plugin_assets
# mv public/.htaccess public/.disabled_htaccess
# cat <<EOF > /etc/apache2/sites-available/redmine
<VirtualHost _default_:80>
 ServerName your.domain.name
 DocumentRoot /var/www/redmine-0.9.3/public
 RailsEnv production
</VirtualHost>
EOF
# a2ensite redmine
# /etc/init.d/apache2 restart

When directing your browser to http://your.domain.name Redmine will present itself. You should of course make sure that the rest of your Apache installation works properly now and no strange directories are exposed to evil visitors, but otherwise you should be good to go.. enjoy!


by Daniel Svensson at March 25, 2010 11:27 PM

March 15, 2010

Daniel Svensson (nano)

Androidified

The non-smart-phone world seems so distant now after being connected to The Hive<tm> around the clock for a little more than a year with the HTC Dream/Android G1. It’s not the best of phones, but it was the first and I can’t really say any other Android-based phone has impressed me much. There is some hope for the rumored Motorola Shadow but nevermind, this post is about the applications I’ve grown to love.

There are a couple of applications in my daily life, but some applications stand out more than others.

  1. ConnectBot
    This is hands down the best SSH-client on-the-go that I’ve ever used. It supports keys, multiple concurrent sessions, it hooks up one of the hardware buttons to switch between the windows in GNU Screen. Gesture support involves scrolling Up/Down in the buffer or sending Page Up/Down depending on if you touch the left or right part of the screen. The trackball is Ctrl which makes using a shell with high latency a breeze. There are bookmarks, and you can even tunnel ports to the phone which is really nice if you have some web-page hidden inside some network or something. Simply put, pure awesomeness. It’s not uncommon I start my work day on the bus with this application.
  2. Google Listen
    I never really cared about podcasts before, but this completly changed when I found this wonderful application. With flat rate data subscription, and the podcasts being downloaded to the phone, or streamed as you listen, this sweet application makes podcasts really accessible. The only annoying thing is that it continues to play new podcasts in queue with no way of stopping after only one, which causes me to wake up with strange voices in my head in the middle of the night. Another feature some iPhone fanboy friends of mine have in their podcast clients is the ability to increase speed, which would be very nice when listening to The Economist podcast. My current list of poison can be found here.
  3. Twidroid
    I wasn’t really into twitter until I found this application. Haven’t tried many other as I don’t feel limited with this one. It’s not mega awesome, but it’s well written and does its job well. It supports all the features you’d expect, it updates tweets in the background, it supports URL shortening services, photo sharing services, it hooks into the Share-feature in Android etc.
  4. Google Sky Map
    Using the accelerometer to navigate, GPS to fetch your position, it presents to you with a 3D map of the universe around you. As a typical Swede I could only spot the Big Dipper and perhaps Orion’s Belt so for me this app is a big +1. A dark night last summer I found myself amazed by having augmented my reality with the ability to see the stars that were right under me, only visible from other parts of earth. A must see at least.
  5. FxCamera
    A pretty simple but neat camera application that applies some fancy filters to your otherwise crappy photos. It’s a nice addition when you snap a photo and upload it to Facebook or Twitter directly from your phone. Features Toy Camera, Polaroid etc.
  6. Google Reader
    Ok, not really an Android application, but it is a custom version for mobile use, and I use it a lot while I travel by bus, or just being too lazy to grab my laptop. Very effective way of getting your daily dose of from The Hive<tm>.

So with the mentioned applications I’m pretty satisfied with the whole Android experience. The only area that’s currently lacking is in Tower Defense games, but that’s probably just a matter of time, and it’s probably good that there aren’t any worth playing yet ;) .

As for firmware customizations I’ve done some experimentation. At first I used the JesusFreke firmware, which got discontinued, next up was CyanogenMod which was all the rage the whole autumn, and I recently switched to OpenEclair which is a rock solid Android 2.1 version for the G1 that I’m really satisfied with.

It’s nice to see that such a large community of hackers have spawned around the Android project and I hope it grows even more. I haven’t had the time to get involved myself yet, except for some half-assed attempt to play with Scala, and a small XMMS2 client just to get the feel for the API. Hopefully time permits future adventures into Android-hacking, I still have hopes, and it looks like Android is here to stay.

So to sum it up, I’m really satisfied with Android, although I find it a bit sad that no manufacturer have yet to come even close to the iPhone touchscreen performance  (although S-E X10 Mini is pretty close, unfortunatly with a molested UI).


by Daniel Svensson at March 15, 2010 10:55 PM

March 08, 2010

XMMS2 Offical News Channel

Gearing up for Summer of Code 2010

We want to participate in the Summer of Code program 2010! There is a lot of things to do, write the application, propose projects, become a mentor! Please join us at the XMMS2 Summer of Code 2010 portal and contribute!

by Tobias Rundström (noreply@blogger.com) at March 08, 2010 04:02 AM

February 21, 2010

Tobias Rundström (tru)

XMMS2Con

I am on my train back to Gothenburg from Malmö where I spent the weekend with the cool XMMS2 people. I think everything went very smooth and it was very very productive. We got a lot of things done and a lot of code merged. I will outline some of the highlights in this post, as I am certain that other participants also will do in their blogs.

First of all, 0.7 DrNo was released. This was the first thing we did, even before the Con started. It was way overdue, it actually was almost a year since we did the 0.6 DrMattDestruction release. There are a lot of reasons for this very delayed release. I think most of the people in the team are starting to feel the effects of their "real life". Some have become fathers, others has been busy with work, school and other activities that has to take precedence. But as always, when we get together and get to it, we get a lot of work done. I think I am not the only one to feel a bit energized and have a lot of ideas that would be cool to realize, let's see how long that lasts this time :-)

The most discussed topic on the Saturday was GenIPC. What is GenIPC you might ask yourself? Well if you have been around and tried to write any XMMS2 bindings at any point you know that it involves a lot of manual labour for wrapping all the functions the server implements. GenIPC is the answer to that. Our plan is to have the IPC definition in a XML file, which then can be used to generate the code for each binding. One of the benefits of this is that it will be easier to add new functions to all bindings, the other great benefit is that it will be easier to implement native bindings for all languages, since you only need to write the serialization and the code generator and the rest will be taken care of for you. Tilman have done some great work with GenIPC and the server side of it was merged directly after the DrNo request. On Saturday Tilman, Anders and Henrik discussed a lot of improvements for GenIPC in order to allow for function overloading and default arguments. This work is now well under way and I hope to see it in the master branch pretty soon, since I want to convert native Qt4 bindings to GenIPC and also finish my Objective-C bindings.

Next big project that Seb and Daniel looked at was S4. S4 is our homegrown database backend that is supposed to replace the SQLite backend we have now. The rational behind this is that we horribly misuse the SQL part of SQLite and forces our datamodel it. This leads to bad performance, lot of code overhead and so on. S4 solves this by introducing a datamodel that fits our use case a lot better. Preliminary tests shows that S4 is a lot faster when you have a lot of entries in the database, in fact the only time it's slower is when you do advanced queries that uses regex matching and that's slow almost everywhere :-) This will probably be reworked so that we don't use regex, but rather globbing as we had with SQLite. I hope to see S4 merged soon.

We did have some talk about workflow and how to improve the visibility of the topic branches and we have started to try out Gitorious, I hope that everyone will be satisfied with it. I think that workflow discussions warrants it's own blog posts so I will try to write it up later in the week. In the meantime you can checkout our Gitorious team page. And if you want to get in on the action, just tell me or Anders.

Next big step which also warrants it own blog post will be about our information reorganization, redesign of wiki and move to xmms2.org instead of xmms2.xmms.se. Stay tuned.

Oh, and thanks to everyone that came out, I had a great time organizing it and I am more than willing to do it again. I also want to make sure to thank Purple Scout AB for hosting us, if you attended and liked it, drop a line to twitter or on your blog to thank Purple Scout as well.


by Tobias Rundström (noreply@blogger.com) at February 21, 2010 12:30 PM

February 20, 2010

XMMS2 Offical News Channel

XMMS2 team is trying out Gitorious

During the XMMS2Con (which is awesome by the way) we discussed how to improve the workflow, one thing we talked about was to improve the merge tools we have. We ended up trying gitorious instead. You can check out the XMMS2 team page on gitorious here and if you are a developer, please register and notify Tobias or Anders and they can add you to the group. Also leave feedback on how gitorious is working out for you.

by Tobias Rundström (noreply@blogger.com) at February 20, 2010 02:39 PM

XMMS2 0.7 DrNo release and XMMS2Con

Yesterday we released DrNo, download at sourceforge. This is the first release in almost a year. We hope that we will get to it. Also today is the first day of XMMS2Con, it's hold at Purple Scout offices in Malmö, Sweden. About 10 of us will hopefully bring some new XMMS2 awesomeness during the weekend. If you are close to Malmö just pop by Purple Scout :)

by Tobias Rundström (noreply@blogger.com) at February 20, 2010 01:39 AM

December 30, 2009

Tilman Sauerbeck (tilman)

Multi-scrobbling at last!

New XMMS2-Scrobbler release. Better than ever: multi-scrobbling is supported now. libre.fm users rejoice! See README for the details.

by Tilman Sauerbeck (tilman@code-monkey.de) at December 30, 2009 05:15 PM

December 27, 2009

Tobias Rundström (tru)

Mobilblogg for the iPhone.

For a long time I haven't been able to develop anything constructive. It's been a severe code block that has been lasting for years. That's why it so fun to now announce some of my recent projects!

I decided to really learn Objective-C back in November. At work a customer requested a iPhone application and I was the only one that knew anything about Objective-C, so I was asked to join in a customer meeting telling them that I really knew Objective-C and iPhone development. So instead of lying my ass off I sat down and tried to get some coding done.

Eventually the customer didn't want to pay for the application so the project was never started, but I really learned Objective-C. And it resulted in my first iPhone application! It's a dedicated client to the MobilBlogg community. Together with Henrik Öhman of MobilBlogg (who did the API) an application to browse, upload and comment on photos was created. The application is submitted to Apple, who knows when it's going to be accepted :-)

The application is Open Sourced under the GPL license and you can check out the sources here.

The application could never had been made without other brilliant open source code: Three20 and JSon Framework. If you want example of using these frameworks, checkout my code.

To view screenshots and photos uploaded with the application head over to my mobilblogg!

by Tobias Rundström (noreply@blogger.com) at December 27, 2009 09:22 PM

November 07, 2009

Sébastien Cevey (theefer)

Internet Explorer strips leading whitespaces in text nodes

For some mysterious reason, Internet Explorer (tested in IE7 and IE8) strips leading spaces in text nodes preceded by an empty element, such as this:

[code lang="html"]

foo

[/code]

While innoccuous in static pages, it becomes problematic when DOM nodes get updated after a delay by some Javascript, as the separating whitespace has disappeared, hence ruining the layout of your text.

Surprisingly, I haven’t found any reference to this IE bug (not that there is a shortage of complaints about other IE idiosyncrasies), so I thought I’d share the problem and the solution I have found here. It’s all demonstrated in the following example:

[code lang="html"]
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">



world

  world



[/code]

In the first case, the whitespace gets stripped, thus resulting in “Helloworld”. In the second example, the non-breaking space prevents IE from stripping the whitespace, so that when the span is filled by Javascript, the text reads “Hello world” as expected.

If you know other solutions or whether it’s considered a bug that will be fixed, please post in the comments!

by theefer at November 07, 2009 05:13 PM

“XMMS2 Collections” presentation at Metaweb

On my way to the Google Summer of Code Mentor Summit 2009, I accepted DraX’s invitation to give a 1-hour talk about XMMS2 Collections at his work, i.e. Metaweb, in San Francisco.

The topic was somewhat relevant for them as it’s reminiscent of MQL, the query language they developed for Freebase. It’s worth noting that although both share a pool of buzzwords such as “graph”, “loosely-structured”, “querying”, etc, they are not quite the same:

  • Freebase is essentially a giant graph-database, which you query with MQL to retrieve graph fragments.
  • The XMMS2 database is a flat denormalized store, which you query with graph-structured Collections to retrieve a list of entries.

Note: Collections 2.0 should however allow fancier querying to retrieve tree-shaped structures.

About 10-20 people showed up and listened to me blurbing about the concept of Collections, the rationale behind them, the API, Collections 2.0, possible UI uses, what it represents for the user, pointers to S4, etc.

It’s all in those over-engineered slides that I have no choice but to put online, under Creative Commons Attribution-Share Alike 2.5 License, for them to live on forever on the internets. And yes, it’s still either in evil Keynote format (source), or in PDF.

Oh and Metaweb, thanks for the food!

by theefer at November 07, 2009 04:46 PM

September 23, 2009

XMMS2 Offical News Channel

XMMS2 Conference 2010 announced

We are planning to do a XMMS2 Con next year. Please visit this page to announce your interest: http://wiki.xmms2.xmms.se/wiki/XMMS2Con2010

by Tobias Rundström (noreply@blogger.com) at September 23, 2009 05:27 AM

August 19, 2009

Florian Ragwitz (rafl)

Parameterized Roles with MooseX::Declare

You've probably already heard of Sartak's awesome MooseX::Role::Parameterized.

As of version 0.25, MooseX::Declare provides some nice sugar for that. This is what it looks like:

use MooseX::Declare;

role Counter (Str :$name) {
  has $name => (is => 'rw', isa => 'Int', default => 0);

  method "increment_${name}" {
    $self->$name( $self->$name + 1 );
  }

  method "reset_${name}" {
    $self->$name(0);
  }
}

class MyGame::Weapon {
  with Counter => { name => 'enchantment' };
}

class MyGame::Wand {
  with Counter => { name => 'zapped' };
}

Just thought I'd let you know, since i haven't gotten around to actually document this. In case you like it, have some spare tuits, and want to help out, the repository is right here :-)

by Florian Ragwitz (rafl@fsfe.org) at August 19, 2009 08:27 AM

July 20, 2009

Sham Chukoury (eleusis)

Software engineering is.. dead?

IEEE Software recently published an opinion piece from Tom DeMarco titled ‘Software Engineering: An Idea Whose Time Has Come and Gone?’ in which DeMarco appears to declare the death of ‘Software Engineering’ as a discipline. Unsurprisingly, this is generating some waves in the tech blogging community, with pieces such as ‘Software Engineering: Dead?’ from Jeff Atwood’s Coding Horror, and Myles Eftos’s ‘Yep, Software Engineering is dead’.

From reading DeMarco’s article, it is apparent that what he is addressing is the emphasis placed on ‘control’ on software projects - that ‘software engineering’ is often taken to mean that it’s a means of controlling the outcomes of developing a software project. It should be obvious that DeMarco’s stance is one of reflecting upon his previous work and making some comments about how his work has been perceived in the software industry over the years. Aside from some “Aw shucks, I wish my younger self had been wiser” style reflection, DeMarco laments the fact that his work has been used over the years to justify the creeping bureaucratisation of the software development process. From that point, DeMarco goes on to prescribe that, rather than controlling minutiae, those in charge of software development should be treating their projects (by way of analogy) as unruly teenagers - by attempting to instil a sense of moral values and principles, rather than by being overbearing and all-controlling.

Unfortunately, Jeff & Myles appear to either be sensationalising, or reacting to a rather superficial reading of DeMarco’s opinion. Straight off the bat, Jeff points out DeMarco’s gravitas in his field, to hammer home the point that ‘yes, this is a big deal’. From there, however, Jeff switches to his usual agenda of elevating the romantic notion of ‘software craftsmanship’. Not that I’m averse to this position - au contraire, I’m a big fan of Jeff’s frequent expounding on matters of software development principles. What I disagree with, however, is the utter sensationalism with which this is being made here. At least, I am heartened that Jeff appears to have grasped the main point of DeMarco’s analogy: “If you want to move your project forward, the only reliable way to do that is to cultivate a deep sense of software craftsmanship and professionalism around it.”

I have no idea what has been said about either DeMarco’s piece or Jeff’s blog post on the 220 mailing list, though reading through Myles’ blog post left me slightly incensed at certain points. The analogy between building a bridge and building software is somewhat tired. Compared to building bridges, building ‘software’ encompasses a vastly larger scope. That much we agree on. You might as well be comparing building software with building anything made of materials sourced from the ground. From here, however, it seems that Myles launches into a tirade about his least favourite academic subjects, or at least the ones that he found ‘stupid’. What I fail to grasp at this point is the relevance to DeMarco’s piece… But I’ll play along anyway.

Yes, formal proofs are arduous, and can be rather silly for trivial programming tasks, but it should be obvious that such techniques aren’t applicable to all software development contexts. Would you apply formal proof methods to a small dynamic website you’ve just built? Hell no. Would you apply formal proof methods to mission-critical software that could potentially lead to injuries, fatalities or serious damage to the environment or property, if anything were to go wrong? Hell yes. (Well, some variant of a formal method, anyway) It’s a simple cost-benefit (or risk analysis) scenario: which costs less - the development process, or the consequences of something going seriously wrong? I’d further argue that formal proof exercises done in an undergraduate academic setting would be more geared towards teaching and learning the process of doing the proofs than anything else. This is undergrad CS that we’re talking about, with its endless assortment of silly assignments that require students to produce little of value beyond the end of their courses. I might also add that, even with a ‘simple’ program having 9 lines of code, this degree of simplicity may be afforded by a myriad of much more complex underlying supporting systems - the degree of simplicity of a program may simply be a matter of perspective, or from where you’re standing to look at the code.

What I find most troubling about Myles’ post, however, is the complete denigration of UML. Yes, I’ll admit that I’m a big proponent of UML. There may be a point about UML working really well with the waterfall model of software development, but to then imply that UML is almost completely useless - by association with the inadequacy of the waterfall model to address ‘real’ problems - seems a lot like missing the point of what UML is actually about. Yes, UML may superficially look like ‘architectural drawings or flow diagrams or something’. More importantly, UML is a standard notation to communicate about elements of software design. Beyond the ability of expensive software to create specky, neat and professional looking UML diagrams, UML itself is a tool for software developers to use when thinking about, crafting and communicating about the systems they’re building. By analogy, I would say that an ability to work with UML is like an ability to work with words and sentences and paragraphs. That is probably the reason why IT recruitment agents started using ‘Object Oriented Analysis & Design Skills’ and ‘Sound understanding of UML’ in their job ads - those *are* fundamentally useful skills to have.

As a programmer, I can have a conception of something that is a ‘class’ or an ‘object’ and be able to express the idea in a diagram, say on a whiteboard, while talking with fellow programmers, and still be able to more or less directly translate this concept into code using Java or Python. Using UML, I can model relationships between such classes and talk about such relationships - beyond mere representation, UML can be a valuable tool for solving software design problems, especially in team environments. [And the good news is that there are tools nowadays to automate parts of the translation between UML and code, so you don’t have to ‘go and update hundreds of UML documents every time a minor change was required’] None of this is really dependent upon the specific project management methodology being used. The real problem, as far as IT recruitment is concerned - at least in this region anyway - is that there is often a disconnect between what software development shops need and what their recruitment agents end up publishing. Given that IT recruitment agents are often more experienced in HR and marketing, they end up developing formulas for easily pushing job ads out there seemingly without much consideration for what is really required. That is how you end up with a litany of job ads that look like the same stuff rehashed over and over again. Thanks to all this, graduates who do have such skills end up in jobs which are advertised as requiring their skillset, yet never use them in any useful capacity.

Getting back to the main article, however - the point that DeMarco is trying to make here is rather subtle, one which can best be understood in the very context of his analogy. Developing software, in general, applies to a vast field of human knowledge and applications. As such, decisions about how software should be developed necessarily need to vary based upon the context and constraints within which such development is occurring. By way of analogy, humans, as they grow into adults, cannot be robotically programmed to gracefully handle every possible situation they might encounter. (Or, at least, one could imagine that this approach could fail rather disastrously if tried) Given these limitations, it is far better to learn about core principles and knowing how and when to apply them to produce generally favourable results. DeMarco’s point is that, as this applies to humans, that may be the real way forward for software development.

p.s. Some interesting and relevant articles relating to this topic:
- “Is Software Engineering Engineering?” - Peter J. Denning, Richard D. Riehle
- “Software Engineering ≠ Computer Science” - Chuck Connell

by eleusis at July 20, 2009 05:22 PM

July 16, 2009

Tobias Rundström (tru)

Good discussions about copyright control

Over at The Digitalist blog there is a very good discussion about eBook DRM. Cory is excellent as usual but the highlight must be Clay Shirky's quote:

You say “I’m a strong believer in the rights of creative artists to control the distribution of their copyrighted content.” Sure, why not? And while we’re at it, we can be strong believers in breathing under water, or living to 130. Those ideas are similar to the idea of controlling distribution, in that there are a whole bunch of people who think they would be really really great. They’re all similar in another way too. Can you guess what it is?

by Tobias Rundström (noreply@blogger.com) at July 16, 2009 04:56 PM

July 12, 2009

Igor Ribeiro de Assis (greafine)

Calypso

What’s calypso? The new official xmms2 gui client.

I could talk about why the name calypso is a good name, what it means, etc. But I won’t, I’ll write about technical and implementation details.

Based on theefer’s post about extensability and some talks we have, we get to the conclusion that the client should be extensible, based on this I implemented the prototype of a framework to be used during this GSoC and hope that it will be useful in the final client.

The framework is composed of modules, there are two types of modules, I will call them the core and the extension modules. As you have thought the core modules contain core features and serve as the base for the construction of other modules. The core modules are responsible of communication with xmms2 daemon: to control playback, retrieve information, change configuration values, etc. They’re responsible for maintain caches of retrieved data and provide interface to this functionality to other modules. Actually if you look in the code tree you will see three (partially implemented) core modules: playlist, playback and collection.

Let’s talk about the more interesting, extension modules. In this category falls all modules that does not interact directly with the xmms2d daemon or provide basic functionality to the other modules, normally modules in this category have some related UI, for instance, a playlist viewer, collection browser, playback controller, and what else you can think. I’ll post about the ones I implement.

Another difference is related to implementation, core modules are supposed to be implement in some predefined default client language (C++), while extension modules could be implemented not only in the default language but also in some high level extension language (we’ve been trying QtScript).

The current state is the following: there are core modules for controlling playback, playlist and colllection management. In the extension modules field there are a simple playback controller, a playlist viewer, collection browser and the calypso-bar (this one deserves a specific post, but basically, it’s a cli-like controller for all modules).

In terms of Qt naming (I haven’t mentioned but the current prototypes are being developed int python+qt) models classes are normally provided by core modules while the extension modules are viewers and controllers (obviously it’s not a rule, for instance, there can be a lyrics fetcher extension module that’s a model). Related to the UI a module is responsible for providing his own interface (if have one) and there are no restrictions in how it’s created (manually in code, loading an .ui file) it just have to follow some naming rules so it can be used in the main interface.

I think that is it what I wanted to talk in this post, the next ones will be about some specific modules, in the queue there are already the calypso-bar and collection bins.

The tree is in git://git.xmms.se/xmms2/calypso.git you can try it, but be warned for now it’s just prototyping, have lots of bugs and partially implemented things. If you try anyway, please comment.


by greafine at July 12, 2009 04:44 PM

July 08, 2009

Tobias Rundström (tru)

EuroPython 2009 - What happened?

Last week I attended EuroPython 2009 in Birmingham, both as a speaker and as an attendee. This post won't reflect on my talks (one was not good, one was actually very good, I might do more posting about that later) but rather something interesting that I observed during the conference this year.

EuroPython have always been a very nerdy conference, no surprise there, so it struck me as very odd that several talks and seminars this year didn't include that much technology at all! They talked about politics and freedom.

First out was Cory Doctorows keynote "The Copyright Wars" which I unfortunately missed, but Reinout van Rees have a excellent summary here. Hopefully the audio recording of that keynote will posted soon. It does bring up a very important point about the future of open source software in a world controlled by paranoid content makers.

During the lightning talks (which was hugely entertaining at whole) two talks had the topic of politics.

First out was Holger Krekel who talked about the internet and how the information about us could be used for mass surveillance and the need to do something about it. He touched on the very recent problems we have seen in Iran, how the state has been filtering the access to the internet. Holger went on and suggested that there are two ways to attack the problem.

The first involves political activism ("We know it works, because we stopped the software patents"), he mentioned the Pirate Party (which makes me very happy) and that he considered joining it (Holger: You are very very welcome!). We need to start talking to the politicians and convince them that internet needs to be free!

The second option for people that have a more technical approach to things (almost everyone at the conference!) is the need for new technologies that can't be filtered as easy as a centralized system for passing messages. Holger encouraged people to develop other ways to distribute information and getting around filtering equipment. My colleague and me was very inspired by this and started to scribble some notes on how a system like that would look like. I might blog about this later.

All in all I really liked Holgers lightning talk, it was very inspirational and well delivered, thank you.

The second lightning speaker that had politics as a topic was Jacob Hallen. Jacob strikes me as a very soft spoken and timid man (I actually talked to him right before his speech), which is why his talk really surprised me. He delivered a very passionate (improvised?) speech about how big content are using methods that are really scary and he drew a direct parallel to "men in high boots, abducting people in the middle of the night". Thanks Jacob, it was inspiring!

For me it was very inspiring to hear this types of talks and speeches in a area so technology heavy (nerdy?), because this means that we are many that cares. Now we need to transform that care into action!

by Tobias Rundström (noreply@blogger.com) at July 08, 2009 06:39 PM

June 27, 2009

Igor Ribeiro de Assis (greafine)

First post

Hey, this is the first post in this blog, so I’ll describe what’s the blog intentions:

  1. keep track of my Google Summer of Code 2009 (GSoC) work.
  2. post ideas of features to be implemented in the client.
  3. receive feedback form what have been done.

I am working in the XMMS2 official gui client mentored by Sébastien Cevey (theefer). If you don’t know XMMS2 click here, and for  cool posts of what an awesome client should be look at theefer’s Star Wars posts.


by greafine at June 27, 2009 02:40 PM

June 24, 2009

Daniel Svensson (nano)

Batteries and Apple

In 2006 my girlfriend bought herself a MacBook, one of those white ones, pretty, easy to use, and all was well. About two years later the laptop started acting weird. I shut down even though there was still a lot of charge left in the battery and other strange symptoms. A call to Apple and a quick battery check in the store and she got a new battery thanks to the battery exchange program they had running back then, almost no questions asked, and all was well again.

A while ago the battery started acting up again. We came home from a short vacation and the battery icon had a cross over it and the battery didn’t charge. I got on the phone with Apple and they of course answered that I was SOL, but after refusing to accept that they told me to go to an Apple Support store to test if the battery was depleted, or defect. Needless to say it was defect, it had gone from acceptable performance to no performance in the blink of an eye.

Ok, so with the blessing of an Apple technician I called Apple again and now things started to get strange. The support now told me batteries were something you used up and that this battery too was used up even though the technician said otherwise. After a while I had the support guy accept that Apple didn’t manufacture their batteries to suddenly die after a years usage, but rather become less and less able to hold the charge. Based on this acceptance I tried pointing out that Konsumentköplagen (law to protect consumers here in Sweden) protected me from manufactoring errors, and as we both agreed that the battery was incorrectly manufactured, as determined by their party, this would give me the right, and according to me, right to a new battery.

This convincing had taken a while and the support guy was definatly not interested in Konsumentköplagen nor talking with me, so he redirected me up one level after he had explained the case to the next guy.

The next guy had been told by his managers that batteries were something you used up, and thus the Konsumentköplagen didn’t apply, but when asking for a legal reference to his statement that batteries was specifically not covered by the Konsumentköplagen he got a bit defensive, specially after me pointing out that the first hit on Google has the title ”Apple doesn’t care about Konsumentköpslagen”. After a short battle he sent me one step up to something he explained to be their office for more law-related questions.

This time a Danish girl answered and the conversation continued in english and she didn’t seem to have ever heared of the Konsumentköplagen, but was kind enough to give me a 30% discount code on a new battery from Apple Store. I accepted this as the alternative according to her was to talk to their lawyers, and that seemed like a too big effort considering the price of a new battery.

I’m still not completly sure who was right in this case, they never explicitly said that I was wrong. The Konsumentköplagen says that’s it up to the consumer to prove the manufactoring error, but as their technician had determined this already I belive that I was right, and I have still not found any explaination to the relation between Konsumentköplagen and batteries.


by Daniel Svensson at June 24, 2009 07:08 AM

May 27, 2009

Tobias Rundström (tru)

Not really a secret

I have already voted for Piratpartiet in the Swedish EU elections. For people who know me that can hardly come as a surprise. I just wanted to briefly talk about why I went with PP instead of MP (that I usually vote for), when they actually have the same opinions about integrity and the future of Internet. I think it can be summed up in: I wanted to make a statement. There you have it. I want people in "power" to understand that it's not OK to ignore these questions (internet, freedom, integrity), it's not OK to push through new laws (FRA, IPRED) without consequences.

I might be naive, thinking that voting for PP is a "consequence" for the sitting parties. At least it seems like most politicians seems to understand that they have to tackle this question these days, that's a start.

Let's keep internet FREE, as in speech.

by Tobias Rundström (noreply@blogger.com) at May 27, 2009 04:42 PM

May 10, 2009

Tilman Sauerbeck (tilman)

XMMS2-Scrobbler 0.3.0 released

So here’s an XMMS2-Scrobbler release that will work with the recently released DrMattDestruction. This new version is witten in C instead of Ruby (so it’s much less memory hungry) and includes support for last.fm’s now-playing notifications.

by Tilman Sauerbeck (tilman@code-monkey.de) at May 10, 2009 12:15 PM

May 09, 2009

XMMS2 Offical News Channel

XMMS2's GSoC '09: 3 exciting projects!

Flowers blossom, birds sing and the sun is starting to shine higher and brighter and later every day. You know what it means: time to go out and find a nice spot in the shade, unfold your laptop and start hacking for it's summer — Summer of Code!

This year again, we were lucky to be accepted as an organization for the Google Summer of Code. Due to some logistic and organizational hazards, we're only running 3 slots this year, but it's more like a concentrate of amazing projects!

See for yourself:

cippo will tackle the almost mythical New Medialib Backend (AKA S4) project (GSoC entry), which aims at replacing our SQLite backend with a more suitable solution adapted to what we use it for, namely a key-value store for media (see the wikipage). Our very own and very bearded anders will be his mentor to make sure it all turns out even smarter than we expected.

Although the latest iteration of collections has seen a lot of performance optimizations, we still hope that this could bring even better performance. However, we're also interested in improving the memory footprint (incl. reducing duplicate data), alleviate locking problems (BUSY EVENT!), allow smart/dynamic hierarchy of metadata (e.g. attach a cover image to the album entity rather than each individual media) and wrap it all together using collections as a query mechanism. It's all very new and experimental, and that's why it's so cool!

Our second student, CaffineeHacker, will work on Cross Fade (GSoC entry), by making the xform chain persistent. A refactoring of the xform infrastructure is indeed needed to carry effects across song changes; optionally, the rework might allow "xforms to transmit data in the frequency domain instead of having each xform that uses frequency domain do an FFT". The project has been around for a while and we're happy to run it this year, mentored by rafl!

Finally, we're happy to get greafine back for another round of GSoC this year. He'd done a great job on nycli last year (freshly released in DrMattDestruction!), and his application left no doubt that he was The Man to work on a very exciting, long-awaited project: a grand new GUI client for XMMS2 (GSoC entry)!

The basic idea is, quite simply, to build the most awesome music player known to mankind, and while it might not be suitable for everyone, we're committed to make it follow a strong and original vision aligned with that of XMMS2. You can read more about that on the Planet, and more specifically on tru's and theefer's blogs. Incidentally, theefer will be mentoring this project.

We look forward to working with the students on all those great projects!

And meanwhile, works continue to merge nesciens' Collections 2.0 for the next release, and get GenIPC and Service Clients in as well!

by theefer (noreply@blogger.com) at May 09, 2009 10:56 AM

May 08, 2009

Florian Ragwitz (rafl)

MongoDB on CPAN

I've been doing some contracting work for 10gen recently. They have that rather cool open source document database called MongoDB and they wanted me to write a module to use that from Perl. I did that and the code is now available on CPAN and github.

Writing that was fun, and I'm already looking forward to be able to use MongoDB as a backend for KiokuDB. I started writing code for that and put it on github, but isn't passing all the tests just yet.

In related news, after finishing the MongoDB module, I'm available for other things again. So if you're looking for a Perl telecommuter, let me know.

by Florian Ragwitz (rafl@fsfe.org) at May 08, 2009 10:53 PM

May 04, 2009

Tobias Rundström (tru)

Apple: Be more transparent!

Apple is a very secrative organization, they value their secrecy because it builds up a hype around the products. I love Apple products, I am what most people call a Apple fan-boy. But I think recent events regarding the App Store aproval process must be addressed in a negative fashion.

I love the fact that Apple have created great development tools for the iPhone and they have done so for free. This have given the iPhone eco-system a great boost and in less than a year they have succeeded in creating a development community that it’s competitors haven’t succeeded with yet.

I really believe that the App Store is a big reason for the success, all applications gathered and easy to browse / search. But the App Store is also the big sign of weakness in the iPhone eco-system. As you might already know, Apple is the gatekeeper for everything going into the App Store to make sure that “malicious” and “offensive” applications stay far away from the iPhone. While this makes sense (you don’t want viruses spreading via the App Store) in some ways the big problem is actually that Apple have so far refused to share any details on the approval process.

This creates big problems, not only because it’s hard for developers to know if their application will ultimately be accepted or not, but also because currently it seems like the process is very random, some of them have gotten a lot of attention. The latest application that have gotten the metaphorical cold hand was Nine Inch Nail own application. The application was actually first accepted (and put on the “featured” page in App Store), when NIN then submitted a minor update it was rejected because of “objectionable content”.

Probably this occurred because different people reviewed the first submission and the update. This really makes the flaw in the process really apparent, the developer can never trust the Apple approval process. If this continues I wouldn’t be surprised if small indie developers think twice before they start develop iPhone applications and that would really be a shame, because it will in the long run kill the community.

I think that Apple have to be more transparent, really post the guidelines that are used for the approval process or even better, small developers should be able to “test drive” their idea and get a pre-aproval. That would make it easier for the small developer to justify the investment they need to do to create a iPhone application.

Maybe another solution would be to “do a Maemo”. Maemo have a staging area called the “garage” where third party developers can upload basically anything they want, users needs to manually install them. This would allow Apple to review applications for the App Store, but applications that are deemed “offensive” can still be installed on willing users iPhones.

Please Apple, don’t destroy a good thing you have going on here, a free SDK was a great idea, the App Store was a super idea as well but your approval process can throw it all overboard. Be transparent, let the developers in on the secrets in this case.

by Tobias Rundström (noreply@blogger.com) at May 04, 2009 11:20 PM

April 29, 2009

Florian Ragwitz (rafl)

Running tests that require an X server

Lots of CPAN distributions require some kind of graphical environment. Some of them even pop up windows, which not only very annoying, but also sometimes fails if you're using a tiled window manager.

To test such distributions on a machine where no graphical environment is available or on your desktop while you're working and don't want to get annoyed to death you can use a fake X server, like Xvfb.

The easiest way to do that is to run

$ xvfb-run -a make test

instead of a plain make test. That'll automatically create a fake xserver, set up DISPLAY and run make test in that environment.

That works well for manually installing modules. When installing using CPAN.pm you can make things easier by writing a distropref.

First, tell cpan where your distroprefs are. I use ~/.cpan/prefs:

$ cpan
cpan[1]> o conf init prefs_dir
[...]
<prefs_dir>
Directory where to store default options/environment/dialogs for
building modules that need some customization? [] /home/rafl/.cpan/prefs
cpan[3]> o conf commit
commit: wrote '/home/rafl/.cpan/CPAN/MyConfig.pm'

Now write a distropref for the modules that need an X server and put it into your prefs dir as X11.yml

---
match:
  distribution: |
    /(?x:Wx
      |Gtk2
      |Gnome2
      |... other modules requiring an X server
    )-\d|
test:
  commandline: "xvfb-run -a make test"

Now the tests for Wx, Gtk2, Gnome2 and all other distributions you list in that regex will be executed with a fake X server.

I have yet to figure out how to write a distropref that just prepends to the test commandline instead of replacing it so I won't need to have another pref for all modules using Module::Build.

by Florian Ragwitz (rafl@fsfe.org) at April 29, 2009 03:22 PM

April 28, 2009

Florian Ragwitz (rafl)

Implementing Typed Lexical Variables

For quite some time perl provided a form of my declarations that includes a type name, like this:

my Str $x = 'foo';

However, that didn't do anything useful, until Vincent Pit came along and wrote the excellent Lexical::Types module, which allows you to extend the semantics of typed lexicals and actually make them do something useful. For that, it simply invokes a callback for every my declaration with a type in the scopes it is loaded. Within that callback you get the variable that is being declared as well as the name of the type used in the declaration.

We also have Moose type constraints and the great MooseX::Types module, that allows us to define our own type libraries and import the type constraints into other modules.

Let's glue those modules together. Consider this code:

use MooseX::Types::Moose qw/Int/;
use Lexical::Types;
my Int $x = 42;

The first problem is that the perl compiler expects a package with the name of the type used in my to exist. If there's no such package compilation will fail.

Creating top-level namespaces for all the types we want to use would obviously suck. Luckily the compiler will also try to look for a function with the name of the type in the current scope. If that exists and is inlineable, it will call that function and use the return value as a package name.

In the above code snippet an Int function already exists. We imported that from MooseX::Types::Moose. Unfortunately it isn't inlineable. Even if it were, compilation would still fail, because it would return a Moose::Meta::TypeConstraint instead of a valid package name.

To fix that, let's rewrite the code to this:

use MooseX::Types::Moose qw/Int/;
use MooseX::Lexical::Types qw/Int/;
my Int $x = 42;

Let's also write a MooseX::Lexical::Types module that replaces existing imported type exports with something that can be inlined and returns an existing package name based on the type constraint's name.

package MooseX::Lexical::Types;

use Class::MOP;
use MooseX::Types::Util qw/has_available_type_export/;
use namespace::autoclean;

sub import {
    my ($class, @args) = @_;
    my $caller = caller();

    my $meta = Class::MOP::class_of($caller) || Class::MOP::Class->initialize($caller);

    for my $type_name (@args) {
        # get the type constraint by introspecting the caller
        my $type_constraint = has_available_type_export($caller, $type_name);

        my $package = 'MooseX::Lexical::Types::TYPE::' . $type_constraint->name;
        Class::MOP::Class->create($package);
        $meta->add_package_symbol('&'.$type_name => sub () { $package });
    }

    Lexical::Types->import; # enable Lexical::Types for the caller
}

1;

With that the example code now compiles. Unfortunately it breaks every other usecase of MooseX::Types. The export will still need to return a Moose::Meta::TypeConstraint at run time so this will continue to work:

has some_attribute => (is => 'ro', isa => Int);

So instead of returning a plain package name from our exported function we will return an object that delegates all method calls to the actual type constraint, but evaluates to our special package name when used as a string:

my $decorator = MooseX::Lexical::Types::TypeDecorator->new($type_constraint);
$meta->add_package_symbol('&'.$type_name => sub () { $decorator });

and:

package MooseX::Lexical::Types::TypeDecorator;
use Moose;
use namespace::autoclean;

# MooseX::Types happens to already have a class that doesn't do much
# more than delegating to a real type constraint!
extends 'MooseX::Types::TypeDecorator';

use overload '""' => sub {
    'MooseX::Lexical::Types::TYPE::' . $_[0]->__type_constraint->name
};

1;

Now we're able to use Int as usual and have Lexical::Types invoke its callback on MooseX::Lexical::Types::TYPE::Int. Within that callback we will need the real type constraint again, but as it is invoked as a class method with no good way to pass in additional arguments, we will need to store the type constraint somewhere. I choose to simply add a method to the type class we create when constructing our export. After that, all we need is to implement our Lexical::Types callback. We will put that in a class all our type classes will inherit from:

Class::MOP::Class->create(
    $package => (
        superclasses => ['MooseX::Lexical::Types::TypedScalar'],
        methods      => {
            get_type_constraint => sub { $type_constraint },
        },
    ),
);

The Lexical::Types callback will now need to tie things together by modifying the declared variable so it will automatically validate values against the type constraint when being assigned to. There are several ways of doing this. Using tie on the declared variable would probable be the easiest thing to do. However, I decided to use Variable::Magic (also written by Vincent Pit - did I mention he's awesome?), because it's mostly invisible at the perl level and also performs rather well (not that it'd matter, given that validation itself is relatively slow):

package MooseX::Lexical::Types::TypedScalar;

use Carp qw/confess/;
use Variable::Magic qw/wizard cast/;
use namespace::autoclean;

my $wiz = wizard
    # store the type constraint in the data attached to the magic
    data => sub { $_[1]->get_type_constraint },
    # when assigning to the variable, fail if we can't validate the
    # new value ($_[0]) against the type constraint ($_[1])
    set  => sub {
        if (defined (my $msg = $_[1]->validate(${ $_[0] }))) {
            confess $msg;
        }
        ();
    };

sub TYPEDSCALAR {
    # cast $wiz on the variable in $_[1]. pass the type package name
    # in $_[0] to the wizard's data construction callback.
    cast $_[1], $wiz, $_[0];
    ();
}

1;

With this, our example code now works. If someone wants to assign, say, 'foo' to the variable declared as my Int $x our magic callback will be invoked, try to validate the value against the type constraint and fail loudly. WIN!

The code for all this is available github and should also be on CPAN shortly.

You might notice warnings about mismatching prototypes. Those are caused by Class::MOP and fixed in the git version of it, so they'll go away with the next release.

There's still a couple of caveats, but please see the documentation for that.

by Florian Ragwitz (rafl@fsfe.org) at April 28, 2009 06:20 AM

April 26, 2009

Florian Ragwitz (rafl)

Declaring Catalyst Actions

For a long time the Catalyst Framework has been using code attributes to allow users to declare actions that certain URLs get dispatched to. That looks something like this:

sub base    : Chained('/')    PathPart('') CaptureArgs(0) { ... }
sub index   : Chained('base') PathPart('') Args(0)        { ... }
sub default : Chained('base') PathPart('') Args           { ... }

It's a nice and clean syntax that keeps all important information right next to the method it belongs to.

However, attributes in perl have a couple of limitations. For one, the interface the perl core provides to use them is horrible and doesn't provide nearly enough information to do a lot of things, but most importantly attributes are just plain strings. That means you will need to parse something like "Chained('base')" into (Chained => 'base') yourself to make proper use of them.

While that's easy for the above example, it can be very hard in the general case because only perl can parse Perl. It's one of the reasons you can't use Catalyst::Controller::ActionRole to apply parameterized roles to your action instances, because parsing parameters out of things like Does(SomeRole => { names => [qw/affe tiger/], answer_re => qr/42/ }) would be awful and wrong.

With Catalyst 5.8 most of the attribute related code has been removed from the internals. It's now using MooseX::MethodAttributes to do all the heavy lifting. Also the internals of how actions are registered have been refactored to make it easier to implement alternate ways without changing the Catalyst core.

As a proof of concept for this I implemented a new way of declaring actions that's very similar to how Moose provides it's sugar functions. You can get it from github.

With that, the above example looks like this:

action base    => (Chained => '/',    PathPart => '', CaptureArgs => 0) => sub { ... };
action index   => (Chained => 'base', PathPart => '', Args    => 0    ) => sub { ... };
action default => (Chained => 'base', PathPart => '', Args    => undef) => sub { ... };


It also moves method declaration from compiletime to runtime, making this possible:

for my $action (qw/foo bar baz/) {
    action $action => (Chained => 'somewhere', Args => 0) => sub {
        my ($self, $ctx) = @_;
        $ctx->stash->{ $action } = $ctx->model('Foo')->get_stuff($action);
    };
}

Admittedly, that's all very ugly, but illustrates well what kind of things we're able to do now. But it doesn't need to be ugly. With Devel::Declare we have a great tool to add our own awesome syntax to perl, similar to how things like MooseX::Method::Signatures, MooseX::MultiMethods and MooseX::Declare do.

So how would a declarative syntax for Catalyst controllers look like? I don't know. Ideas include something like this:

under /some/where, action foo ('foo', $id) { ... }

to mean:

sub foo : Chained('/some/where') PathPart('foo') CaptureArgs(1) { ... }

Adding Moose type constraints to this would be interesting, too, and make validation of captures and arguments a lot easier. Multi dispatch similar to MooseX::MultiMethods could be handy as well:

under /some/where {
    action ('foo', Int $id) {
        # find and stash an item by id
    }
    action ('foo', Str $name) {
        # search items using $name
    }
    action ('foo', Any $thing) {
        # display error page
    }
}

So you see there are a lot of possibilities that should be explored. Unfortunately I have no idea what kind of syntax and features people would like to have, so your feedback on this would be much appreciated. :-)

by Florian Ragwitz (rafl@fsfe.org) at April 26, 2009 09:14 AM

April 23, 2009

XMMS2 Offical News Channel

DrMattDestruction released

Slightly delayed, but...

After XMMS2 Team's tussles in Brussels; Here we go again!

XMMS2 Team is proud to present a new release, as late as always. This time there has been huge changes "under the hook" with the new "xmmsv".

You can obtain XMMS2 here:
Release notes:
http://wiki.xmms2.xmms.se/index.php/Release:DrMattDestruction
Source:
http://sourceforge.net/projects/xmms2

The XMMS2 Team would like to extend a big THANK YOU to all who have helped out with this release, and an extra thanks to especially to those 10 persons that made the AUTHORS file grow

by Anders Waldenborg (noreply@blogger.com) at April 23, 2009 03:47 AM

April 17, 2009

Tobias Rundström (tru)

Open Source Community Eduaction

Purple Scout was contracted to do a Open Source Education a while back. The customer wanted a education that gave them the history, business and legal aspects, but they also wanted a section with some "real life" stories, from someone that have worked in a Open Source community already. While both my bosses handled the business and legal aspects I tackled the community section.

After almost a month of preparation, we held the pilot in front of a smaller group today. I was a bit nervous at the start but managed to hold a very engaging talk about the different inner workings of a community and a generalization of what drives open source hackers. It was a fun and interactive group that I managed to provoke a couple of times :-)

I would love to share the slides I did, but unfortunately they contain some information that I can't spread, therefore I will try to blog a bit about the conclusions that I managed to draw from all of this.

Also a question: What do you people think is the driving factor for participating in open source communities as a company, i.e. not for you personally, but what would drive your company to work with open source?

by Tobias Rundström (noreply@blogger.com) at April 17, 2009 07:14 PM

Open Source is about Participation

As I have talked about earlier I am holding an education for company management about Open Source Communities. Since I can't release the slides directly I am going to blog a bit about what these slides contain.

One of the things I am trying to get across the table is that getting involved in a Open Source Community as a company is hard work and often counter-intuitive to old business practices. To illustrate this I have created some case studies about companies that have tried to involve them-self in the community and the different outcomes of that. In my examples I use Nokia, Apple, Google and Sun as examples (and some more of them), all these companies are interacting with the Open Source community in different ways. All of these companies have both succeeded and failed with their interactions (I won't comment on the individual cases in this blog post, but I am still interested in your feedback, what do you think about the companies listed above and do you have other examples of companies failing or succeeding with Open Source?).

While I was researching these different companies (most of my research was based on google searches like "opensource at X") I ran across Sun's Open Source webpage, this page states that 'Open Source is about Participation'. I think that is one of the most accurate one-liners about Open Source I have ever heard. In order to be able to accepted and successful with a Open Source Community you must show that you can participate, create code and work together with the community with it rules.

I think very few Open Source Communities would accept companies that tries to 'buy' their way into gaining influence over a certain project. But companies that can send relevant, well written patches that implements a feature or fixes a bug in a project they are using can succeed. Many nerds just care about code and that is the way it should be.

Interacting with a Open Source Community is not like interacting with business partner, few communities will implement features that they don't like just because your company needs it. Many community volunteers have a lot of pride invested in their projects and will place code-style and technical aspects before the needs of their end-users. This is very different from how a company works, because companies needs to see to the user needs before the technical aspects of the actual code (this might actually explain why most proprietary code is such a mess - "We need this now, or else!").

This means that companies have to care about things like this when they are contributing to Open Source projects, otherwise they might never get their patches merged.

So to sum up, if you want to gain the trust of a Open Source Community, participate and show them the code!

by Tobias Rundström (noreply@blogger.com) at April 17, 2009 07:14 PM

April 05, 2009

Sham Chukoury (eleusis)

Code commenting - the myth

I have lately been embroiled in a debate about the importance of commenting in code. While I don’t yet believe that comments are completely unnecessary, I tend to think that they are largely unnecessary. Almost two years ago, I wrote ‘Software development without maps’ in which I extolled the virtues of ‘documentation’. While it can be easy to confuse ‘documentation’ with ‘commenting’ and jump to the conclusion that I’m now contradicting myself, I’d like to draw the distinction between the two. Commenting is only a specific type of documentation - a kind of documentation that is so narrow in scope that it only applies to code. [Sidenote: In general, commenting will end up covering the ‘mechanisms’ expressed by code, and very little of the ‘policies’ and justifications - which would be best covered by higher level documentation anyway.]

In essence, I see programming as an activity where one devises and manipulates abstract models. Writing code is merely a process of expression of such models. What I was trying to get at, in my previous blog post, was that the same models can be viewed at different levels of abstraction. The ‘documents’ encompass knowledge about the models at a higher abstraction level than the code. Documents, being UML diagrams, specifications, or other suitable representations. Comments, on the other hand, are at the same level as code. While it may be useful to sketch out a program using comments before the real code is written, I believe that such ‘scaffolding’ should eventually fade away. Like faint construction lines in a technical drawing, such comments are there to provide an initial framework for laying out the real lines and curves. Like faint and rough sketches on canvas, or a block of stone or wood, the comments become unnecessary as the system is painted, or moulded into shape.

As a software system takes shape and matures, the most reliable indicator of what it is doing is the code itself, not any superfluous comments. Indeed, there are various dangers associated with using and maintaining comments beyond the initial stages of coding:

  • comment maintenance overhead
    As code is modified for various reasons - bug fixes, feature additions, refactoring for reuse - extra time is required to verify not only the proper operation of the code (which can be automated), but also to review existing comments and rewriting the ‘comment narrative’ in a way that fits the reshaped code. I consider this to be a special case of duplication of logic - in the presence of comments that attempt to explain the program logic, one needs to maintain not only the actual program logic expressed in the code, but also those comments that ‘pretend’ to be saying what’s happening. Such a task becomes especially daunting in a team of non-trivial size, as various people end up writing and rewriting chunks of this narrative - which all ends up devolving into an incoherent and unreliable mess. There are ways of managing, verifying and testing program code - and enforcing program coding style conventions - written in a diverse environment, but there is no reliable way of getting people to write a natural language in a consistent, non-monotonous way. The best we can do is introduce the editor model - should we then have a ‘comment editor’ on every programming team, to ensure that all the comments flow clearly and adopt the right style and tone?
  • matching comments with code
    On the other hand, if programmers do not take the required amount of time to fully review and rewrite comments as they implement changes, we end up in a situation where the comments do not accurately reflect the sequence of events expressed in the code. As this compounds, over time, programmers who are introduced to the system later on bear the considerable risk of being lead astray while attempting to trace defects. The end result is code of poor quality, at the significant expense of time - time wasted following misleading comments.

Looking at the issue from another perspective, what about the usefulness of comments? The machine does not care about comments in the code. Comments do not affect the compiler. Comments do not affect whatever is going to be interpreting the code, or some processed version of the code. That is, indeed, the point of comments. Comments won’t make programs run faster, or in a more stable manner. Comments won’t eliminate bugs. If guns don’t kill people and people kill people, then comments don’t eliminate bugs - people eliminate bugs.

As far as I can tell, the importance of commenting code is 1) seemingly over-emphasised by Computer Science departments, and 2) an unfounded myth perpetuated in programming shops. OK, after a quick trip through IEEEXplore, I found several papers seemingly extolling the virtues of code commenting. However, they all seem to cite the same paper when doing so. A paper written in 1988. A paper about a study based on PL/I and Pascal. Enough said. Clearly, there has been some research done on the topic, but a lot of it seems outdated, especially in the face of more modern concepts such as Object Oriented languages, etc. I shall delve more into this and possibly post a follow-up to this.

In any case, even I was to assume that comments are useful and will bring about world peace, I cannot find any qualitative documentation on the subject. It’s all well and good to say things like “Your code should be 20% commented” or “You need to have comments describing each function” or “Comment about why, not necessarily what, the code is doing”, but no one ever seems to have good examples of such. Such vagueness simply serves to exacerbate the problem - anyone can write practically anything they like in comment blocks and get away with it. “Whaddya mean, I wrote comments! See!” A more practical way of posing this question would be: Given that I have a programming task, how do I write good quality comments that will remain useful to future programmers, given what I know about the problem domain, and how I anticipate it to change? Is there an example of this story and how it pans out?

Taking a step back, let’s look at the real problem that commenting pretends to solve.

As I mentioned earlier, programming involves the manipulation of abstract models and expressing them in code. It therefore follows that one gains more by learning how to more effectively express programming code than by decorating code with comments. Programming code is the ultimate middle ground - it is something understandable both by the programmer and by the machine (at some level). The programmer who can write prose in comments does not hold a candle to the programmer who can get the machine to execute exactly what he wants to get done. There are two main reasons for the existence of comments in code: 1) making up for the lack of higher level documentation, and 2) attempting to mask complexity by ‘explaining it in english’.

The first case is symptomatic of a poor development process, where intentions articulated at the business level aren’t properly captured and architected into solutions at various levels of abstraction. In the absence of UML and other such higher level program models, developers are supposed to resort to code comments to explain ‘why’ certain things are being done, even though higher level descriptions would be more accessible to various stakeholders. (This is a variant of the “explain why you’re doing this” style of commenting) Comments used in such a manner simply mask a lack of traceability between what a particular client wants, what possible solutions are presented and approved, and what ends up getting implemented. The valuable historical record of the back-and-forth discussions detailing what happened and when particular decisions were made, is simply lost. Coupled with an environment where developers are added to and removed from a project in a piecemeal fashion, this is simply a recipe for a fragmented disaster, as few of those involved have a complete memory of the sequence of events.

On the other hand, masking complexity by ‘explaining in english’ is plainly disproven by decades of development on programming languages. Concepts such as functions, classes, methods, packages and libraries were developed for the specific purpose of managing complexity by breaking down code into smaller, safer, more tractable and more manageable chunks. Those allow for the implementation of layerable and composable solution patterns, as well as enabling reuse - all techniques well known to help improve the long term reliability and maintainability of software systems. If it weren’t for those, we’d still be writing long epics in FORTRAN.. if we could even get that far.. The fact that classes and methods can be given meaningful names dispels a lot of the reason for using inline comments. Got a function doing lots of things? Break it up into smaller functions that have descriptive names. The code is then easier to follow at a higher abstraction level. Want to zoom in on a specific step? Just go into that function. Easy. Up and down the abstraction ladder.

Despite the various reasons for writing comments, it all boils down to managing complexity: the complexity of stakeholders’ requirements, the complexity of the solution at hand. What I’ve been trying to say is that all of this relates to the management of the development process. By building maps and models of stakeholders’ requirements, a better understanding of the problem domain can be achieved. The process of building such maps and models also helps in the discovery and resolution of conflicting requirements and essential priorities. From there, developers can devise subsystems that - when coupled together - should aim to meet the set of requirements. Such subsystems can then be defined in terms of their interfaces and interactions with each other - all at a higher abstraction level. From there, the team can then zoom in further into each subsystem and attempt to refine the implementation further. This same process can be repeated down to applications, services, packages, classes and methods. The whole ‘stack’ describes the abstraction ladder in a consistent manner, and moving up and down this stack constitutes the ‘zooming’ action. Explaining the process in such a way presents a simple concept that can be applied by various people involved in the process. Stakeholders talk to architects and account managers to produce documents and customer-facing models, while architects present the same documents and models to developers for further refinement and evaluation. The end product of this process is a whole collection of inter-related artifacts that document the history of the project and its various aspects from different perspectives - all of which is much more useful and accessible then comments buried deep in the code.

Another way of looking at the commenting problem is one of situational awareness. Piles of comments (or code, for that matter) are essentially worthless to a programmer until he reads them. (And when he does read them, the code will provide a more accurate picture of what’s happening, rather than the comments) A programmer (A) who writes some code has implicit knowledge of what the code does and why it’s doing what it does. A programmer (B) who simply reads comments written by someone else has explicit knowledge of what the code is doing, but not necessarily any implicit knowledge. A programmer (C) who reads some code written by someone else internalises a more accurate mental model of what the code is doing. Simply put, programmer A devises a mental model and expresses it in code, while programmer C is doing the reverse process by reading the code and building a mental model. While programmer B has some chance of success at building a model, he might end up doing so ‘faster’ than programmer C, but at the expense of an inaccurate - possibly even out of date - model. This whole construction and deconstruction of mental models is exactly why the ‘abstraction ladder’ development process is powerful - it provides models of varying detail at various levels to enable almost anyone to more easily conceptualise any part of the solution and work with it.

by eleusis at April 05, 2009 12:08 PM

April 03, 2009

Tobias Rundström (tru)

Sony Reader PRS-700

I got myself a Sony Reader PRS-700 the other day. Imported from the USA of course, since we can't get fancy things like that here in Europe. Actually I am evaluating this unit for some friends and co-workers so they know what Reader to buy later.

So far I must say that I am impressed. I have been using it on my weekly trips back and forth to Malmö and more or less left all my books at home. The built-in light is pretty slick, I can actually read books in bed without disturbing my lovely fiance.

A word about the display, a lot of people hate it because it "glares", my guess is that these are the same people that "can't" use a glossy macbook either. I on the other hand have never had any problems with it. So I will continue to read my books digital going forward, no more big books that weigh a ton in my backpack.

by Tobias Rundström (noreply@blogger.com) at April 03, 2009 10:20 PM

March 19, 2009

Tobias Rundström (tru)

Google Summer of Code 2009

XMMS2 got the good news again! It feels awesome, not only because we get to participate in this fantastic program once again, but also the prospect of going to a mentor summit later this year is awesome :-) Thanks Leslie, you know we love you! ;)

But, I heard someone whispering that our proposed projects was less interesting this year! Let's do something about that! Do you have a good idea? File it at our wiki, TODAY! :-)

by Tobias Rundström (noreply@blogger.com) at March 19, 2009 09:30 AM

XMMS2 Offical News Channel

Accepted ... again!

Good news! We have been accepted into this 2009's Google Summer of Code! Head over to the GSoC page at Google and apply as mentors / students.

by Tobias Rundström (noreply@blogger.com) at March 19, 2009 01:26 AM

March 18, 2009

Tobias Rundström (tru)

Official XMMS2 client should be written in Qt!

I read the that theefer did the other day and I just wanted to voice out my opinion about the Official client. I don't doubt that all people in the XMMS2 community probably already know my position about this, but I wanted to make it perfectly clear!

I think the official XMMS2 client should be written in the Qt toolkit and these are my reasons for it:
  1. Qt works natively on all the platforms that XMMS2 runs on. More important, it actually looks good on all the platforms that XMMS2 runs on. It even looks good under GNOME these days.
  2. The Qt API is very clean and easy to use.
  3. You can write Qt applications in C++, Python or Ruby (see my language discussion further down).
  4. Qt bundles with QtScript, which is a ECMA compliant language, which means that we can extend the official client in QtScript. This means a very low entry-level for people that want to add functionality to our client. QtScript is (IMHO) not fast enough to be the sole language we should use, but that might change soon.
  5. Upcoming features like QtKientic will bring awesomeness to our client.

I also think that the base client should be written in C++, but supported by QtScript. First we had the idea that we should write the whole client in QtScript, just have a small C++ loader. I have researched this possibility but I don't think QtScript is ready for that. QtScript is slow, and you need the qtscriptbindings to bind the full Qt API to QtScript, that takes 2 hours to compile on my master macbook pro.

Writing the application in Python or Ruby would probably be more rapid than writing it in C++, but it will be a bigger pain to deploy. Qt/C++ is easiest to deploy because all the tools are already there and users don't have to install yet-another-lib. My second choice would be Python, mostly because I know Python, I don't know Ruby :)

How about xmmsclient bindings?
The last thing I would like to touch is about xmmsclient bindings. Right now I have Qt4 bindings that are native, that means that it doesn't use libxmmsclient beneath, they are not merged into the mainline, but could be found here. I think these bindings could be a good candidate to use in the client, but we would need to make it complete and merge it into XMMS2 first.

See this post as a material for discussion, I would love to hear your opinion. Let the flames rain!

by Tobias Rundström (noreply@blogger.com) at March 18, 2009 06:44 PM

March 11, 2009

Tobias Rundström (tru)

Health related

So this post is totally non-technical.

The last month I have been on a new diet. The reason for this is that I realized that I was simply getting way over-weight and unhealthy, so I decided to try something that worked good for my mother. I haven't blogged about this before because it's not something fun to talk about. But now, after four weeks on the diet and increased physical activities I have lost 14 kilos (about 30 pounds) and I am starting to feel light, full of energy and a lot more healthy.

I have also decided to participate in midnattsloppet this year. It's a 10 km run throughout Göteborg in the end of August. Want to join? :)

by Tobias Rundström (noreply@blogger.com) at March 11, 2009 11:02 AM

GSoC 2009 and other tidbits.

I am on vacation this week, we where supposed to be in Sälen the whole week for some skiing, but due to some mandatory classes that Lisa had to attend, that didn't happen. We will leave for Sälen today instead and get 3 days in the slopes, that will be perfectly fine as well, I am actually looking forward to it a lot.

Also two days of vacation at home haven't been unwelcome at all. I have had time to reinstall my Eee 901, this time with easy peasy. I like it a lot, it really makes the most of the small screen and I didn't have to worry about drivers and X11 configuration etc, etc.

I have also submitted XMMS2 GSoC 2009 application. With some great help of theefer and wanders we finialized all the texts and got it sent away. I have a good feeling about this year, I am more motivated to be the admin and we have learned a lot. I just hope that Google gives us the chance this year as well.

On a XMMS2 releated note DrM has finaly entered testing period. This is waay overdue and we hope that we can wrap it up before the start of the GSoC, so that students can work against that version and not some unreleased one.

by Tobias Rundström (noreply@blogger.com) at March 11, 2009 10:56 AM

XMMS2 Offical News Channel

Google Summer of Code 2009

We have just applied for Google Summer of Code 2009. Hopefully we will be included in the program for the fourth year in a row. Get involved in our ideas and community now! See our GSoC 2009 portal here!

by Tobias Rundström (noreply@blogger.com) at March 11, 2009 02:47 AM

February 24, 2009

Tobias Rundström (tru)

Dollhouse - redux

Episode 2 was a lot better! Actually, I suspect that this was the episode that they where aiming for showing as the Pilot from the beginning. It explains a lot of the backstory and is less "ordinary" than the first episode. I just miss the trademarked whedon humor, please give!

by Tobias Rundström (noreply@blogger.com) at February 24, 2009 07:23 PM

February 16, 2009

Sham Chukoury (eleusis)

XMMS2, the vision

I think it’s a great thing for people to finally be stepping up to think of a way forward for XMMS2, especially after a period of relative stagnation. However, I have a few bones to pick with the current shape of things.

Given the direction that the ‘XMMS2 Vision’ is taking, I I’ll say this: I think software freedom is overrated. We’re in 2009, an era where Open Source is practically mainstream - computer manufacturers such as Dell and ASUS are selling desktop and laptop computers with Linux (typically Ubuntu, or some other Debian derivative) pre-installed. ASUS’s Linux-powered eee PC helped launch the netbook revolution, with many observing that the netbook was an ideal application of the low cost benefits of a Linux-based OS. After a decade of people wishing to see Linux as a relatively mainstream desktop OS, it is practically there - any moderately computer literate average Joe can easily grab an Ubuntu Live CD and be on his way.

That’s not to say that freedom is not important, but simply chanting ‘freedom, freedom, freedom’ does not build a thriving community of passionate users. Well, actually, it does, but that’s a kind of community that borders on blind faith, religious dogma and rabid zealotry when it comes to ‘freedom’ - e.g. the cult of GNU. Passionate, indeed, but is this what you see for the future of the XMMS2 project?

When I think about the XMMS2 project, I tend to take the ‘freedom’ aspect for granted, given that XMMS2 has been an open source project for most of its time in existence. It’s a given that XMMS2 is released under an open source licence, and that the small community of loyal developers, users and other fans has been built upon this foundation - I don’t think that is likely to change. When looking for a future vision for the XMMS2 project, I’d say that it would be more useful to search for more practical goals than to get lost in navel gazing about freedom. In the end, what people care about is code that works.

I recognise that putting together this vision is a good opportunity to examine the values that are important to the XMMS2 project. More importantly, however, I think what’s needed is a sharper focus on achieving certain goals. Without a drive towards such goals, we’re pretty much left where we currently are, simply nibbling at ideas that we think are good at the time, without making much progress towards something more coherent.

I’d like to present my own vision for XMMS2 - by no means a definitive attempt, but merely my opinion - and comment on what has been said/written so far.

First of all: XMMS2, what is it? We use the term ‘XMMS2’ in many contexts, with multiple meanings. I feel that, without a clear idea of how to define the term, we’re likely to be left floundering, especially since this is at the very core of what we’re trying to do. XMMS2 is many things:

  • A music player. (Or ‘audio’ player? We’ll get back to this..)
  • A framework for building custom ‘jukeboxes’?
  • A community of people who study, use, develop or otherwise contribute to a common codebase.
  • A project - to produce a music player - encompassing the community effort.

Personally, over the years I’ve been involved with XMMS2, it has been all this and more:

  • An opportunity to participate in an Open Source project and understand what it’s about - especially the ability to do so from firsthand experience rather than being an outsider looking in.
  • An opportunity to put my software development skills into practice - and learn more about development in multiple languages, algorithms, software development processes.
  • An opportunity to discover more interesting kinds of music than I knew of - music that’s almost non-existent on local radio stations and music shops.
  • An opportunity to virtually meet and interact with strange people from all over the globe.

When I was first introduced to the XMMS2 project, I was merely a university student tinkering with something I found interesting at the time. What I learned from the subsequent experience, however, tremendously increased my development skills and practical knowledge of how software can be developed. I can say with some amount of gratefulness that being involved with the XMMS2 project is one of the major things that has shaped my career as a software developer so far - what I learned from Anders’ engineering skills is still something that has an influence on how I build software today.

Perhaps, then, one might consider ‘education’ as one of the values of the XMMS2 project. Indeed, XMMS2 has been a mentoring organisation in Google’s Summer of Code program for a number of years now - something which I believe has been quite instructive for both the students and the mentors involved. I’d like to think that there are others who might be interested in learning a thing or two about ‘real’ software development to join the community. Granted that code produced by the XMMS2 project is far from perfect, and far from being an academic example of great software engineering, I believe that there is much one can learn by being involved in the community and studying the code. (And no, the XMMS2 project isn’t unique in this respect - many other open source projects also fit the bill)

Beyond what XMMS2 means to each community member, we need to look at where the project is headed. The way I see it, there are two main points to make about this: 1) building the code (or system, or framework - technical excellence), and 2) building the community (community excellence). In this process, we must bear in mind that we’re trying to appeal to certain relatively distinct groups of people:

  • Users
  • Developers

Both groups view technical and community excellence differently.

In general, as far as users are concerned, if the product works, they’re (mostly) happy. (If they’re really happy, they might even tell their friends) As far as community is concerned, users are happy to occasionally rely on the community for support when things go wrong (Why can’t I play my music, etc). A user’s experience in both respects will dictate how long the user will remain loyal. For example, if XMMS2 can’t easily play a particular file, the user will seek an alternative solution and likely switch to a different player. If the user cannot get the community to resolve a particular problem, or finds the community relatively unfriendly, he will likely gravitate towards a more friendly community.

As far as developers are concerned, technical excellence is about producing interesting code in particular ways - a more efficient algorithm, a more flexible plugin system, a library with a clean API, a seriously cool feature that’s not available anywhere else. The cornerstone, however, is the existing developer community around the project - these existing developers are the gatekeepers to the existing codebase, the ones with inside-out knowledge of how the existing system works, the ones who share the history of the project and dictate where it is going. The interface between contributing developers and core developers is exactly where the value of ‘open source’ comes into play. On one hand, contributing developers are attracted by how easy it is for them to modify existing code to introduce new features or fix defects, and on the other hand, core developers must have processes in place to ensure that code of relatively high quality is accepted - while encouraging the better contributors to remain interested.

Somewhere in the middle, there’s an intersection between the set of users and the set of developers. This typically takes the form of passionate users with certain skills moving towards becoming developers by contributing code to the project. In general, I think that this should be encouraged, as it grows the base of community members available to support users and induct new developers.

OK, so I’ve talked a bit about what I think is important for XMMS2 as a community. I’ll post some more later about users, developers and XMMS2 as the product.

by eleusis at February 16, 2009 04:18 PM

February 15, 2009

Tobias Rundström (tru)

XMMS2 vision

Following up on my post from FOSDEM I have now started the process together with the XMMS2 community to define our Vision. We are working on getting a version of this vision that everyone feels ok with. You can see our work (and chip in if you want) at the following wiki page.

by Tobias Rundström (noreply@blogger.com) at February 15, 2009 10:38 PM

Dollhouse

First episode of the much talked about Dollhouse was aired the other day. I got my hand on a digital copy and I watched it with a lot of anticipation. Aaaand it didn't let me down completely, but it didn't wow me either.. I like the concept, it's pure close-future sci/fi with the whole download/upload of memory concept well in place, Elizas performance was solid, but still something was missing. I am not giving up on this yet, I have faith in you Joss Weadon! But I hope we will see more weadon-esque humor and cleaver twists in the coming episodes.

by Tobias Rundström (noreply@blogger.com) at February 15, 2009 10:28 PM

February 11, 2009

Daniel Svensson (nano)

android + last.fm = best thing since sliced bread!

Installed the Last.FM player on my Android yesterday and I suddenly knew that I had just taken a leap into the future.

The days of myPod‘s and other digital music players are reaching their end. I realise that while writing this, millions of people sit in front of their computers pushing music into their little gadgets before heading out in the street or whatever, and you know what…

<blink>THEY’RE DOING IT WRONG!</blink>

What they should do is to get themselves an Android or iPhone, install the Last.FM app, just head outside and click the ”xxxx’s Library” station and enjoy song after song they probably just want to hear right now, for free! The whole world of music instantly available from that Internet enabled device in their pocket.

<blink>THIS IS THE FUTURE! IT’S HERE!</blink>

It’s has also revolutionized my use of Last.FM. As I’m using it on the go I’m not really doing anything other than listening to music so it brings me closer to the music in a whole new way.

If I hear a song it’s really easy to just pick up the phone from my pocket and press the <3 button, maybe skip to the next song if the current one doesn’t fit my mood, or if the song reminds me of someone, the share button is just a click away, both share to email from the android contacts list, or to my friends at Last.FM.

I haven’t been this excited about a piece of software since I first started using Xbox Media Center, this IS the best thing since sliced bread (or XBMC in this case).


by Daniel Svensson at February 11, 2009 04:39 AM

February 09, 2009

XMMS2 Offical News Channel

XMMS2 Developers at FOSDEM 09

We had a blast at FOSDEM as usual. Here is the obligatory group-photo:


From the left: Erik Massop, Alexander Botero-Lowry, Auke Schrijnen, Daniel Svensson, Tilman Sauerbeck, Tobias Rundström, Sébastien Cevey, Kate and Sebastian Noack.

Update: Fixed spelling of Tilman's name, Sebastian's name and changed "from the right" to "from the left".

by Tobias Rundström (noreply@blogger.com) at February 09, 2009 12:03 PM

February 08, 2009

Tobias Rundström (tru)

First vision, then hack.

I am currently sitting in one of the Hacker Rooms at FOSDEM in Brussels. I have spent my last two days together with a great group of XMMS2 developers, just as last year. I really enjoy these events where you have the possibility to actually meet the people you spend a lot of your spare time with.

The discussions this year was very different than last years topics. This year people was more concerned about how to organize the distributed team and work on the "right stuff". I find it pretty funny since this is just the things I have started to do at Purple Scout recently.

I have decided to give it a go for the XMMS2 community as well. I am sure that I can leverage on some of the things I have learned recently, but I also know that it will be very different since the developers of the XMMS2 community are not working on XMMS2, just doing it for the kicks (and possibly the chicks, but I think that is just a big misunderstanding).

One of the talks that inspired the discussion was Bdale Garbee's keynote about the Debian community. He said that you shouldn't underestimate the values of values. Basically you'll need to share common values and goals within a community in order to get everyone aligned. Debian has a Social Contract that outlines the vision for the Debian project.

My plan is to establish a similar document for the XMMS2 project. It will be a document that is created by the community for the community and will hopefully allow us to align better towards the ultimate world domination goal.

After this document is done I will move on and establishing our "Code of Conduct" or "Development Guidelines", this document will outline how we work together as a group and what processes we follow.

So the current plan for world domination is:

  1. Establish the XMMS2 vision document
  2. Establish the XMMS2 code of conduct document
  3. Get everyone super-hyped about XMMS2 development
  4. Hack!
  5. ????
  6. World Domination! (Or at least 'Ready to amaRock').



by Tobias Rundström (noreply@blogger.com) at February 08, 2009 12:48 PM

February 02, 2009

Tobias Rundström (tru)

GTD with Things

Wow, it really took a long time to write this entry. I have now been working at Purple Scout for around two weeks and it has been really good. I have a fantastic team to work with and I have already done some good work (in my own humble opinion). I have also had the chance to really start using GTD in my daily life (it's hard to organize your life when you only play video games, which was what I did during my vacation). So far I am very pleased with it, but the test of time will really show if it reduces my stress and improves my efficiency.

I am using Things from Cultured Code as my organizer software. It's a very clean software that implements the basic lists from GTD (Inbox, Next, Someday, Scheduled, etc). It also have a very flexible tags system that I use for a number of things and most important it has iPhone synchronization.

I use the iPhone application as my on-the-go collector. Most things I have to do pops up in my head when I am taking a walk or sitting in a meeting, in true GTD style my brain is stupid as well, so I just flick up my iPhone and scribble a few words in there. I concentrate to get a reminder mostly in the iPhone because it doesn't take that long to do that way and then expand on it when I sync it to my desktop client.


Collection with the desktop client is also very good, when I identify a task I just press my globally recognized shortcut (meta+ctrl+space) and it brings up a dialog where I can enter my task.

Things has the concept of Areas of Responsibility and Projects. I use the Areas as "larger projects" that can have several sub-projects. For example is 'Home' one of my areas, in there I can have projects like 'Redecorate the room' which in turn can contain specific tasks. Another area is "Work" but I also have a area for one of the bigger customers we are working with, since we are running ~8 projects together with this customer. Important to note is that tasks that are organized into a project can not be scheduled, they can only be 'next' or 'someday' as far as I understand it, but tasks that belong to the area directly can be scheduled. I am not really sure why this is, or if it's a bug.



When I get to my organization phase I first scan items that should be put into projects and put them there and then areas. I don't have item outside any area. Tasks that goes into projects get the tags of the project so usually I don't have to apply any extra tags to these tasks, but since areas doesn't have tags I have to apply them to these posts. The most common tags for me is "work" and "home" because when I head over to the "do stuff" phase I can filter my things based on tags, which removes a lot of distraction "now I am at work and can only see things I should do at work" works great for me.

Things isn't without flaw, the things that annoys me most are:
  • Pressing the icon in the dock doesn't bring up the minimized Things window.
  • Synchronization with iPhone only works over wifi and you have to be on the same network. Also if your firewall/router/switch for some reason filters bonjour (mDNS) it will not work (I had to fight the system administrator at work for this).
I hope these issues will be addressed in future updates of things.

That's it for today, next entry will probably be about SCRUM, since we just implemented this at work.

by Tobias Rundström (noreply@blogger.com) at February 02, 2009 08:32 AM

January 04, 2009

Tobias Rundström (tru)

Introducing GTD - Inbox Zero

As you might or might know I resigned from my position at Procera Networks in the end of 2008. My new position will be at a company called Purple Scout, where I will lead a small team of developers and develop processes and infrastructure for in-house development work. Between my two positions I have managed to scrape together almost a month of spare time. While most of this time has been spent with family for holiday celebrations I have also spent quite some time researching GTD (Getting Things Done). I have decided to decided to try to implement this full out at my new position.

I will spend some posts in the blog about my way to implement this methodology. I will not try to explain all the finer details about GTD, this is explained in numerous sites around the internet. I will just described my attempts on implementing it. So far I haven't really implemented it fully, but this is the steps I have done so far.

I read the book and I don't think there is a short cut around that, just read it. Also listen to the 43 folders podcast with David Allen interviews. They give you a lot of practical tips.

I have been using Things for a long time, both for my Mac and for my iPhone, but I have never really got around to learn how to use it correctly, the pieces was falling in to place when I started to read the Getting things done book, more about that one later.

First thing I really implemented was the Inbox Zero mail handling. I have two mail accounts, one for my work and one personal GMail account.

I read my work email with Mail.app and I started off by changing the settings for getting emails in Mail.app, instead of polling email every 5th minute it's now polling every hour. I also turned of "Badge" notification (i.e. showing in the icon how many new emails you have) and disabled Growl Mail. I think these things are essential, because the whole point with GTD is that you should have specific slots for collecting and processing data, if you get interrupted when you actually do work this could really hurt the process. Secondly I downloaded and configured MailActOn to handle three different keyboard shortcuts: Ctrl-A will move the email to the Mail Archive folder, Ctrl-T will move the email to the To Do mail folder and Ctrl-R will move the email to the Read folder.

This makes it very easy to sort the email when they arrive. If it's a item that I can't do anything about and I don't want to save it: I delete it, if it's a email I can't do anything about but I want to save it for future reference I press Ctrl-A and get it out of my INBOX. If the email contains something I want to read, but is not a direct action I press Ctrl-R and revisit it later when I have some spare time. Now if there is a action in the email, something I need to reply to or do in any other way, then I press Ctrl-T. The emails that ends up in the To Do folder are collected and categorized in the "process" phase. When collected and categorized I will archive it. This is not optimal, my goal would be to get the To Do emails filed in my Things INBOX so that I have just one way to collect actions.

GMail is actually pretty well prepared for GTD. It has the concept of "archive" that just get's things out of my INBOX and into a search able index. It also have the possibility to put a Star on emails with keyboard shortcuts. I use it the following way: press 'e' and archive emails that I can't do anything about, star the email and archive it if it's something I want to read or to do anything about, then collect and categorize the starred messages later in my collection phase.

Instead of writing a monster post for everything I have done so far I will stop here and write another post later in the week about how I use Things and my data collection. I also have a lot of ideas on how to work with GTD in my future team, more about that will also come later.

by Tobias Rundström (noreply@blogger.com) at January 04, 2009 10:38 PM

December 22, 2008

Tobias Rundström (tru)

Music of 2008.

End of the year, let's summarize how the electronic music scene looked like in 2008? Generally there was a lot of talk about how the "synth" genre is dead, no-one innovates and so on. Well, I for one tend to disagree, there was a lot of really interesting releases this year, as you can see below.

5. Negative Format - Gradients


Negative Format returns with yet another release that is both trance, EBM and dreamy sound scapes. The track Hues of Grey is probably one of the best tracks NF ever did. Looking forward to even more tracks from NF in the future.


4. Ayria - Hearts for Bullets


Ayria or Jennifer Parker released a very very good record 2008. She describes her music as "Tit-zerEbb" style, greasy bass-lines, great hooks and hard beats. Together with Jennifer's voice this makes for a very very pleasant musical journey. Best tracks include "Girl on the Floor" and "Invincible".


3. Informatik - Beyond


This release really came as a surprise for me, I have heard Informatik before but I have never really gotten into their music. Beyond on the other hand really blew me away! Catchy synth-pop tunes with a powerful voice and awesome hooks. Listen to the tracks "Nothing Greater" and "Don't be Afraid" and be amazed!

2. Standeg - Ultra High Tech Violet


Another surprise! By mid 2008 Standeg released a free digital EP called "Rushing Pictures", after listening to this EP day out and day in they finally released "Ultra High Tech Violet". This is innovative release mixing trance sounds, intriguing melodies and very fine details. This is one of those releases where the more you listen to it, the more details you notice. The music is like a futuristic sound track for a sci/fi future. Best tracks are "25 hours", "Homes & Gardens 3.0" and "Image in motion". Haven't you bought it yet?

1. KieTheVez - Non-Binary


I have been talking about innovations and complex music for a futuristic world. But sometimes plain old beautiful will just work! KieTheVez is a Swedish synth-pop band from Gothenburg, they released a couple of records during the 90ies but have been silent for 11 years before they released "Non-Binary". This is pure synth-pop bliss! Haunting, beautiful and with great sing-along values. This might not be innovating or complex, but it's still great and it tops my last.fm list for the year! Smash hit is "One world for the next" but the disc is filled with awesome tracks.

Worth to mention as well is that the best gig of the year was Interlace at electriXmas, they have just released two new songs "istatue" and "nemesis" that can be found at their myspace page. If the new material will be anything like these two songs then it's going to be one of the strongest releases they ever made.

This years disappointment is Imperative Reaction's "Minus All" which is pretty dull record compared to the rest of their material. To bad, they used to be one of my top groups.

Now I am looking forward to 2009 with up-coming releases by Interlace, Combichrist, Depeche Mode, In Strict Confidence and hopefully a new Headscan release.


by Tobias Rundström (noreply@blogger.com) at December 22, 2008 09:46 PM