Author: Jo Vermeulen

PyGTK GUI for the PhidgetRFID reader

I had some fun writing a Python wrapper around libphidgets for an RFID reader we had lying around here. To do so, I used ctypes (apparantly the Python bindings for libphidgets were broken). To check for a connected RFID reader, I interfaced with hal through dbus. Afterwards I created a simple GUI for the device with PyGTK.

Here is the result:

PyGTK GUI for RFID reader

I experienced some weird permissions problems though. The device could only be opened with root privileges. Takis helped me step through libphidgets to see if there was a bug in it. In the end, we solved it by changing the /etc/udev/rules.d/permissions.rules file (in my case it was called 40-permissions.rules). I’m not sure if there are any security problems with this though.

I changed these lines:

# USB devices (usbfs replacement)
SUBSYSTEM=="usb_device", MODE="0664"

to:

# USB devices (usbfs replacement)
SUBSYSTEM=="usb_device", GROUP="plugdev", MODE="0664"

I will probably put the code online when I have some spare time (and after I cleaned it up a bit).

EIS 2007 paper accepted!

Yesterday, we were informed that the paper we submitted for Engineering Interactive Systems 2007 was accepted. It’s also my first publication where I’m the first author

The paper describes a way to augment semantic service descriptions with high-level user interface models. The resulting service description is called a service-interaction description. This approach allows a service to present a suitable user interface (for interacting with it) on a wide variety of target platforms. We also introduce a semantic network built on top of the UIML vocabulary. More on that in a later post.

More details about the paper can be found at my publications page.

Uiml.net and Cassowary.net now in Launchpad

I just registered Uiml.net and Cassowary.net in Launchpad.

Launchpad automatically creates a Bazaar branch from the CVS repository, which allows me to maintain my work in Bazaar, while still importing changes from the Uiml.net CVS tree.

XML sit-ups with .NET

I’m currently writing some C# code that outputs RDF/XML from a set of classes, and came across some annoyances regarding .NET’s support for XML namespaces (or the lack thereof).

First of all, .NET has only explicit support for one namespace per element. Additional namespaces must be specified by adding an extra xmlns attribute yourself. Well, that’s not so bad, but it adds to the code bloat.

When you want to use namespaces to create new elements (e.g. rdf:Description), you have to explicitly pass the namespace URI again. Otherwise the prefix (in this case rdf) will be ignored. It would be helpful if .NET could check to see if the prefix corresponds to any namespace previously specified in the document root.

Okay, I could have used an RDF library, but this was supposed to be a quick hack, so I didn’t have time to learn another library.

I can’t help but think that if I would have just used strings instead of the System.Xml classes, the program would have been finished sooner. Come to think of it, I should have known better and just used N3 or Turtle.

When using .NET’s XML classes, it seems like half of my code is redundant. Man, do I miss Ruby‘s XML Builder.

I’ll end with a great graphic by Why the Lucky Stiff, in which he compares using XML to doing annoying sit-ups:

XML situps

The term XML sit-ups also appeared on the Ruby on Rails homepage:

Rails is a full-stack, open-source web framework in Ruby for writing real-world applications with joy and less code than most frameworks spend doing XML sit-ups.

The common idiom with dynamic languages is to write configuration scripts or domain-specific languages in the language itself, instead of using XML. Compared to e.g. Java, XML is more agile and flexible, but that is not the case with dynamic languages such as Ruby or Python. XML.com has an interesting article about this issue.

EDM News

It’s been a while since my last post, so this is a quick update of what’s been happening lately.

On Monday and Tuesday the TAMODIA 2006 workshop was hosted at our institute. I joined a few interesting sessions. It was nice to meet again a lot of people I saw earlier this year at CADUI 2006. We also had an interesting keynote by Joëlle Coutaz.

Yesterday, my office mate Jan succesfully defended his dissertation, titled High-Level User Interface Models for Model-Driven Design of Context-Sensitive User Interfaces. So we can call him dr. Jan now

Johan Nulens joined the EDM team as well, and is now working in the Computer Graphics group.