Planet Midgard
First year of Qaiku, and a travel writing challenge
Posted on 2010-03-09 21:00:09 GMT.
Qaiku, the conversational microblogging service that launched a year ago had a refresh that launched today. While it hasn't yet convinced the twittering masses, it has already proven itself as a lot more thoughtful platform for the Finnish online community, and as a valuable workstreaming tool.
The new version looks quite nice and fresh. Notice the privacy information on the right-hand side, which is relevant as Qaiku allows channels and profiles that are private or invitation-only:

Technically the new version is also remarkable as it is the first major website to run fully on top of the legacy-free Midgard2 platform. So yes, every entry you see there is a GObject. And D-Bus signals fly when you post.
On to the challenge, then
To highlight Qaiku's threading, conversational nature I started a new "On my travels, I have" thread for sharing your most extraordinary travel experiences. This is not on Twitter or Buzz as with Qaiku it is so easy to keep the conversation together and accessible for the future as well.
To contribute, sign up on Qaiku, go to the thread and add your experiences as a comment. If you have a link or picture to include, you can also do so. My first entry was:
seen ice descend from the heavens and provide us with cold beer on a hot day in Lesotho
Will be interesting to see what comes out of this :-)
Getting started with the Midgard content repository
Posted on 2010-03-09 15:50:26 GMT.
I'm doing a talk today in the Bossa Conference about using Midgard as a content repository for mobile applications. As part of my presentation I wrote some simple example code for using the Midgard APIs in Python, and thought they would be good to share to those not attending the event as well.
The idea of a content repository is that instead of coming up with new, isolated file formats or database setups for your application you can just work with objects and signals, and let Midgard handle the rest. This is something that lots of people are doing with CouchDB as well, but we feel Midgard, with its light footprint and native APIs for languages like Python, C, Vala and PHP fits better in the mobile applications context.
Installing Midgard
Midgard packages are available for many different Linux distributions through the OpenSuse Build Service. To find the right repository for your setup, go to the OBS project page. For example, on my Ubuntu Karmic netbook the URL to add to apt sources.list is deb http://download.opensuse.org/repositories/home:/midgardproject:/mjolnir/xUbuntu_9.10/ ./. Then I just:
sudo apt-get update sudo apt-get install python-midgard2
Midgard is also available in Maemo extras and for OS X on MacPorts.
Defining a schema
The first thing when developing a Midgard application is to define your storage objects. This is done using the MgdSchema XML format. In this case we're doing a simple "attendee" object that amends Midgard's built-in person record with information related to the conference:
<?xml version="1.0" encoding="UTF-8"?>
<Schema xmlns="http://www.midgard-project.org/repligard/1.4">
<type name="openbossa_attendee" table="openbossa_attendee">
<property name="id" type="unsigned integer" primaryfield="id">
<description>Local non-replication-safe database identifier</description>
</property>
<property name="person" type="unsigned integer" link="midgard_person:id">
<description>Person attending the event</description>
</property>
<property name="registration" type="datetime">
<description>Registration date of the attendee</description>
</property>
<property name="likesbeer" type="boolean">
<description>Whether the attendee likes beer</description>
</property>
</type>
</Schema>
Then we just save this XML file into /usr/share/midgard2/schema/ so that Midgard will find it.
Initiating the repository connection
Once the MgdSchema is in place it is time to import antigravity and start hacking in Python. The code works pretty much in the same way in other languages Midgard is available for, but Python is used here for the sake of simplicity. First we load the Midgard extension:
import _midgard as midgard
Then we setup the repository connection. With these settings we will store our content into an SQLite database located in ~/.midgard2/data/midgardexample.db:
configuration = midgard.config() configuration.dbtype = 'SQLite' configuration.database = 'midgardexample' # Open a Midgard repository connection with our config connection = midgard.connection() connection.open_config(configuration)
As this is the first time we're interacting with the repository we need to tell Midgard to prepare the storage for itself and also for our new openbossa_attendee class:
midgard.storage.create_base_storage()
midgard.storage.create_class_storage('midgard_person')
midgard.storage.create_class_storage('midgard_parameter')
midgard.storage.create_class_storage('openbossa_attendee')
Interacting with data
First we create a person object with our attendee:
person = midgard.mgdschema.midgard_person() person.firstname = 'Leif' person.lastname = 'Eriksson' person.create()
Then we create our attendee object and link that with the person we just created:
attendee = midgard.mgdschema.openbossa_attendee() attendee.person = person.id attendee.likesbeer = True attendee.create()
Querying data
Later we'll want to find out about all Leifs attending the event. We do this by using the Midgard query builder:
qb = midgard.query_builder('openbossa_attendee')
qb.add_constraint('person.firstname', '=', 'Leif')
attendees = qb.execute()
The query builder returns us a list of matching attendee objects. We can go through them and also fetch the associated persons:
for attendee in attendees:
person = midgard.mgdschema.midgard_person()
person.get_by_id(attendee.person)
if attendee.likesbeer:
print "%s, %s is attending the event" % (person.lastname, person.firstname)
Then we can update the persons with their email addresses:
person.email = 'leif@vinland.no'
person.update()
For basic data handling, that's it! When you need more, you can extend objects with file attachments or parameters. You can also create joined records using Midgard views. Midgard provides D-Bus signals, transactions, centralized metadata, synchronization and many other things.
Wake Up! It's springtime.
Posted on 2010-03-09 10:51:37 GMT.
First, the MeeGo. I always second all open source projects. It was my path for independant consultant and developer. The excellent idea of killing or borders and constraint, opening your inventions to the world and grabbing others' ideas to adapt and adopt is unbelievable. More... open source projects are by the definition open, so everyone can join at any moment and everyone IS invited. The more hand, the better evolution on the way.
What about MeeGo? It's brand new effort initiated by Intel & Nokia towards building a decent, powerful yet lightweight, universal operating system for mobile devices like netbook or phones. Why so excited? Because it's open. So don't wait for anything proprietary that your phone manufacturers would (or not) provide to you in your black speaking box. Stand up, join the community and make your phone/netbook/GPS device or whatever you want work your way.
Having that, I already made my first step and got involved into MeeGo L10N area. Since I am more like PHP and web-oriented guy I can't so far find a place among all those geek programmers and I decided to apply Force to localization subproject. I've seen many badly translated UI's they were introducing more confussion than help and I don't mean to allow my new phone talk to me 'po polskiemu' because nobody took care of checking if translated string are suitable, or make any sense either way.
The other thing that woke me up this spring was and article that came to me thru Google Buzz. OMG! They are running Midgard for ten years already. See? Good stuff :)
This also remided me about my first commercial Midgard implementation. Back in 2000 when MS NT server made me cry and tear my hair off, I accidentally stepped into Midgard website. Those days it was kind of version 1.2, without any knee bending features but had something... user-friendly URL handling. No more index.php?id=123&style=456!
The bad news was that the only admin UI available was old Asgard and was not a tool for real rich content editing. Anyway, it took several months to put things together and Midgard combined with my home-brewer Nadmin Studio clone started to work for Poznan International Fair website including some 50 microsites - one per each exhibiting event. Whatever.
Today, reading the article, I just quicly pointed my browser to www.mtp.pl and, hey!, they are still runing some kind of Midgard. No idea what version, or if they use MidCOM or own solution but look at it. Another ten years old, pure and special Midgard website :)
Those days Midgard evolved a lot. Version 2 has been released, the design has changed a lot by moving towards independent content management solution that can be a web site or a desktop application, but one thing remains - Midgard is still a hell good and powerfull stuff.
CMS Watch on their Midgard usage
Posted on 2010-03-08 18:24:26 GMT.
Which CMS does The Real Story Group Use? (Tony Byrne / CMS Watch):
The answer is, we use an open-source platform called "Midgard." We picked it nearly ten years ago, and it has held up fairly well.
...
One of the things we like about Midgard actually makes it rather unsuitable for many simpler publishing scenarios: it is highly object-oriented. This allows us to run multiple sites off largely a single codebase -- at the cost of quite user-unfriendly administrative and authoring facilities.
Also, Midgard is very much a development platform, and we have had to create a fair amount of custom code, especially to handle structured content. In that regard, our CMS experience probably resemble yours. As an industry we remain very far from plug-and-play content management technology for all but the simplest of websites.
While the post contains many negative points about older Midgard (the UIs are a bit better now than they used to be, quite a lot of development has since been happening especially in the LTS branch), it is remarkable that CMS Watch has been able to run their services through the same CMS setup for ten years. This really shows the durability and commitment to long-term stability we have in the Midgard community. We've been doing this for more than ten years, and will likely keep going for quite a bit longer.
As for usability and popularity of Midgard, there is quite little we can do about it in the Midgard1 area, as that is now in long-term support phase that won't allow major changes. But Midgard2 is a new world with new opportunities. Midgard's content repository is pretty much there already, as is the MVC layer, and this spring we should be able to unveil the new, quite revolutionary CMS concept as well. Watch this blog for updates!
Atheists more evolved?
Posted on 2010-03-08 12:06:00 GMT.
I read this article on National Geographic telling that Liberals, Atheists are more evolved. Having studied evolution quite a lot for a layman, I can tell immediately that at least the person behind the title doesn't know what evolution is and that no one is more evolved than anyone else. Of course I could let the atheist inside me shine in the light, but...
First and foremost, evolution doesn't have a direction. It doesn't steadily go towards a conclusion as that would require some intelligence to plan forehand the play. Evolution is an eliminative process, pointing always only towards current moment, letting only those who are right there and then having some kind of an advantage in procreating.
Even those that appear as living fossils like platypus or Coelacanth have had exactly the same time to evolve. Platypuses appear as less evolved than other mammals as they
- lay eggs instead of give birth to living babies
- don't have nipples, but secrete milky substance straight on the skin
- have a beak instead of a nose
How about its evolved traits like electrolocation that is so sensitive that it can locate a shrimp by the electric signal shrimp's muscles transmit when contracting? Or that platypuses are the only (known) poisonous mammals?
And for all of those who ever have heard that "I can't believe that we humans evolved from chimpanzees": it's all true. We didn't. We branched from common ancestors and we really aren't any more evolved than chimps, only different. Chimps and bonobos aren't our parents, they are our cousins.
Second, changes in genes and in appearance do not correlate. Genetic changes can be very subtle and small but still have dramatic effects (e.g. comparing Homo Sapiens to Chimps) or they can be very big while phenotype remains apparently unchanged (platypus compared to any other mammal group, according to genetic sequencing). There are numerous factors that can alter the phenotype while keeping the genes relatively unchanged, like pedomorphosis (changing the time when species becomes fertile) in Axolotls.
P.S. This all reminds me of a very educating and entertaining video that tells what really makes us different from any other animal: Robert Sapolsky on the Uniqueness of Humans.
Domain issues
Posted on 2010-03-05 10:25:17 GMT.
Finally got my domain issues worked out. For long time the domain was pointing to wrong server and for many weird reasons I couldn't get it to update.
Next I'll start transfering this blog to my own server and to a new and improved platform.
Also hopefully finally get some time to actually update it also...
Maemo 5 Extras reaches 3.5M downloads
Posted on 2010-02-24 15:20:00 GMT.

The maemo.org Extras repository for community contributed software has reached 3.5 million downloads for Maemo 5. Software is offered through maemo.org free of charge and the repository is open to all developers. maemo.org Downloads is the web interface to the software available through maemo.org Extras.
We see the number of downloads grow every day. This makes the maemo.org Extras repository a great place for developers to get their software in the hands of end users. If you are interested in publishing your software through maemo.org, please visit the wiki.
We introduced improved download statics to show developers exactly how many downloads they received. The FM Radio Player application has received over 138000 downloads. FM Radio stats below:

The Extras repository has only been enabled on N900 devices by default in a recent software update. Before this update users needed to manually activate the repository in their Application Manager's catalog list. Also keep in mind that the Application Manager is not very easy to find, because of it being put in the 'More' menu.
Overall I think the number is quite impressive as these devices aren't available for a long time and a lot of people had problems even finding a device in their country.
Register and log into meego.com using your maemo.org account
Posted on 2010-02-24 13:57:09 GMT.
MeeGo is the new mobile Linux platform developed by Nokia and Intel. As the community is forming up, we thought that it would be good to enable people to use their maemo.org identities also on the MeeGo web services (as well as on any other OpenID enabled website). For this, let me introduce Maemo's OpenID provider.
First of all, go to meego.com and click login:

Select the "Log in using OpenID" option, and provide your maemo.org OpenID URL:

Then the request will be redirected to maemo.org where the site will check your credentials and ask whether to relay your information on to meego.com:

And that's it, suddenly you can use your maemo.org account with meego.com!
The same OpenID provider component can also be utilized on any other Midgard-powered website.
Wallpapers for Ubuntu 10.04: my submissions
Posted on 2010-02-24 11:03:08 GMT.
Ubuntu 10.04 "Lucid Lynx" is coming and they're looking for suitable wallpapers. I made some submissions and was pretty happy to see one of them in the Top 15 wallpapers for Ubuntu Lucid post:
Here are some other submissions I made:
Going to the Bossa Conference
Posted on 2010-02-23 12:38:44 GMT.
Bossa Conference, an event about mobile development with free software technologies will be held on March 7th-10th in Manaus, Brazil. This year I'm speaking about using Midgard as a replicated storage layer in mobile applications, with examples for multiple programming languages and toolkits.
The idea behind the Midgard content repository is that instead of coming up with your own file formats you can just keep working with objects and signals, and let the repository deal with the rest.

It is always fun to go to Brazil and meet the vibrant free software community there. The plan is to fly over this weekend, spend a few days in Sao Paulo and then head for the Amazon. Feel free to ping me if you're around.
Maemo's community involvement infrastructure is what MeeGo needs
Posted on 2010-02-16 09:39:35 GMT.
Nokia's Maemo and Intel's Moblin are merging to form MeeGo, a development environment for a new class of internet-connected devices ranging from smartphones through netbooks to TV sets. This may be finally what provides the free software world with a consistent and modern alternative to the iPhones and iPads that the proprietary world has come up with, the "magical user experiences" Linux Foundation's Jim Zemlin was asking for.

Unlike Android, both Moblin and Maemo stacks have been very promising in the sense that they've been closely aligned with existing and well-known Linux desktop technologies. All RPC communications happen through D-Bus, Qt or Clutter is used as the GUI toolkit, there is Telepathy for integrated VoIP and IM communications, and Moblin even comes with the GeoClue location service.
So far the discussion about this merge has very much focused on technical terms: what toolkit to use (Qt is recommended), what package manager (RPM) and so forth. However, what hasn't been discussed yet is what will happen to Maemo's excellent infrastructure for community involvement:
- Brainstorm is a tool for proposing ideas and solutions to them, and then voting to qualify them. This is a very good way to gather ideas and feedback from the community, and some brainstorms have even ended up having community-led free implementations available, freeing Nokia from having to write all platform functionality
- Talk is the very popular forum for both Maemo end users and developers. Having an open forum to discuss it all, and having also people from Nokia and Intel there would help to communicate the aims and decisions around the platform a lot better
- Packages and Downloads provide a fully open and crowdsourced "app store experience" where the community is free to develop, upload and install Maemo applications through a consistent service that provides quality control, nice installers and a free API for browsing the software available
- Community Council and the Sprint process have been the way Maemo's community infrastructure has been designed and developed out in the open. The various tasks have been documented in the Wiki, and people have been able to follow the progress through a Qaiku workstream
- Karma is a way to credit community members for their involvement. The involvement can be technical (for instance, developing a popular Maemo application) or social (publishing popular blog posts or helping people on Talk), and has been used as a criteria for Community Council and other elections. Karma also helps Nokia to qualify community members, to find the people who should have access the developer devices for instance. In a large community it is hard to identify the people who are just loud and the people who are doing actual valuable contributions from each other without such tools
- Social News and Planet are a way for the community to aggregate and promote important posts around the project. We look at things like social bookmarking, blog links and votes happening on the Maemo site to determine the most important stories of the day, to provide an "automatic newspaper" for the project
Providing all or some of these services as part of the MeeGo infrastructure would enable the community to feel involvement, and even ownership in the new project that is shaping up. This is critical for a project that has such a big reliance on new innovation and connectivity with the upstream, especially at the time of such big change.
Inkscape in action…
Posted on 2010-02-14 15:11:09 GMT.
Some of you might have a hunch of my interest in aviation and airplanes, so it's no wonder I wanted to help our aviation club a little. The two-seater trainer aircraft was in a desperate ned of a new paint, and we wanted to have a new color scheme at the same time to freshen up the appearance. There were some restrictions for simple financial reasons, so the plane was to have a white base paint and all the color stripes would be done with stickers. Nevertheless I am pretty happy with the result.
I first went to the airport and took some pics of the her side profile with my N900 and sketched some ideas with pen and paper and finally in Inkscape where I opened a 5.5 meter by one meter canvas...
The flight manual of the plane contains a three-way view of the aircraft, so scanned the page and used Inkscape's excellent tracing tool to turn it into a base for my design, and resized it to the corrent size of the aircraft.. This must have been the largest canvas size I have had so far in a design project...

Design work done in Inkscape
The design evolved a quite a bit and I always had a bunch of the latest sketches in my N900 to show to club members who gave me good feedback... And eventually we had something we were happy with, and a PDF file of the design was sent to the paint shop a while ago. Stripping a plane from the old paint is quite a lot of work, and takes a while, so they sent us back some photos of the work in progress..

Aircraft partially disassembled before paint stripping

Paint stripped, masked for spraying

Empty canvas!
And finally today we got the much anticipated message in our mailboxes, the work was nearing completion!

Stripes in place!
It's always nice and rewarding to see a design work transform from bits and bytes into something physical. Even better if you can strap yourself into it and go flying...
Time to update some on openpsa and voip ..
Posted on 2010-02-11 20:37:49 GMT.
As we restarted our old company into Kafit AB we are trying to make a new focus on VoIP and openpsa.
Will be fun to have more time to sell and maintain projects that has been in the background for a couple of years.
First thing on spare time is to continue to make integration between our pbx system and openpsa. And se if we can open up the pbx system some to more developers.
If anyone has any leads on companies that might need a pbx that can integrate with their on systems please give me a call :)
Buzz may end segregation in microblogging
Posted on 2010-02-10 20:16:11 GMT.
Yet another interesting launch this winter: Google finally published their lifestreaming application, Buzz. These are still clearly early steps for the service as it doesn't provide any APIs yet, and the user interface feels slow in a quite un-Google-like way.

- Language filtering. I had to unfollow some Portuguese-speaking friends already
- Discovery of interesting discussions. Now I only see things my friends post, not the things they comment
- Groups or channels people can post to
- and yes, Salmon so comments to my posts on Buzz will trickle down to Qaiku or my blog
Halti.com provides contextual product recommendations
Posted on 2010-02-10 15:33:05 GMT.
Last week the Finnish outdoor brand Halti launched a pretty interesting web service. While many outdoor brands focus on extreme sports that don't really have much to do with the reality of most of their customers, Halti connects their product lineup to the needs of the site visitor by utilizing both weather and location. This means where ever they are or are planning to go, they can get product recommendations personalized to their needs:

This is another case of location context being used to serve users better. To figure out where the user is coming from the site uses a combination of IP positioning and browser geolocation, while weather information comes from Foreca's feeds. Map visualization uses CloudMade's OpenStreetMap-based maps. And of course the whole thing runs on the stable Ragnaroek series of Midgard.
In other news, Jos et jaksa is another pretty interesting recent site launch, especially for the fact that it is the first-ever website running on the legacy-free Midgard2 platform and Midgard MVC.
Vala bindings for Midgard2
Posted on 2010-02-10 11:57:35 GMT.
Today I got some help on #vala irc channel (thanks nemequ!), and I must say I am very happy to see Midgard API working with vala bindings. I am also happy cause in this case, there's no need to write bindings in C (as happens with PHP or Python bindings).
First of all, you have to have Midgard2 installed. Then, all you have to do, to have vapi file is to run simple script in vala directory . And finally, you can try example. Note, you must have database created. Midgard.Storage is excluded from vala bindings at this moment.
I hope to see mono bindings soon.




