A notch above a monkey

sgmllib.py parser woes

Does anybody have problems with sgmllib.py?

After I spent way too much time hunting a bug in my code, I gave up, read the goahead function in sgmllib.py and I’m certain now that its parser is broken.

Let’s say you’re handling a web page with inline Javascript code which also includes HTML tags. Even if you use a setliteral method to skip processing data inside <script> tags, sgmllib.py will start doing so when it encounters first </. It interprets this as a start of an end tag and tries to close it. Even though code handles cases of known and unknown tags, it fails to do the right thing because it simply doesn’t expect a scenario where this isn’t a tag at all.

The other possibility is that I’m simply a dolt who should do stuff like this only when rested. By the way, where’s the proper place to make an ass out of myself complaining about standard library?

Single post trackback spam

I’m a coeditor of another blog and like most blogs we have some problems with comment spam (if you’re using WordPress, you really ought to give akismet a go). In general I don’t mind it too much and take it as a price of self-expression.

But we get spam that drives me nuts, because it’s something that could be permanently fixed. You see, ALL of our trackback spam is directed to the same blog post. So, if I could turn trackback off only on that post, it would cut our spam to more than a half and leave my nerves intact.

I don’t think it’s doable with default installation of WordPress 1.5, but if any of you is using a plugin that support this functionality, I’d appreciate it greatly if you could let me know.

Localized interfaces in globalized world

There’s an issue I’ve been struggling with for months now. Well, more than a year really. We built Marela so it would be used in Slovenia by people preferring Slovene language over the others. It’s not the only distinguishing point from similar services found on the web, but it’s an important one.

However, Internet and low fares airlines certainly shrank our planet and it’s not uncommon for many of us to have friends who don’t speak our language but with whom we’d still like to share parts of our lives and our creations. And this is a problem for Marela, which was (also) built to fill this need of sharing.

It’s simply not possible to use Marela in any language but Slovene.

We decided to do this to avoid Orkut syndrome, where brazilian users (legitimately) subverted a global service into a mostly Portuguese speaking one. We didn’t want to risk making our site unfriendly to Slovene-only speaking members by creating an environment in which a large portion of our community neither could or would speak Slovene.

I believe our interfaces are mostly self-explanatory and easy to use, but it’s difficult to tell how challenging they are for those who don’t speak their language. Judging by personal experience in using a dutch Windows 95 years ago, I’d say they are probably not easy enough.

So, what can be done?

There was an idea to enforce Slovene only for logged in users, but this can work only as long as unregistered users are not allowed to contribute and the idea itself doesn’t feel natural to me. It seems such an artificial restriction and that never amounts to a good thing. And that was one of more promising ones.

I ran out of my own ideas long time ago. Any ideas you might have are therefore more than welcome.