
May, 2007
29
May 07
Beyond World Peace
Riyo Mori, from Japan, was just chosen as the new miss universe. Not that interesting in itself, except that her deepest wish was not “World Peace” as is traditional for the often peanut-size-brained contestants of such pageants. No, Riyo wished for something much more…

Riyo wished for a solution for the tabs-vs-spaces issue. You know, should you, as a programmer, use tabs or spaces in your source code? It’s a discussion that has been going on for generations without any real solution. Wishing for something seemingly impossible to realize, yet a bit more realistic than world peace, resulted in instant gratification for Riyo.
People, the world has been freed of one of its main challenges. I sincerely hope that future misses universe (miss universes?) will keep hitting them out of the world with a stick, and “pull a Riyo” as I like to say. Inspired by Riyo, and who wouldn’t be, Nick Gravgaard solved the issue once and for all:
The solution then is to redefine how tabs are interpreted by the text editor. Rather than saying that a tab character will move the cursor until the cursor’s position is a multiple of N characters, we should say that a tab character is a delimiter between table cells in a manner more reminiscent of how they’re used in tab separated value (TSV) files.

This fundamental insight wiped out the tabs vs. spaces issue once and for all. And to make things even better, Nick implemented his idea in Riyo’s favorite editor: gedit. She will be pleased, Nick.
And with that, I would like to suggest the next world problem to be addressed: the use of stupid parameter, variable and method names in example code.
26
May 07
JamVM
JamVM is a new Java Virtual Machine which conforms to the JVM specification version 2 (blue book). In comparison to most other VM’s (free and commercial) it is extremely small, with a stripped executable on PowerPC of only ~160K, and Intel 140K. However, unlike other small VMs (e.g. KVM) it is designed to support the full specification, and includes support for object finalisation, Soft/Weak/Phantom References, class-unloading, the Java Native Interface (JNI) and the Reflection API.
26
May 07
Syntax Highlighting Editor Within Browser
Martijn Haverbeke has created a syntax highlighting editor within the browser. It highlights Javascript syntax. It works quite well. His implementation notes are here.

Quite impressive.
25
May 07
All Estonians Get OpenID
Estonia started issuing electronic Identity Cards (eID) in 2002 to its citizens. Those eID’s will be OpenID’s soon! Beta tests are running at the moment.
Although Estonia is a small country with just 1.37 million inhabitants more than one million Estonians and foreigners residing in the country will have an OpenID. Open.id.ee=Estonian eID. Those OpenID’s are very secure because smart cards are required which make phishing and identity theft impossible.
Besides being identity cards and OpenID’s those eID’s have a lot more functions. They contain two certificates for authentication and signing and a permanent email address which is forwarding emails to people’s real email provider; it is also used as a health card so there is no need for an extra card.
Other applications can be developed by using core components of the eID software. Estonians can use their eID for tax declaration, public transport, WiFi access, and even internet voting. Quite impressive actually.
Great! They should do that in Holland.
24
May 07
Applish Ruby on Rails Commercials
If you’re familiar with Apple’s “I’m a Mac, and I’m a PC” commercials, have a look at these two Ruby on Rails commercials. Actually these particular two (there are some more that aren’t that great) are not half bad:
Ruby on Rails and Java
Ruby on Rails and PHP
21
May 07
WebFS: the Case for RDF
One of the powerful parts of WebFS, as I see it, will be its metadata capabilities. Metadata is data describing data. For instance metadata about music can be artist information, song title, album, ratings and so on. For Word documents this can be author, date written, number of pages, number of words and so on. Traditionally file systems support a fixed set of this kind of data. In many operating systems these are file name, file size, last time change, time created, owner and permissions.
Recently however, files system are getting richer when it comes to the kinds of metadata they can store. This is caused mainly by the recent rise of the desktop search engine. Desktop search engines index the full text of word documents, powerpoint presentations and e-mails, but also their metadata individually. Results of searches improve as metadata of files improve. For example it would be possible to search for all songs, written between 1998 and 2002 by Madonna, which are longer than four minutes, which without proper metadata indexing would not be possible.
However, how does one represent metadata properly? A simple way is to use name/value pairs. For example:
title: What's the Story author: Oasis bitrate: 192 length: 4:52
However, this has some issues. If applications want to create their own sets of metadata that they can associate with files you can run into namespace issues. One application may use a metadata attribute called “length” for the number of pages, another for the length of a song in minutes. An XML format, which has support for multiple namespaces, would therefore be a better solution. There is one XML format in particular that was designed and proved very apt to represent metadata, it is called RDF: Resource Description Framework. RDF was developed as a foundation for the Semantic Web. The Semantic Web is an effort to represent data on the web in such a way that computers understand them better, so that they can reason with information on the web. Whether you are a semantic-web believer or not, RDF is a pretty nice format to describe resources. RDF, as the name implies, is a framework for describing resources. Resources are identified by URIs. Essentially an RDF document is nothing more than a list of triples: (resource, property, value) serialized in an XML format.
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF
xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
xmlns:dc='http://purl.org/dc/elements/1.1/'
>
<rdf:Description rdf:about="http://www.zefhemel.com">
<dc:title>Zef Hemel</p:title>
<dc:author>Zef's mom and dad</dc:author>
</rdf:Description>
</rdf:RDF>
There is an extension to RDF, called RDFS, which, essentially, adds a typing system to RDF. You can define classes and their properties, you can define sub-classes and so on.
So how would we apply RDF(S) to WebFS? Before I attempt to answer that question let’s first define some terminology.
Personally I think we should abstract from the idea of dealing with “files” in a file system. I would prefer the term “item”, or “data item”. Also I would like to use the term “container” for what is in a traditional filesystem called a “folder” or “directory”. The reason is that in WebFS it does not really matter how things are stored in the actual local file system, or if they’re stored on a filesystem at all (they may be stored in a database). It matters that they are data items. An e-mail is a data item, even if you store a thousand of them in one file — the file is a low-level concept that I would like WebFS to abstract from. My problem with the terms directory and folder are that they are very specific to documents. You put a document in a folder, but do you put music in a folder, or pictures? No, you put them in an album, or more generally: in something that contains something else — a container.
Alright, back to the question about how to use RDF within WebFS.
I propose to do this in the following way. Every item on WebFS will have its own, unique URI. Every item has a set of metadata associated with it. This metadata is represented in RDF. WebFS itself defines a base RDFS class called “Item” and a sub-class of that, called “Container”. Every data item will be of type Item or a sub-class of that. “Container” is a special kind of Item, namely one representing a set of other Items.
Then a whole bunch of Item sub-classes can be defined, some inheriting from Item directly, others from Container. Some examples could me: Music (inheriting from Item), Photo (inheriting from Item), PhotoAlbum (inheriting from Container) and so on. For these classes properties would be defined. We would also predefine some properties for the Item class, for instance: title, author, date created, permission, content type — the general set of metadata that would be valid for any kind of data item. Then for a Music class we could add properties like: album, year, song writer and so on. An example WebFS RDFS class hierarchy:
Item +-- Container | +-- PhotoAlbum | +-- MusicAlbum +-- Music +-- Video
We could standardize a set of standard Item types (such as Music, Video, Photo, PhotoAlbum). However, applications should be able to define their own types of metadata types too. A synchronization application should be able to add properties to current items for example (which RDF allows). An application called, let’s say, tagger for example may allow their users to tag any kind of data item they own. RDFS is very flexible in allowing this.
An example RDF description of a data item (plus some made-up synchronization metadata):
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF
xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
xmlns:dc='http://purl.org/dc/elements/1.1/'
xmlns:webfs='http://www.webfilesystem.org/specs/core#'
xmlns:sync='http://www.syncer.org/spec#'
>
<webfs:Image rdf:about="http://zuzia.local/~zef/webfs/tmpfs/iceskating.jpg">
<dc:title>iceskating.jpg</dc:title>
<dc:date>1176025423</dc:date>
<dc:creator>zef</dc:creator>
<webfs:mimeType>image/jpeg</webfs:mimeType>
<webfs:width>1024</webfs:width>
<webfs:height>768</webfs:height>
<sync:data>
<sync:SyncRecord rdf:about="sync:http://zuzia.local/~zef/webfs/tmpfs/iceskating.jpg">
<sync:lastSync>1176025400</sync:lastSync>
<sync:deviceId>hh-22-C00</sync:deviceId>
</sync:SyncRecord>
</sync:data>
</webfs:Image>
</rdf:RDF>
To make all this work there is one very important thing that every WebFS storage provider should adhere to: all metadata should be persisted. A WebFS storage provider should be able to persist an arbitrary set of metadata for each item, even if it does not use the metadata itself. The reason for this is to allow (client) applications to define metadata on items for their own usage, but it also means that the user could copy their photo albums on Flickr to, let’s say, OmniDrive and back without any metadata being lost.
Creating a metadata system with RDF is simple yet powerful. There are RDF libraries available for practically any platform. Once we establish this system we can see what the metadata system can be used for beyond what is described here. I can imagine using it for the permission system as well. We could define a “canBeReadBy” and “canBeWrittenBy” property on items, define who has read and write permissions to a particular data item.
16
May 07
Some Things are just Cool
Phil Morle is the former CTO of Kazaa who recently joined OmniDrive as their CTO. One of his reasons was, according to his blog post:
One idea really caught my attention and the vision is huge and important. When I met Nik Cubrilovic (Omnidrive’s CEO) in the Darling Harbour Starbucks he told me about his idea for WebFS – a standard for exchanging files on the web. Sounds a bit dull at first doesn’t it? But when you start to think about it for a little while it comes alive because it is one of those big ideas that has a profound effect on things.
I see WebFS as an important missing link in the software-as-services concept. As soon as services can start moving files around as easy as they do data today, some interesting new things will become possible and I am excited about being a part of that.
I am particularly interested in the idea that the user in a WebFS world owns their own files again. So if I sign up for the latest online document editing service, I am not having to lock myself in by storing my files with them also. Future apps like Google Docs and Flickr will become interfaces to our files and data, not the repository itself for our stuff.
This is him on Skype:

A true believer ;)
15
May 07
Recent Going Ons
I haven’t been blogging much the past weeks because I’ve been busy with different things. First I was in Oxford for a week. Then I spent a lot of time preparing my parents’ 25th wedding anniversary, which they celebrated last Saturday (yay!). We’ve organized to give them a week trip to New York, which they were very happy with. Tomorrow I’m leaving to Texel, which is one of Holland’s islands, for a short family holiday.
Throughout this time I’ve also spent quite some time looking at places for rent in the west of the country. It’s amazing how much time you can spend on that.
15
May 07
A Day of Pimpin’ my Mobile
It was not my intention, but you know how these things go. I’m considering switching my mobile provider and have been doing some research. Not only did I spend hours and hours comparing plans — today I also looked into flashing my phone. Those who know me a bit know I’m not the hacker type. I’m not somebody who spends days and weeks getting some exotic computer set-up to work. For me things just have to work and keep working. The same goes for my mobile phone.
However, my phone — a Motorola PEBL U6 — has been branded by T-Mobile, my current mobile provider. That means the logo is everywhere, including a nice “T-Zones” option in the middle of my main menu. That’s kinda annoying, especially if, for example, I would switch to Vodafone or some other company. So this morning I decided to look into flashing my phone. I heard the term before, I roughly had an idea what it was, but had never done it.
Now flashing (or reflashing), it turns out, is like reformatting your harddrive and reinstalling your OS. Except it’s faster, it only takes a few minutes. I’m on a Mac so all the Windows flashing software does not really work. But I found out there’s a nice Motorola on Mac flashing tutorial available. I found a recent flash file for my phone and flashed it, except nothing appeared to have happened when it was done. All the logos were still there. It turned I had just updated the software. If I wanted to replace the rest too (menus, sounds and all that stuff) I had to use something called an MP — a Monster Pack. I downloaded one and installed it and every looked, well, let’s say different. The background was moving like some kind of 3D shooter. The fonts looked crazy, the menu was completely different and I had a different set of applications available now. Not what I wanted, but we were getting somewhere.
What I feared might happen, happened trying the next MP: the phone did no longer boot. The screen just remained black. Luckily I was able to get back to the booter by holding * and # simultaneously while starting the phone and I could install another MP. After a few tries I found the default unbranded Motorola PEBL flash file, which is now running on my phone. Everything seems to work fine, I have no T-Mobile stuff in there anymore.
All this did take me the whole morning and a bit of my afternoon however, but the result is that I have now pimped my phone. I’m a regular sir pimpalot.
