Linux Incompatibility List

As I take stock of things in my life after our move to Innsbruck, I’m thinking about what to do with the Linux Incompatibility List. I think the site could grow in some ways to get people more involved with the life cycle of identifying what doesn’t work with Linux and then fixing it. There are also some tech changes that I could do. However, I’m also thinking that running the site is not part of what I want to focus on long term. It seems to have been pretty successful so far, having garnered a mention in slashdot and other news sites, and has seen a steady stream of modifications and additions.

Since the adsense from it nearly pays for the server that hosts it, I’ve also been considering the idea of selling it somewhere like sitepoint, but I’m a bit reticent to do that, because the money part of it has to be secondary to providing a useful service to the Linux community. I wouldn’t mind making some money off it, of course, although I don’t think it would be much but I would have to be certain that it “went to a good home” as they say. I wouldn’t mind having fewer advertisements even as things stand now, so I certainly wouldn’t want to see it “monetized” by being crammed full of ads.

Thoughts? Suggestions?

Slow networking in Ubuntu Feisty caused by avahi-daemon

Or, more accurately, by the new configuration of /etc/nsswitch.conf, as detailed in this bug report:

https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/94940

I got pretty frustrated hunting that down. I hope it gets fixed soon after the release of Feisty, because it’s supremely annoying to have a slow internet connection when you know that, well, it isn’t.

Startups and Pronouns

Aside from Paul Graham’s list of reasons not to do a startup on your own (http://www.paulgraham.com/startupmistakes.html), there’s another very simple one: pronouns.

It’s much, much nicer to be able to write “we” on a corporate web site. “We” could be anything from 2 to IBM’s zillions, but it implies a real organization, whereas “I” implies some guy off working on his own. Of course, you could lie and write “we”, but that will probably catch up with you at an inopportune moment.

Back on line, in Innsbruck

Wow, that sucked. It took this company in Austria nearly a month to connect me back up to the internet. And since I don’t have a laptop with which to roam around in search of wireless, I was pretty much completely out of it since we moved up here. I’m still getting the network reconfigured, so I won’t be at %100 capacity for a little bit.

I took the time to explore the area some by bicycle, which was pretty nice. The area around Innsbruck is full of nice evergreen forests, snow capped mountains and mountain fields. Unfortunately, while everything was quite beautiful, it didn’t smell so good, because the industrious farmers are busy spreading tons of cow dung over all those nice green fields, as well as dribbling it all over the roads leading to the fields… Oh well, we ended up in a nice place, and we’re pretty happy about it. More later as I start getting things going again.

Javascript hacking

I wouldn’t have thought it several years ago, but I’ve actually been hacking on some Javascript, for Stuff to Do. My immediate need was to make the system work better with IE6, which had problems with the previous way of doing things, which involved big updates to large portions of the page. Now, with Javascript, I do most of the work that way, and rails only has to make note of the new task priorities in the database.

In terms of UI changes, I also flattened the task boxes down just a bit, something that a user requested.

Hopefully it’s reasonably stable, as I will have very, very little hacking time until we are unpacked in our new place in Innsbruck!

XPath namespace pain

I’ve been playing around some with the Google Maps API, via ym4r. I discovered, however, that its geocoding API doesn’t do anything with the “accuracy” information that Google gives you, which tells you if the address you fed it actually means much. The XML looks something like this:

<Placemark>
  <address>Italy</address>
  <AddressDetails Accuracy="1" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">

I opened up geocoding.rb, and had a look, figuring it had to be pretty simple, and indeed, with REXml’s XPath stuff, you can easily grab the elements you want. For example:

data_country = data['//CountryNameCode']

So… data['//AddressDetails'].attributes['Accuracy'] ought to give me what I want, right? Nope. The namespace in the sub element confuses everything. After some googling, I finally found the recipe:

data_accuracy = data['//*[local-name()="AddressDetails"]'].attributes['Accuracy']

Kind of a mess, but it works, I have my accuracy attribute, and I submitted a patch to the ym4r guy.

Tsumobi

I found this to be very interesting:

http://www.techcrunch.com/2007/03/09/demo-day-y-combinators-spring-chicks/

Specifically:

Tsumobi

Mobile applications have so far been nightmares to implement. It’s often hard to gain adoption due to complicated installs and near impossible to get users to upgrade their version once the product has shipped. Tsumobi hopes to solve this problem by creating their own language. The new language will sit on top of J2ME and process applications downloaded (via URL) for Tsumobi enabled sites. This means that developers will be able to change Tsumobi applications on the fly and have Tsumobi enabled phones automatically get the updates just by visiting a link.

That sounds very familiar… Hecl, maybe?

On one hand, I’m sort of jealous that someone is getting paid to do something I did for free (and hang out with Paul Graham, to boot). On the other, it certainly validates the idea doesn’t it?

Padova, Italy -> Innsbruck, Austria

It’s official! If all goes well, Ilenia and I should be settling in to an appartment in Innsbruck, Austria by April 2nd. She has been hired to work with Andreas Villunger’s group, which is a great opportunity for her, and also for me to work on some things that are not yet public… We’ve got a lot of good friends here in Padova, and not seeing them very regularly will be the hardest part of leaving. However, Innsbruck is only about 4 hours away, and Ilenia managed to find us a place on short notice that has a guest bedroom, so we hope to have lots of visitors!

Ruby’s Mysql interface

I just like open source too much to not be constantly bumping into things that I would love to improve or fix… I have way too much fun getting my hands dirty with something new.

Today’s adventure regards my need to stream large quantities of data from a ruby on rails installation, covered previously here:

https://journal.dedasys.com/articles/2006/06/08/streaming-programmatically-generated-content-from-rails

The current block is that ActiveRecord doesn’t deal with a “stream” of results, but rather, fetches everything into one big, fat array and then deals with that. Luckily, I’m not the only person to have found this suboptimal:

http://dev.rubyonrails.org/ticket/6921

However, as I comment there, to truly make things work, some low level coding is required. For mysql, since it doesn’t seem to support cursors to the degree that something more standards-compliant like Postgresql does, the answer lies in the C library and language interfaces built on top of it:

http://dev.mysql.com/doc/refman/5.0/en/mysql-use-result.html

Unfortunately, Ruby’s C API, or at least the versions that I downloaded, don’t properly support fetching things one record at a time. It didn’t take more than a few minutes to whip this up:

http://dedasys.com/freesoftware/patches/mysql-ruby.patch

(although there’s a good possibility it could be improved…)

However, according to this posting, the upstream maintainer may not be terribly responsive, and the project isn’t really run as much of an open source project, with a public mailing list, bug tracker, version control, and so forth.

Perhaps it’s time to create that infrastructure?

php4, php5, objects and cloning

We take a very simple class:

class Foobar {
var $myvar = 1;

function Foobar() {
}

function printit() {
    echo "var is " . $this->myvar . "n";
}

function incr() {
    $this->myvar += 1;
}

}

$f = new Foobar();
$a = $f;
$b = $f;

$a->printit();
$a->incr();

$b->printit();

And run it with PHP4 and PHP5:

davidw@byron:/tmp$ php4 foobar.php 
var is 1
var is 1
davidw@byron:/tmp$ php5 foobar.php 
var is 1
var is 2

Apparently it’s possible to use the clone function to do what we want with PHP5, but… that means we have to track down every single place in the code where there is something like $foo = $bar. And hope that we got them all, because otherwise subtle bad things might happen. The codebase I’ve inherited isn’t great to begin with, and hunting down every object copy is bound to be torture. Ouch.

Update

It’s been pointed out that my description of exactly what’s happening internally isn’t correct. However, from my point of view, the end result is the same: a massive search and replace operation in order to obtain the “old” behavior by using clone. Most likely, this means that we won’t be able to upgrade soon, which means that we won’t be able to take advantage of some of the nice new PHP5 features, which will slow down other works in progress. For want of a nail…