Motorcycle Adventures and Free Software

Weblog: Archive

2007-01-01 - 2007-01-31

Helsinki to provide WiFi hotspots in public transportation

Posted on 2007-01-03 11:34:18 UTC to . 0 comments.

The City of Helsinki, despite some of its failings, is also doing some cool stuff. Examples include promotion of greener rail traffic, and increasing number of free WiFi hotspots.

So far these have been stationary, but now Helsinki City Transport is piloting WiFi in buses and trams. Helsingin Sanomat reports:

Some Helsinki buses and trams will deploy wireless internet access in January. Trams and buses providing access can be recognized by the WLAN signs at the doors.

...

According to Helsinki City Transport planning director Ville Lehmuskoski HCT is ready to increase wireless connectivity quickly in its vehicles if the pilot is successfull.

Great! Now the only question remaining is how to mark a moving hotspot in Plazes.

Sponsored links

save money using, phone card

Nokia's new N800 Linux Tablet

Posted on 2007-01-07 13:43:32 UTC to . 0 comments.

N800, the successor to Nokia's 770 Maemo-powered Linux internet tablet was apparently unleashed yesterday by CompUSA. While Nokia's site is still quiet on the new device, there are already unboxing pictures out there.

I've been using my 770 quite actively as a mobile internet terminal since I got it in February last year. While the software is occasionally buggy, it still beats lugging my MacBook around or trying to browse the web with my cellphone.

In addition to browsing I'm using the Jabber/Google Talk feature of the device quite often, and also sometimes watch movies on the go with it. There are other cool apps, too, and when my hard drive died and on the Death Monkey Rally, 770 was my only computer.

While the current uses make the device already quite useful, I'd love to use it as a Hitchhiker's Guide to the Galaxy, automatically finding Wikipedia information about things near me. When Maemo-Blog improves a bit, the device may also become an useful tool for maintaining a travel journal, especially since the application is able to communicate my coordinates to the blog.

As WiFi is becoming more ubiquitous there definitely is demand for small and portable internet access devices. The new device has more power and is reputedly more stable, and so sounds like a worthy upgrade. In addition to buying a couple for the company, I'd love to get one for Piotras in order to get Midgard libraries ported there.

Resource bookings with Midgard

Posted on 2007-01-09 16:02:36 UTC to . 0 comments.

Resource booking component net.nemein.reservations has been finally converted to MidCOM 2.6 technology. The component allows users to browse available resources, their reservation calendar and make new bookings.

Browsing resources

Default usage scenario for the component was meeting room bookings, but the component has been designed so that adding other types of resources like cars or cabins is just a matter of editing a datamanager2 schema.

Resource's reservation calendar

I haven't released the package yet as I want to first wait for test results from a couple of customers. Tomorrow we will pilot the component for airplane reservations at the aviation club.

Booking a new resource

Midgard replication service starts to shape up

Posted on 2007-01-17 12:13:53 UTC to . 0 comments.

Midgard has had replication capability since late 1999. First replication was handled with the Repligard command-line tool. Then in 2005 we got the Java-based Exorcist tool that was able to do cross-CMS replication. But both of them suffered from being slightly external of the normal Midgard environment.

With Midgard 1.8.1 there is now an integrated Midgard Replicator system that provides replication API on both C and PHP levels.

To support that we've now been working on a midcom.helper.replicator library that handles the issues of solving what to replicate, where and how. The library has been made with a modular toolbox philosophy where each replication pipeline is stored as a "subscription" that defines what exporter, transporter and importer should be used.

Some example cases here:

  • Staging/live: the subscription is configured to use an exporter that checks for object approval before exporting, and a transporter that directly sends the data to the live server via HTTP

  • Automatic backups: you can create a replication subscription that will send all database changes as XML packages to your Gmail account for free off-site backup

  • Collaboration on specific items: we could define a "wiki collaboration" exporter that you could use to exchange wiki pages between other project parters

Now the export and transport ends are mostly done and we're today focusing on integrating the importers with the MidCOM DBA layer to get the benefit of watchers, ACLs and other checks in the import end.

I'll update this post with more details as we go.

Random thought: Midgard vs. Drupal communities

Looking at Ohloh statistics, Midgard has had 38 contributors since 2001 when we switched repositories, while Drupal has had 589 contributors. With this huge disparity of numbers it is a bit difficult to understand how Midgard has 207 person years behind it, while Drupal only has had 113. Midgard also has a lot more code. I guess Midgard contributors just are more productive. Maybe this has something to do with the power that the framework gives us?

Getting started with Microformats

Posted on 2007-01-17 13:24:30 UTC to . 0 comments.

Microformats are a cool way of making web content machine-readable. Since the formats rely on classes, they also ensure the content has all the hooks needed for good CSS design.

Microformats can be understood by aggregators like edgeio and consumed with software like Firefox 3 and the Tails extension for Firefox 2. We have been introducing Microformats to all sites and applications we've produced since mid-2005.

However, I've noticed lots of customers and even web professionals are not really aware of Microformats yet. For them, here is a great introduction by Alex Faaborg:

Setting Adium status from a microsummary

Posted on 2007-01-19 16:55:18 UTC to . 0 comments.

Firefox 2 provides an useful feature called Microsummaries. Microsummaries enable users' bookmark labels to get automatically updated based on data on the site. This site provides my Plazes location and latest Twitter message as a microsummary:


Before this I've been using a script to populate my Plazes location to the Adium instant messaging status, but now I though the combination of position and status would be better here too. So I whipped up this quick AppleScript:

-- Bergie's blog summary updater
-- It reads the microsummary of a web page via Lynx and
-- then sets it as the Adium status line
-- Set the URL of your Microsummary page here
set summaryUrl to "http://bergie.iki.fi/status/microsummary/bergie"
set microSummary to do shell script "/opt/local/bin/lynx -width 500  -dump " & summaryUrl & "|iconv -f ISO-8859-1 -t UTF-8"
set locationSummary to findAndReplace("Henri Bergius, in ", "", microSummary)
tell application "Adium"
set my status message to locationSummary
end tell
on findAndReplace(tofind, toreplace, TheString)
set ditd to text item delimiters
set res to missing value
set text item delimiters to tofind
repeat with tis in text items of TheString
if res is missing value then
set res to tis
else
set res to res & toreplace & tis
end if
end repeat
set text item delimiters to ditd
return res
end findAndReplace

I set this to be run when I connect, and here are the results: 

Midgard developer meeting, winter 2007

Posted on 2007-01-21 00:11:35 UTC to . 0 comments.

This winter's Midgard meeting has been a bit different than the usual fare. Instead of running the session only in one place, the meeting already started last monday with work on the new replication framework and a dinner with Helsinki-based Midgardians. Then after the week spent on replication we packed our team to a Land Rover and drove to Linköping for the actual event.

Ferry trip was quite eventful, as usual, and so on friday most were quite tired and hung over. But even with that, discussion has been very interesting and there has also been quite a bit of code.



First topic discussed on friday was the new help system Anykey is building for Midgard with the sponsorship of the .se foundation. We will make the documentation files more closely tied to component handler IDs, and link the help menu to tagged searches on the Midgard site.

Easier Midgard installation was a big topic in this meeting. For it we collected the gripes different community members had about installation and discussed ways to make it better.



The two major solutions for that are to make binary packages of Midgard more available for different distributions, possibly through EPM. But the main area that needs rethinking and rewriting is making a smart PHP-based Midgard database and configuration setup tool to remove Datagard.

We also held a session on MidCOM development, helping attendees to get SVN checkouts running on their machines, showing how to quickly create a first component, helping with localization work and making some mass cleanups into the repository.



The MidCOM roadmap towards 3.0 was also clarified, including move to Midgard pages, deprecating PHP4, restructuring dynamic loads and making indexer a service provided by the DBA layer instead of handled by components themselves. MidCOM 2.7 targets will however remain as they were: the release will be basically 2.6 plus collector, replication and multilingual site management.

Looking for a junior PHP/Midgard consultant

Posted on 2007-01-23 14:02:55 UTC to . 0 comments.

Nemein delivers browser based free software solutions. Our clients include some of the leading advertisement agencies in Finland as well as major private and public companies. Nemein is looking for a junior consultant to join our Midgard deployment team.

Skills required:

  • Must be fluent in XHTML, CSS and PHP (4 is required, 5 a bonus)
  • Some CMS experience, particular systems don't really matter
  • Ajax, Microformats, RSS and Web Standards knowledge would be great
  • Ready to work with clients

Most of the client projects happen in the Helsinki capital region. Because of this, good command of the Finnish language is a requirement.

Contact me for more information.

Updated: I thought to add that we're also ready to discuss with potential senior consultant candidates, even though the primary need is now for a junior. :-)

Personalized street advertisements

Posted on 2007-01-30 14:33:40 UTC to . 0 comments.

mini_rfid_ads_small.jpg Maybe I'm a neo-luddite, but this sounds a bit scary:

The boards, which usually carry typical advertising, are programmed to identify approaching Mini drivers through a coded signal from a radio chip embedded in their key fob. The messages are personal, based on questionnaires that owners filled out.

This sounds like we are approaching the Minority Report world:

Everywhere that John Anderton (Tom Cruise) went, his eyes were being scanned for identification. I'm not talking just about restricted areas - he was scanned entering the Metro, driving home from work, and even walking into The Gap. The advertisements called him by name: "John Anderton, we have the ideal vacation for you!" and "John Anderton, wouldn't you like a pint of Guinness?" But not even a pint of Guinness would have soothed my nerves after hearing my name called out all day long. If you thought spam was annoying, you ain't seen nothing yet.

The Mini story via Pondering Primate.

In related news, gestures in the iPhone will of course bring Minority Report -style computing for us too. I wonder when Nokia's Maemo devices get that too.

Welcome to my new blog

Posted on 2007-01-30 20:40:59 UTC to . 0 comments.

This is the latest iteration of my home on the web. I've had a website since sometime in 1994, and under this same "iki" address since 2001. This latest design was actually made in spring 2006 after our US trip, but has been waiting in mothballs for the right moment.

My website has an important communicative and archiving role for me. It serves in:

  • Keeping my friends and family up-to-date on my whereabouts
  • Archiving my personal life (in twitters, photos, blogs and locations) for my own use
  • ...and finally, providing a channel for communicating things happening in the Midgard and OpenPsa spaces

New features

The site now runs on latest and greatest versions of both Midgard and MidCOM. This upgrade does bring some features, but not much. I had actually implemented most of the new things already as custom scripts for the previous site version, which of course made upgrading more difficult. Now things like positioning, categorization, commenting and moblogging are standard features in the distribution.

Still, being a developer, I could not launch a new version of the site without bringing some new features on the table. These include:

The film strip is used to display either pictures from the week a page was written, or 10 latest pictures

Film strip and pictures from Brazil

Positioning is now powered by real, mostly Plazes-powered coordinates and a real database of cities and airports. This brings with itself some Microformat and GeoRSS goodness, like live maps

Positions on the blog entries

My contact information is available as a machine-readable hCard on most pages

What Tails extension understands of my contact info

The contact information card also has a simple informal status message powered by Twitter

The contact card

Also, less visually:

  • The same Twitter status message and my current position are also available as a Microsummary for Firefox 2.x, which in turn updates my instant messaging status

  • I'm providing OpenID information on the site, enabling http://bergie.iki.fi/ to be my identity when logging into multiple services

All of this happens in the realization that my site is used less and less in the traditional way of browsing to it, and more and more by different content aggregators like RSS readers, Planet aggregators and Microformat readers.

The design

So, while the design is seen by fewer people than earlier, I wanted to switch to a lighter design from the previous very black layout. While the great majority of my readers access the content using the RSS feeds, the white background should still make the site more accessible to the rest.

The supporting colors of the site are natural hues taken from the scenery of the Colorado River canyon. This should fit well with the numbers of travel pictures I'm publishing.

There is also my picture on the pages. I realised that it is actually nice to see who the author is, and so switched away from the anonymous picture of Caucasus Mountains into a picture of the Grand Canyon with me in it.

The old design:

The old, black design

The new design:

The new, earthy design

Midgard template

I'm maintaining the Midgard template for this site in the company SVN repository. I can however make a PEAR package of it available for those interested.

Performance

Unfortunately I'm still being hosted for free on Torben's old server that is soon to be decommissioned. This means that the site runs really, really slowly, and because it is a chroot environment I can't even do caching via Squid.

This part will probably improve when I move the site to FTC's Midgard hosting facilities. I'm also considering other options, like a cheap virtual server from Louhi.net.

Quick and dirty MidCOM caching with Cache_Lite

Posted on 2007-01-31 16:09:23 UTC to . 0 comments.

If you want to cache your MidCOM site, but are on a chrooted environment and so can't run Squid, one option is to use the Cache_Lite PEAR package. To do this, you must have access to the page elements used on your site.

Place something like the following to the <(code-init-before-midcom)> element:

    <?php
    // QuickNDirty output caching
    $GLOBALS['cache_enable'] = true;
    if (   array_key_exists('PHPSESSID', $_COOKIE)
        || $_MIDGARD['user']
        || count($_POST) > 0)
    {
        // Don't cache requests where a POST is made or where we have an authenticated used
        $GLOBALS['cache_enable'] = false;
    }
    if (in_array('api', $_MIDGARD['argv']))
    {
        // Don't cache net.nehmer.blog remote API calls
        $GLOBALS['cache_enable'] = false;
    }
    if (   $_MIDGARD['argc'] > 0
        && substr($_MIDGARD['argv'][0], 0, 7) == 'midcom-')
    {
        // Don't cache the midcom-some-action URLs
        $GLOBALS['cache_enable'] = false;
    }

    if ($GLOBALS['cache_enable'])
    {
        // Include the package
        require_once('Cache/Lite.php');

        // Set a few options
        $options = array
        (
            'cacheDir' => '/var/cache/midgard/www.example.net/',
            'lifeTime' => 1800
        );

        // Generate the unique cache ID
        $cache_id = md5($_MIDGARD['uri'] . ':' . serialize($_GET));

        // Create a Cache_Lite object
        $GLOBALS['cache'] = new Cache_Lite($options);

        // Test if thereis a valide cache for this id
        if ($data = $GLOBALS['cache']->get($cache_id)) 
        {
            echo $data;
            exit();
        }

        ob_start();
    }
    ?>

And edit the <(code-finish)> element to contain the following:

    <?php 
    $_MIDCOM->finish(); 

    if ($GLOBALS['cache_enable'])
    {
        $data = ob_get_contents();
        $GLOBALS['cache']->save($data);
        ob_end_flush();
    }
    ?>

Cache_Lite can be used for caching all regular content pages, but not attachments due to the way attachment serving is implemented in MidCOM.

Back