Motorcycle Adventures and Free Software

Weblog: Archive

2007-07-01 - 2007-07-31

When a holiday gets "interesting"

Posted on 2007-07-04 22:19:10 UTC in 60° 10.524 N 24° 55.146 E Helsinki, FI to . 0 comments.

My holiday motorcycle trip of this summer was an interesting one, in the Chinese sense. The plan was to first ride to Switzerland to attend the first Haidong Gumdo European Championships, and then continue from there together with Juha to Montenegro. As it happens, Juha never got his motorcycle working, and my trip was filled with various adventures and misfortune, but also with friendly people and beautiful scenery.

I left Helsinki on June 9th, heading south following the Via Baltica. My first stop was to Lodz to meet Piotras, the Midgard core guy. From there I followed the nice, curvy country roads of Poland to see Natka and her new country-house near Jelenia Gora.

In Pokrzywnik

Unfortunately I lost the sense of what bike I was riding, resulting to a tumble in a dark, tight corner. So, the next day was spent repairing the bike and getting my arm x-rayed.

From Silesia my trip took me to Czech Republic, and I stopped for the night in the city of Karlovy Vary, destined to be the site of the worst adventure of the trip. I went out for dinner, after which I ran into a local girl who invited me to join her for a drink. Soon we were joined by another local woman. After some chat with them, and a couple of drinks, I suddenly lost consciousness.

The next thing I realized was that I woke up in hospital, filled with plugs and pipes, cell phone and Nokia 770 stolen and with no idea of what had happened. Apparently my drink had been spiked. I was struck with paranoia and just wanted out and away. The staff didn't speak English, but after some attempts I was able to convince them in a combination of German and Russian to let me leave. Once out, I took off towards the border as quickly as I could.

In Switzerland I was able to get a new cell phone, and got a rather unpleasant call from my credit card company: the thieves had withdrawn 9,900 EUR (about 13,500 USD) from my card, and the company wanted the money back. I'm still wondering what to do about this, as insurance doesn't protect from it.

Hdgd Championships Swiss Sworddancing

The Haidong Gumdo championships themselves were a well organized and nice event. While my personal performance was hindered by the aftereffects of the drugging and lack of practice on the trip, Team Finland brought home two medals and we had a lot of good time meeting Haidong Gumdo practitioners from other countries. The Night of the Sword gala contained some of the most amazing swordsmanship I've ever seen, although the video doesn't do it full justice.

After the competition I stayed at Michi's place, chatting about various things and getting some encouragement to continue the trip despite the catastrophic drink-spiking incident that had left me without credit cards and feeling physically very weak. At this point it became apparent Juha wouldn't be able to join me, so I switched Montenegro for riding back home via Hungary and Romania.

The next two days were pleasant riding in the Alps. Old towns and castles, mountains and curving passes.

18062007075.jpg

But after visiting the Neuschwanstein castle, misfortune again caught up with me, this time in form of an engine failure. A valve seat had became loose, making piston and exhaust valve collide. This obviously required new parts, leaving me looking for Enfield shops in Bavaria. With the help of my "ground staff", I got the bike towed to Iwan-Bikes, the Enfield dealer near Munich. They had the parts needed, but not the time so we made the deal that I would disassemble the cylinder head, and they would change the parts and put the bike back together. Two days after the engine failure I was back on the road, riding in Austria.

After rainy and a bit cold Austria, entering sunny Hungary was a pleasure. I stayed with Ferenc's family at the lake Balaton, enjoying swimming, local cuisine and home-grown wine.

Bergie Resting At Lake Balaton-1

Romania showed itself to be quite a contrast to the Hungarian plain. Coming from a hot, flat land, I was suddenly again riding in mountains. A fascinating country where almost half of the traffic consisted of horse carriages. In the border town of Suceava I felt a bit torn: whether to head home, or make a detour through Moldova and Transnistria to Odessa. Following the old guideline of "A pig who doesn’t fly is just an ordinary pig", the decision was easy. But again fate took part in the game.

I was riding in the borderlands between Romania and Moldova when the engine decided to stop again. Luckily a border patrol was close and helped me to get the bike towed to nearest city, which in this case happened to be Iasi. After a night in one-star hotel I limped the bike to nearest car repair shop. They didn't understand much about bikes there, but the shop's owner was very friendly and helpful. Some phone calls were made, and soon I was in a motorcycle repair shop explaining the problem.

26062007134.jpg

The guys started working on the bike immediately, and after couple hours said I could ride. I thanked them, packed the bike and headed west through the city. But in two kilometers the engine failed again, and I limped back to the garage. A new repair attempt was made, more successfully this time, but as it was already late the guys invited me to stay with them and to go to a gathering of local bikers.

I spent the night drinking and chatting with the group, and in the morning left with the bike towards Ukraine, the rest of the trip going without incident. I visited Lviv, a city I had seen the last time during the Orange Revolution, and then crossed to the Polish side of the border.

Riding To Sunset In Ukraine

Riding in Poland already felt almost like home, and soon I was back on the familiar Via Baltica, taking me through Lithuania, Latvia and Estonia to the port of Tallinn, and on a ferry to home. At this point getting back felt really welcome, as can be imagined.

More photos can be found in my Flickr gallery.

Technorati Tags: , , , , , ,

Sponsored links

Microsoft Certification Exams save money using, phone card

Making Midgard Wiki easier

Posted on 2007-07-09 14:10:02 UTC in 60° 10.524 N 24° 55.146 E Helsinki, FI to . 0 comments.

Since Maemo.org started using the Midgard wiki component there has been discussion on whether it is feature-complete or easy enough to use. Main complaints have been about the "latest changes" view not supporting sub-wikis and missing Markdown documentation.

Latest updates are now shown in a way quite similar to MoinMoin:

Wiki-Latest-Updates

Markdown should be easier to edit with the toolbar:

Wiki-Markdown-Toolbar

Markdown syntax reference is available by clicking the help icon in the top-right corner of the toolbar:

Wiki-Markdown-Cheatsheet

The Markdown toolbar is based on Control.TextArea and is available to any datamanager2 field using the "markdown" widget type. Similarly, the "Change message" field is a regular text field of type "rcsmessage" that will update the revision control service.

Updated 15:24: Since preview was also a popular request I've added that too:

Wiki-Preview

Note: this has been tagged to appear also on Planet Maemo since the changes discussed here were requested by them.

Technorati Tags: , , ,

Midgard and international URL transliteration

Posted on 2007-07-10 13:42:06 UTC in 60° 10.524 N 24° 55.146 E Helsinki, FI to . 0 comments.

Midgard has been an early supporter of internationalization in open source CMSs, adding UTF-8 support already in 1999. Today I however got an innocent request:

One thing to be considered is i18n and Unicode support, since the community wiki is the perfect place to host translated docs.

I was quite confident that things would work out OK, but knew that the Wiki component had had only minimal internationalization testing and so could have had issues. So I went and created some pages in Russian, Georgian and Arabic. So far so good:

Wiki-Russian

All Wiki functionality worked as you would expect. Wiki links, Markdown formatting, backlinks, even version comparisons:

Wiki-Arabic-Diff-1

One issue remained, however: MidCOM has functionality for generating nice, readable URL names from object titles. This functionality depended on the PECL translit extension which, in our tests, proved to be troublesome with some languages.

After a bit of googling we ran into the PHP UTF-8 project, and more specifically to its utf8_to_ascii tool that is a PHP port of the Perl Unidecode package. This library was small enough to be bundled into MidCOM itself, removing the dependency of an additional PHP extension, and seemed to cope with various languages much better.

The results were not perfect, of course, but at least West European and Scandinavian languages, Russian, Polish, Greek, Maori and Amharic worked perfectly. Arabic, Hebrew, Chinese, Korean, Thai and Viet produced results that were possibly correct. Japanese (hiragana and katagana), Devanagari and Georgian did not work at all. A good start nevertheless. Here are some tests:

Utf8-Transliteration-Tests

Technorati Tags: , ,

Finnair's excellent SMS check-in service

Posted on 2007-07-13 11:21:58 UTC in 53° 28.734 N 2° 14.249 W Salford, GB to . 0 comments.

This is probably old news to most, but since I usually fly SAS my flight yesterday to Manchester for the State of the Map and GUADEC conferences was the first time I ran into Finnair's check-in SMS service.

I was sitting in a meeting about three hours before the flight and suddenly got a message to my cell phone:

FINNAIR check-in: AY937 Helsinki-Manchester 17.07.2007 departure 16:00 seat 15A window. Confirm by replying A.

Since this seemed like a useful service I replied, and immediately got a confirmation for the seat.

Finnair Embraer

At the airport I then dropped my bag to a luggage drop point, and just walked to the gate. No boarding passes or any other papers beside my passport were needed. And few hours later I was in central Manchester, looking for a hotel.

This is a very good way of providing an SMS service. The usual way these services work is that the user has to remember a number and an obscure syntax for typing the request. On Finnair's service this is not required as the SMS service is initiated from the service provider's end and user is clearly told what to do if they want to continue. Opting out is done by just ignoring the message.

And since probably most recipients of the message will find it useful, it doesn't get considered SMS spam.

Technorati Tags: , , ,

Notes from the State of the Map conference

Posted on 2007-07-15 15:35:39 UTC in 53° 28.776 N 2° 14.929 W Salford, GB to . 0 comments.

State of the Map, the OpenStreetMap conference was held this weekend in Manchester University, with about 100 attendees.

Manchester Humanities Lime Grove

OpenStreetMap is a project to create open content digital maps of the world. Most map data is currently closed and controlled by various organizations under copyright, making it unavailable or prohibitively expensive for open source or experimentative use. An open map can be used anywhere and kept up-to-date with the changing landscape quite easily.

In addition to creating street maps, OpenStreetMap, being a noncommercial entity can also map things that most commercial navigation companies are not interested in: many OSM contributors are focusing on mapping cycle or hiking routes and waterways. Free-maps is a site that even provides a hiking-oriented rendering of the OSM data overlaid with SRTM contours and elevation data from NASA. Something similar would be easy to do for motorcyclists, highlighting scenic areas and twisties.

Creating the map

What surprised me about OSM is how well the project is actually progressing. In the three years the project has been running, the number of contributors has risen on the same scale as Wikipedia in its first years. Here are some status reports of various countries:

  • United Kingdom is now at estimated 50% completeness, and the project has the target of finishing the country by mid-2008
  • Spain has been starting a bit slowly, but IGN, the national mapping agency recently announced support for the project which should bring the country to completeness quite soon
  • The Netherlands was boosted greatly by a Digital Pioneers grant to buy GPS units and arrange mapping parties, and now the main cities are quite complete. In addition, AND has donated complete map data for the country which will be imported to OSM soon
  • Bolivia has no national mapping agency and so is considering to use OSM as the authoritative map source used for elections

Openstreetmap-Amsterdam-20070715

Finland, unfortunately, is in a very early stage. Some of central Helsinki, and some main roads there, but most of the country is still Here be dragons territory. More publicity and some support could however boost this quickly. As an example, The Netherlands was still in the same stage four months ago.

OSM on mobile devices

We held a speech together with Andrew Turner of High Earth Orbit about GeoClue and position-aware services on mobile Linux devices. Linux devices like N800 and Neo1973 are available now, and GPSs are appearing more and more mobile devices.

But what is largely missing is position-aware services for them. Of course, most of them can browse maps with tile-based tools like Maemo Mapper. But where things will get interesting is when the publicly-available geodata and the position of the device are brought together to enrich various applications and services on the device.

The GeoClue project was started in order to make position information easily available for application authors. A simple D-BUS query, and the application can get the location of the device regardless of whether it comes from GPS, Plazes or some other service.

Geoclue-Architecture

KDE has also been working on some location-based tools and services for their desktop, built around the Marble map viewer. Hopefully we can share the efforts in the freedesktop community.

Route planning with OSM

In addition to being community-created and open, the OSM map data has one huge advantage towards using Google Maps and the like: it is vectors with proper metadata instead of just map tiles.

This means OSM data can be downloaded to a device and used for route planning. Gosmore is the first project that appeared to this space.

Routing with the data is reasonably easy by ditching data that is not relevant to routing (like buildings), and then running through the street network with either Dijkstra or A* algorithm, giving "distance penalties" for road segments depending on their type and speed limit.

A project in Norway had improved on this by implementing the concept of evaluations of road segments by special interest groups. For example, wheelchair users could evaluate roads on their suitability for travel by wheelchair, and then future routes of all wheelchair users would take these into account.

Maemo Surveyor

With current surveying tools and editors creating OpenStreetMaps is quite slow, especially for new contributors. An estimate was made that per each urban community of 1000 inhabitants, an hour of surveying and hour of tagging would be needed.

This statistic brought some discussion of having better tools for map-making. Our take on that would be the idea of a Maemo Surveyor, a mobile application recording the GPS tracks and enabling the user to tag them with road types and provide either a typed name, a voice note or a photo of the road sign.

The application would keep this in the OSM XML format to enable things like live Mapnik rendering in the future and make it easy to upload the data directly to OSM.

Maemo-Surveyor-Sketch

Now the app is just in mockup format but I believe it should be quite easy to implement with Glade, Python and GeoClue.

After our talk I got some interesting comments and ideas for the Surveyor application. A research group in Norway is thinking about sharing the mapping work over a Bluetooth or WiFi network: "I'll look up street names, you write down speed limits".

Similarly, there was an archeologist who commented that using more accurate surveying GPSs, the same surveying application with a different set of pre-set tags could be very useful in mapping dig sites. The OSM format would even make it very easy to share and visualize maps of various sites.

I'm looking forward to getting hold of a copy of Glade to play with the ideas.

Completely unrelated, I learned that reversing the colors on MacBook screen with the Ctrl-Alt-Command-8 key combination can make the battery last a lot longer.

Updated 2007-07-16: Slides from our GeoClue talk are now available:

See also Mikel Maron's or Andrew Turner's conference notes and the conference group shot.

Maps in Midgard, abstracted

Posted on 2007-07-16 11:06:20 UTC in 52° 28.758 N 1° 54.224 W Birmingham, GB to . 0 comments.

We had some discussion about what features make CMS a GeoCMS with GeoPress and Drupal geo developers in State of the Map, and a list should be published soon. Based on our discussions I decided that Midgard should also make it easy to actually display positioned data on maps.

To make this happen, the Mapstraction javascript library was chosen. Mapstraction is nice in that with it site builders can use same API to display maps from OpenStreetMaps, Google Maps, Microsoft Virtual Earth or other providers.

During train ride from Manchester to Birmingham I made a quick PHP wrapper to make map display even easier.

Now to display an object on a map site builder only needs to do:

<?php
$map = new org_routamc_positioning_map('my_example_map');
$map->add_object($article);
$map->show();
?>

Multiple objects and arbitrary map points can also be shown:

// Add some positioned objects
$map->add_object($article);
$map->add_object($another_article);

// Add arbitrary marker
$marker = array
(
    'coordinates' => array
    (
        'latitude' => 52.4827,
        'longitude' => -1.89739,
    ),
    'title' => 'Bergie',
);
$map->add_marker($marker);

Grab it from SVN while it is hot!

GeoClue is appearing

Posted on 2007-07-20 21:03:22 UTC in 60° 10.524 N 24° 55.146 E Helsinki, FI to . 0 comments.

Last weekend and this week I've been off to State of the Map in Manchester and GUADEC in Birmingham to speak about the GeoClue project with Andrew Turner and Tuomas Kuosmanen.

GeoClue is a system for giving easy access to location information for applications over the D-BUS. Lots of people have shown interest in adding geographical awareness in their software, and I really think GeoClue is the right way to move forward, especially for mobile devices.

Geoclue-Large

Consider the following Python code to get current location:

# Access the D-BUS session bus
bus = dbus.SessionBus()

# Get an interface for the GeoClue master (which will talk to appropriate backend)
proxy_obj = bus.get_object('org.foinse_project.geoclue.position.master', '/org/foinse_project/geoclue/position/master')
geoclue_iface = dbus.Interface(proxy_obj, 'org.foinse_project.geoclue.position')

# Get the coordinates from the service
coordinates = geoclue_iface.current_position()

Caveat: the code might not work exactly like this, but instead may need a bit of tweaking. I'm sorry but I'm currently without an N800 to test on. C code in any case is as easy as:

gdouble lat, lon;
geoclue_position_init ();
geoclue_position_current_position (&lat, &lon);

Traditional methods to get location would require a lot more code and would be hardcoded to just one position source, like GPS. GeoClue can provide lots of different back-ends, including Plazes and HostIP in addition to the common gpsd.

While we were talking to application developers, Jussi Kukkonen, the Google Summer of Code student I mentor was also busy. He made a new GeoClue release, which is the first one to give the system a real UI. Good stuff!

Geoclue-Selecting-Backend2

Thanks to Jussi for the hard work, and to Andreas Nilsson for the GeoClue icon featured earlier in the post!

BTW, When I upgraded my blog to new layout and structure last January I left commenting out pretty much for the same reasons as what Joel Spolsky outlined in his post. People who really want to discuss my post will anyway either contact me by email or comment on Jaiku.

Technorati Tags: ,

Calculating news item relevance

Posted on 2007-07-25 12:38:54 UTC in 60° 10.524 N 24° 55.146 E Helsinki, FI to . 0 comments.

I've started working on a new Social News section for maemo.org. The idea of this area is to provide a centralized view on what is happening at the moment in the maemo community.

Every day brings dozens of maemo-related posts via various channels, and keeping up-to-date with them requires a lot of time. The new social news section aims to fix this by providing a somewhat Digg-like news aggregator that will bring only the most interesting items to the top.

Interestingly, a new service called AideRSS went live today with quite much publicity. AideRSS is a new breed of RSS aggregator that uses various metrics to determine the relevancy of new items. This is what AideRSS says about most interesting stuff now on Planet Maemo:

Aiderss-Ranking-Planetmaemo

While I don't have access to their secret sauce, using a bit similar metrics I get quite similar results as well:

Org-Maemo-Socialnews-Ranking-Planetmaemo

The way the new org.maemo.socialnews score calculator works is that it looks for number of votes or links from various sources, gives them configurable weight, and then builds a relevancy value out of that. This seems to work quite well, although I guess I will end up tuning it quite a bit when we start syndicating larger amounts of data.

In any case, the next challenge is to combine the relevancy data of items and their tagging/categorization to build a newspaper-like page. Actually, feeding this data to a proper newspaper generator could make interesting results as well.

Technorati Tags: , , ,

Geoweb of the future

Posted on 2007-07-25 13:51:04 UTC in 60° 10.524 N 24° 55.146 E Helsinki, FI to . 0 comments.

Bruce Sterling is running a fictional geoblog Dispatches From the Hyperlocal Future on Wired. Much of it deals with the possibilities that the connection between GeoRSS, Microformats and neogeography with mobile devices will bring:

You see, the difference between the old-fashioned semantic Web and the new hyperlocal Web — that's hyper as in linked, and local as in location — is that the databases of the new Web are stuffed with geographic coordinates. Real positions. Real distances. So the bodyware I carry in my pockets and travel bag broadcasts its location to any device within earshot. (Of course, the RFID chips embedded in everything help the manufacturer get it out the door, but I programmed my own tags so I can't lose anything.) Roomware — that's houseware to you troglodytes who still live in houses — is the stuff that runs a hotel room. You know, the remotes that control temperature and unlock the liquor cabinet, plus the window overlay that displays the weather forecast and traffic conditions. Streetware is my mobile's navigator, plus social tags, ad filters, and all those black-and-white barcode blotches painted on walls like graffiti. Cityware is the next scale up. That's how the local government monitors traffic, chases down leaky water mains, and keeps tourists on the straight and narrow. Stateware, nationware, globalware — you get the idea.

Geopresence aggregation gets mentioned as well:

I'm dictating this entry — thank heaven for voice recognition — from the passenger seat of a Hyundai GPS-King careering along the Beltway. I downloaded a cool plug-in to block out the gas-food-lodging ads that hit my screen a quarter mile before each exit, so I'm free to concentrate. What do I care about lodging anyway? The best thing about being a top-tier geo blogger is that everyone knows where you are. When the buddy list tells folks you're in town, they ping to offer you dinner and invite you to sleep on the couch. They're my homies in a world where the entire planet is home. I love all you guys!

Much of the technology mentioned in the blog exists already today, but I guess it will be the blog's 2017 before the technologies are integrated and ubiquitous enough to really change our lives, cellphone-like.

Via Boing Boing.

Nicer code editing in Asgard

Posted on 2007-07-26 18:39:52 UTC in 60° 10.524 N 24° 55.146 E Helsinki, FI to . 0 comments.

Asgard is the new administrative interface being built for Midgard. The main objective is to get rid of the legacies of Aegir and SpiderAdmin by replacing them with a smart system that auto-generates admin UIs for all installed MgdSchema types. But small improvements also count, and so we decided to deploy CodePress for code editing:

Asgard-Codepress-Style-Editing

Syntax highlighting definitely makes life easier when editing site style with a browser. While we were at it, we also decided to guard against PHP parse errors, making it validation rule about it. Now the editing tool refuses to save until errors are fixed (needs localization message, though):

Asgard-Codepress-Parse-Error

Arttu also went and implemented CodePress for style attachments like CSS, Javascript and XML files:

Asgard-Styleeditor-Edit-Css

The Asgard user experience starts to be already quite nice, although the visual outlook could use love and some bugs still remain. I'm quite confident we can ship it as the default admin UI soon.

Technorati Tags: , , , ,

Next Midgard will be PHP5 only

Posted on 2007-07-31 07:56:18 UTC in 60° 10.524 N 24° 55.146 E Helsinki, FI to . 0 comments.

Support GoPHP5.org

It took us a while to get here, but Midgard is finally entering a release cycle which will drop support for PHP4. The reasons are quite clear: simplicity and speed.

The whole PHP4 end of life business has caused quite a bit of discussion in the PHP community. Especially Matt Mullenweg from WordPress has raised vocal opposition. Commenter Johan Delinger said well:

The problem of PHP 4 is its own success. Its so big of a success that it is hard to get people to the (sometimes incompatible) next generation versions. It is definitely the apps working with PHP 4 that drive people to use PHP 4, not PHP 4 itself. If crucial apps, like phpMyAdmin were developed for some other technology at their time, then that would become the de-facto everywhere installed programming environment to work with.

Why Midgard can choose

Midgard's situation differs quite a lot from most other PHP applications. Since much of Midgard works on Apache module and PHP extension space the users of the framework are not usually relying on hosting providers and their versions but instead run their own servers.

This makes us free to focus on the PHP version (and other dependencies) that work best with our framework. Midgard core developer Piotras has estimated that some Midgard functionalities like Query Builder will be substantially faster on PHP5.

An important point also is that the PHP part of Midgard is MidCOM, a quite large object-oriented component framework. While MidCOM has been possible to develop on PHP4, new OOP features in PHP5 will make the code much easier to develop and understand.

March to Midgard 2

Another reason for making the PHP5 switch now is that Midgard 2 is coming soon. I wanted to have a Midgard 1 series release requiring PHP5 before that just to play safe. Otherwise many users would find themselves trying to upgrade to PHP5 and Midgard2 at the same time, never knowing which one was causing a problem with their code.

Back