Blog entries published in 2007
Feeds: RSS | Atom

Some people take their anti-spam measures very seriously..

Published: 2007-12-30 21:23 UTC. Tags: world wide web usability

The municipality of Linköping distributes a magazine, DIALOG, to all its citizens four times a year. The articles are about subjects like the new fire station, upcoming big events in the city, etc.

There's always a minor section with information on how I can contact my local politicans. There's a list with the name, a photo, a phone number, and an e-mail address.

To my surprise, the e-mail addresses were on the form givenname.surname& - that is, they had replaced the @ sign with an & sign. In a publication printed on paper!

There's even an explanation at the end of the page "because of a decision in the municipal council, @ has been replaced by &".

One has to wonder what they are afraid of - that someone will scan the paper, run it through OCR, and place the result somewhere on the internet?

Of course, the real reason is either that the municipal council made a very bad decision because they don't know that they are doing, or that someone has misinterpreted the decision. Either way, the result is a usability disaster - not all people know how to properly format an e-mail address.


A contenttype template in ZopeSkel's localcommands

Published: 2007-12-02 22:14 UTC. Tags: software plone

As Tarek  noted the other day, I've added a template for injecting content types into an existing Archetype product, using Mustap's
localcommands support for ZopeSkel


Here's what the contenttype template will do for you after you've answered some questions:

  • Define a new Add Permission the product's
  • Define an interface for the content type you're creating.
  • Create a content type class, in a subdirectory named content/
  • Register this content type class in content/configure.zcml
  • Register the new content type in the factorytool, by adding to profiles/default/factorytool.xml
  • Register basic permissions for the new content types, by adding to profiles/default/rolemap.xml
  • Register the content type with portal_types by adding to profiles/default/types.xml
  • Add a new file with configuration information in profiles/default/types/.


Here's an example on how to use the template. You'll need mustap's branch of ZopeSkel for this to work:

Begin by creating a new product based on ZopeSkel's the Archetype template:

$ paster create -t archetype
Selected and implied templates:
  ZopeSkel#basic_namespace  A project with a namespace package
  ZopeSkel#plone            A Plone project
  ZopeSkel#archetype        A Plone project that uses Archetypes
Enter project name: efod.test
  egg:      efod.test
  package:  efodtest
  project:  efod.test
Enter title (The title of the project) ['Plone Example']: Contenttype Example
Enter namespace_package (Namespace package (like plone)) ['plone']: efod
Enter package (The package contained namespace package (like example)) ['example']: test
Enter zope2product (Are you creating a Zope 2 Product?) [False]: True
Enter version (Version) ['0.1']:
Enter description (One-line description of the package) ['']:
Enter long_description (Multi-line description (in reST)) ['']:
Enter author (Author name) ['Plone Foundation']:
Enter author_email (Author email) ['']:
Enter keywords (Space-separated keywords/tags) ['']:
Enter url (URL of homepage) ['']:
Enter license_name (License name) ['GPL']:
Enter zip_safe (True/False: if the package can be distributed as a .zip file) [False]:

Now go into the directory just created:

$ cd efod.test
$ paster addcontent contenttype
Enter contenttype_name (Content type name ) ['Example Type']:
Enter contenttype_description (Content type description ) ['Description of the Example Type']:
Enter folderish (True/False: Content type is Folderish ) [False]:
Enter global_allow (True/False: Globally addable ) [True]:
Enter allow_discussion (True/False: Allow discussion ) [False]:
  Inserting from config.py_insert into /home/forsberg/dev/plone/mustaptest/src/efod.test/efod/test/
  Recursing into content
    Copying +content_class_filename+.py_tmpl to /home/forsberg/dev/plone/mustaptest/src/efod.test/efod/test/content/
    Inserting from configure.zcml_insert into /home/forsberg/dev/plone/mustaptest/src/efod.test/efod/test/content/configure.zcml
  Inserting from interfaces.py_insert into /home/forsberg/dev/plone/mustaptest/src/efod.test/efod/test/
  Recursing into profiles
    Recursing into default
      Inserting from factorytool.xml_insert into /home/forsberg/dev/plone/mustaptest/src/efod.test/efod/test/profiles/default/factorytool.xml
      Copying rolemap.xml_insert to /home/forsberg/dev/plone/mustaptest/src/efod.test/efod/test/profiles/default/rolemap.xml
      Recursing into types
        Copying +types_xml_filename+.xml_tmpl to /home/forsberg/dev/plone/mustaptest/src/efod.test/efod/test/profiles/default/types/Example_Type.xml
      Inserting from types.xml_insert into /home/forsberg/dev/plone/mustaptest/src/efod.test/efod/test/profiles/default/types.xml

That's it! After registering the archetype product in your buildout and installing it in Plone, you'll be able to add new 'Example Type' content.

Of course, for your custom content type to be really useful, you'll have to edit it, adding new fields and modifying templates.

Some Details

I am by no means a Plone guru, so some of the details in how this template constructs the new content type may be less than optimal. Please tell me if that's the case, and I'll see what I can

Base Classes

Depending on the answer to the "Folderish" question, the newly created content type will inherit either from Products.ATContentTypes.content.base, or from Products.ATContentTypes.content.folder.

Standard Fields

The template will set up AnnotationStorage and bridge properties for the standard title and description fields.


The Manager role is given the add permission for the content type (in profiles/Default/rolemap.xml).

zope2.View is required to view the content, and cmf.ModifyPortalContent to edit.


The standard views auto-generated by Archetypes are used as a default. Perhaps generating a custom view class, with template, would
be more Plone3? On the other hand there's already another template for creating a view available.

Please test!

Please test the template and tell me what you think! What should be made different, and what have I forgotten?


Autumn in Sweden

Published: 2007-11-18 19:56 UTC. Tags: photography

Went for a walk in Tinnerö Eklandskap yesterday.

Autumn in Sweden


Samsung 204b + ATI Radeon 9250 SE - the saga continues

Published: 2007-11-18 19:21 UTC. Tags: hardware linux review syncmaster_204b

I've previously written about my adventures in getting my Samsung 204b, made in Slovakia, to work properly in 1600x1200 at 60Hz (short story: Can't be done due to bugs in their DVI implementation).

Yesterday, I decided to upgrade my home workstation from Ubuntu 7.04 to 7.10, and of course, the flickering screen syndrome came back.

After lot's of tests with many different options in /etc/X11/xorg.conf, I got some help in a local forum, and came to the conclusion that modifying xorg.conf doesn't help. Using the xrandr command does however offer a way to solve the problem.

I how have the following list of commands in my /etc/kde3/kdm/Xsetup (I use kdm to start my X server, if you use another display manager, adjust the path to one that makes sure the commands are run right after X server startup):

xrandr --newmode "1600x1200@55" 150.0 1600 1804 1996 2160 1200 1201 1204 1250 +hsync +vsync
xrandr --addmode DVI-0 1600x1200@55
xrandr --output DVI-0 --mode 1600x1200@55

Gosh. Seems like there's some kind of bug in the ATI driver in the 7.2 packaged with Ubuntu Gutsy, or perhaps in itself.


A Strange Dream

Published: 2007-10-01 18:13 UTC. Tags: humor

When I woke up this morning, the last dream was still left in my head. It was, as all dreams, strange:

I stood on some kind of barricade, shouting out to the world that I was so frustrated about not being able to get IPv6 connectivity to my alarm clock.

Strange indeed.

I do have IPv6 connectivity to my home workstation via, but the alarm clock is not connected. Yet.


URl as UI - a bad example from the real world

Published: 2007-09-16 14:04 UTC. Tags: software world wide web

In todays issue of Dagens Nyheter, the largest morning paper in Sweden, an article about pensions caught my eye, not so much because of the subject, but because of the URLs they referred to in the article. Here are the three URLs they referred to:

The first one is OK from a user interface perspective, but the second and the third one made me chuckle, especially as the second one actually had a note which freely translated went something like "Note that four underline characters are needed for the direct link to work".

Clearly, the people who designed this web site have not read neither Jakob Nielsen's "URL as UI" nor W3C's "Cool URIs don't change". I guess they never thought about being referred to from a newspaper in print where people actually have to type their URLs into their web browser.

Dagens Nyheter tries to make the situation better by providing a link to their online version of the article at, which indeed makes it a bit easier for the readers to click the links. Sadly, the webmasters of Dagens Nyheter haven't done their homework either - the link is just a redirect to the article, which has this beautful URL: So, let's say that you saved a bookmark to the article, and want to refer a friend of yours by word of mouth a week later when you have forgotten that there was a human-friendly link available - now you must send the link via e-mail or other electronic media. Simply telling your friend over the phone is completely impossible, which it would not have been if the link were something like

Oh well.. the world is far from perfect. Happily, at work, we're using a content management system that automatically creates URLs that look nice: Plone.

Some documentation on the sourceforge to roundup converter now available

Published: 2007-08-27 21:56 UTC. Tags: open source

I had one comment on my last post asking for information about the converter from sourceforge to roundup.

I wrote up a small README file on the three different converters that are available. The README is available in python's subversion repository:
0 comments. finally in production!

Published: 2007-08-25 22:27 UTC. Tags: open source software

For over a year, I've been working on replacing the bug tracker used by the python project. Earlier, they used the horrible bug tracker provided by sourceforge. Now, since last thursday, they are using their own tracker based on roundup.

Hooray! I'm very happy we're finally there!

The new tracker is at

Earlier posts on the subject:


A blog that makes me laugh every time there's a new post

Published: 2007-08-21 19:37 UTC. Tags: humor

Every time there's a new post on this blog:

..I roll on the floor laughing! :-)

The idea behind the blog is to publish scans of "catastrophic record sleeves" which the blog author has collected for many years. His comments to each sleeve all in swedish which is of course somewhat limiting the audience, but even if you don't understand the comments, you should be able to "enjoy" the images.

Have fun!

Vacation trip to Nessebar, Bulgaria

Published: 2007-08-17 23:31 UTC. Tags: travel

BulgariaAs the swedish summer was getting more and more depressing (rain, rain, a minor storm, some more rain, and.. perhaps some rain for a change?), me and the girlfriend bought a last-minute trip to Nessebar, Bulgaria and went there in the middle of july.

When I go for a charter trip, I expect a few things:

  • Sun
  • A beach
  • A decent hotel
  • Tasty and cheap food.
  • Something to do, as I get bored at spending time at the beach after about three days.
Especially the food is a very important factor - eating at restaurants is very expensive in Sweden, so when we go abroad, we always get very tasty food for what we think is nothing.

We choose Nessebar because it advertised itself as being a very old city (it's on the UNESCO world heritage list), which would hopefully mean that the town was beautiful. More on this later..

So, evaluating how Nessebar fulfilled the requirement's list:


Oh yeah, lot's of it. And we actually managed to get there between two very hot periods, so it was only a few degrees too hot to be perfect.


BeachOh yeah, and it was very good. Even I, who am not really a lie-on-the-beach-for-a-full-week person, thought it was good. Unfortunately, the rumours says that the fee you pay for renting a parasol goes straight into the wallet of the mafia. Oh well.

Decent Hotel

We were actually quite surprised by the standard of the hotel room at "Hotel Hawaii". The bed was a bit hard, but the air condition worked as expected and the toilet looked OK.

There were some "features" as well.. among them the two elevators, which had a tendency to break down once or twice a day. We didn't get stuck, but we heard other people talk about it. Also, one of them stopped about 20 centimeters above our floor. That's quality..

Another interesting thing was that during one of the nights, I woke up by the sound of someone putting a key in our hotel room door. That's not what you want to hear at 4:30 in the morning. Even worse - this person actually managed to open the door and began to enter the room! Not a pleasant surprise. When I shouted something (I'm not really sure what, but I think it was in english), the person left the room.

My guess is that it was another guest that thought she (I think it was a she) was on her own floor, which she wasn't. Regardless of the reason, it feels like the quality of the doorlocks might need some attention.

Tasty (No!) and cheap food

Unfortunately, we were very disappointed by the quality of the food served at the restaurants in old nessebar. All restaurants claim "WE HAVE EVERYTHING", very loudly, and often by use of several people employed only to harass tourists trying to get them into their restaraunt. The lack of specialization means that no restaurant get really good ad doing anything, and the result is rather depressing.

Not only does every restaurant serve exactly the same menu of food that lacks good preparation - the menus are kind of hard to understand as well.

Something to do when bored at the beach

There are, if you are interested in that kind of stuff, plenty of nightclubs and karaoke bars in Nessebar. Arriving at our hotel in the evening, we had to run the last 100 meters with our ears covered, as the hotel bar always ran their karaoke machine at an incredible volume - fortunately, our hotel room had its balcony on the opposite side. But, not being the karaoke/nightclub person, I need something else to do.

Sail We did go for a boat trip, which was nice. Had I thought of it earlier, I probably would have gone for a jeep tour into the surroundings of Nessebar, but when I tried to book it, there were no reservations left.

Photo opportunities

I did bring my photo gear in the hope of being able to take some nice pictures. This did prove to be something of a challenge, as the hopes of Nessebar being a nice little ancient town full of photo frames proved wrong. There's not a square meter in old nessebar that has not been converted into a restaurant, shop or something other tourist-related thing. Very boring and not charming at all.

Trying to avoid the hordes of tourists (yes, I know, I was also a tourist), I set my alarm clock at 6 in the morning and went up with the sun. This proved to be a very good idea. It was calm and almost no people in town, so now there was a chance of getting some decent photos. The beach was also rather empty, which was nice.

The photos you see on this page are all from Nessebar. See more Nessebar Photos.


Nessebar is off the list of places to visit - it's just too much adapted for tourists. Bulgaria might be nice, but avoid the big tourist cities on the black sea coastline.

PlacelessTranslationService bit my head off!

Published: 2007-08-09 16:34 UTC. Tags: open source software plone
Today, I made the mistake of adding a <myproductname>-sv.po file in the i18n directory of my product, which accidentally were marked with
Language: en

This of course made the english strings appear in swedish, but that's only to expect. What happened then was worse - after correcting the file to contain:

Language: sv

..there were no change! The english strings still appeared in swedish!

After a frustrated debug session, it turns out that the language property of the GettextMessageCatalog object stored in the ZODB (I think) is not reloaded when the Language property in the file is changed. So, even if you change the Language line in the .po file, the translation will still be marked as being in the language it first was entered as.

The solution? Move the .po-file out of the i18n directory, restart Zope, then move it back, and restart again.


Well, at least I can be glad that my CMS is an open source product, allowing me to debug problems properly.


Fighting tracker spam with SpamBayes

Published: 2007-07-28 00:43 UTC. Tags: open source software

During the last few days I've had time to do some programming just for fun. When you combine vacation and bad weather, you can be very productive :-).

Most of the time, I've been doing work for the roundup tracker instance for the python development team. I wrote about the new importer earlier, and now I've also created an anti-spam system based on SpamBayes.

For those interested, there's a technical description of the roundup spambayes integration in the roundup wiki.

SpamBayes seems to be a nice piece of software, especially now when it has an XMLRPC interface. Imagine having a SpamBayes XMLRPC server on your network, and then a plugin in your mail user agents that calls it to rate messages before sorting them down to folders, and a button in the user interface that allows users to report messages as being spam or legitimate content. That would be very powerful and give very few incorrect ratings as each organisation's SpamBayes server would learn what's legitimate content for the organization where it's installed.

When to sort?

As all users receiving large amounts of mail (in my case mostly because of mailing list subscriptions), I sort my mail. For my personal mail, I let the Cyrus IMAP server sort whenever the messages arrive, using the Sieve sorting language. I use the Sieve filter interface in Squirrelmail to create rules. This is very convenient as the mail is always sorted when I arrive at my mail client, regardless of which client I use. Also, I only have to define my filter rules at one place. I only wish there were more mail user agents with decent Sieve filter support.

For sorting out spam however, the later the sort is done, the better, at least for some kinds of anti-spam measures, including statistical filters such as SpamBayes. Imagine the following scenario:
  • User A, who likes to arrive at the office early in the morning, opens his INBOX and find 2 messages that have been incorrectly classified as legitimate mail. He presses the 'report as spam button', which in an ideal world will teach the local SpamBayes server to score the message better.
  • User B, who is a lazy bastard, arrives two hours later. When his mail user agent sorts his mail using the local SpamBayes server, he can benefit from the work made by User A earlier in the morning, as the two messages are now correctly sorted.
On the other hand, the statistical filters seems to work well enough for the typical spam that sorting early (on the server) is probably good enough, so I think I'll continue to let my Cyrus IMAP do the sorting for me. A button in my mail user agent for classifying the message would still be neat, though.

Life as a conversion script author

Published: 2007-07-25 13:05 UTC. Tags: open source software

About a year ago, the infrastructure team of the python language project sent out a call for trackers. They had come to the conclusion that the tracker available at sourceforge was not good enough. I can understand that - it's very hard to use, and since it's running on sourceforge's servers, it can't be customized.

I and several other people thought that roundup, a tracker infrastructure would be a good choice, so we formed a team and managed to come up with a submission for the call. This included writing a conversion script that took the data from sourceforge and imported it into  the new tracker. I created this script based on a screenscraper library for sourceforge written by Fredrik Lundh. This was importer #1.

Later on, roundup was selected as one of the two final alternatives. Happy happy, joy joy :-). A team was formed (including me) for creating the tracker, and Upfront Systems kindly provided a linux host for running the tracker.

Now began the real work of designing the tracker and adjusting the importer to the final schema. During this time, sourceforge managed to fix their broken xml export, so I wrote a new importer that instead of screenscraping webpages took an xml file as input which was much faster and more reliable. That is, I wrote importer  #2.

Later on, when we were beginning to get ready for production launch, a real showstopper shows up - the xml export from sourceforge couldn't cope with the size of the python project - the export was missing data.

After several months of waiting for sourceforge, they have a new export script that includes all data. Unfortunately, it has a completely new xml format. Writing a third importer was less than fun, but I managed to complete importer #3 yesterday. Hopefully, I didn't introduce that many bugs..

Who knows, maybe the python project will have a new tracker sometime this year? :-)

Try out the new tracker at


Moving the Computer System at Work - Exhausting!

Published: 2007-04-21 12:55 UTC. Tags: general

Yesterday was spent moving the computer resources at work (Cendio AB) from our old offices to our new ones. Quite an exhausting day.

As usual when you move stuff, things break. And regardless of how much you plan and try to think about everything, things go wrong.

One example of the former was that the power supply of our firewall choose to break down completely when we tried to start it at its new location. The horror, the horror! Fortunately, we had an older machine of the same type which from which we could steal the power supply, and so far, it's been running stable. I'll keep an eye on it, as the machine we stole the power supply from have shown stability problems. Trust me, I'll definitely order a new power supply for shelf storage..

On the "things go wrong" side, there was a complete misunderstanding on how our new network connection (from the same company that provided the old one, Tele2) should be configured. Straightening that out took its time, so we had about 3 hours of complete downtime for our web server. On the other hand, given the broken firewall, I think only about 1½ hour can be blamed on Tele2, and 3 hours is quite OK for such a low traffic site.

After these two mishaps, most of the other work went fine. We were especially horrified by the fact that our Xerox 432 SLX (a scanner/copier/printer/fax thing which as all printers is most happy when its not working) worked right out of the box - we just connected it to power, network and phone line, and everything worked as intended. I'm sure it will break completely as revenge some other time when we really really need it. There's a saying - God created the computer network, the devil responded by creating the printers. Very true, if you ask me.

Not only did I and my colleague Peter install and configure computers in the new computer room, while my two other colleagues moved the rest of our computers from our old location to the other - I also had to keep an eye on the transport of the Xerox, the move of our fax telephone line, the installation of fire  extinguishers and installation of the alarm system. Lots of things to keep in the head, lots of phone calls. I counted twentyseven phonecalls during the day.

Eleven hours of sleep later, my muscles are complaining about spending most of yesterday carrying computers and crawling around 19" racks. Ouch! But I'm very happy with our new computer room - everything neatly installed in two racks instead of spread around a large room. Network equipment mounted well, and new KVM switches making work in the computer room much easier (our old ones were like playing russian roulette - you newer knew if you could get a console on the server you needed access to).

Plone 2.5.2 and LDAP - revisited

Published: 2007-03-04 18:23 UTC. Tags: software LDAP plone

One or two years ago, I spent some time trying to understand how to connect Plone 2.0 to LDAP. I really had no luck as things were complicated. Reading out existing users from the directory might have been possible, but trying to create users was a thing never heard of.

I decided to check out the current state of Plone and LDAP again with amore modern version of Plone, in my case, Plone 2.5.2. After some heavy experimentation, I've come to the conclusion that the software involved has grown more mature, but it's still hard to get it working.

Sources of Information

Software Requirements

  • python-ldap. Make sure the python that is used to run Zope has this module available, or nothing at all will work.
  • LDAPUserFolder. I used version 2.8beta.
  • LDAPMultiPlugins. I first tried version 1.4, but got some problems. Version 1.5, released yesterday(!), works much better.
  • The LDAPMultiPlugins patch available at For me, it applied cleanly on top of LDAPMultiPlugins 1.5. It adds functionality that is available and needed by PlonePAS. Group memberships seems to work much better with this patch than without.
  • Two patches, one on CMFPlone/ (download here), and one on PasswordResetTool/skins/PasswordReset/ (download here). Without these, registration will fail. Please note that both patches are ugly hacks that are not long-term solutions to the problem.
  • This patch:, or login after password reset will fail with a recursion depth error.


Drop LDAPUserFolder and LDAPMultiPlugins into your Products folder, apply patches listed above, and restart Zope.


Follow In short, you add a LDAP Multi Plugin to your PAS folder (acl_users in ZMI) by using the dropdown in the top right corner and then configure it.

Theory of Operation

Plone 2.5 uses PlonePAS, which is an adaption of Zope's PAS (the Pluggable Authentication System) for its user/group handling. That is a good thing, as PAS is a very flexible system that can do just about anything.

To get LDAP users/groups/authentication, LDAPMultiPlugins need to be installed and configured. After configuration, LDAPMultiPlugins contain an LDAPUserFolder that is used to actually fetch information from LDAP. The different plugins in LDAPMultiPlugins then add functionality such as authentication, user and group enumeration et. al. to PlonePAS.

Configuration of which LDAP server(s) to use, which base to use etc are made by visiting acl_users -> <your LDAPMultiPlugin> -> Contents -> acl_users. A bit awkward to find, if you ask me.


It's very important to pay attention to the LDAP Schema tab under the LDAPUserFolder.
  • The LDAP attribute used to keep the full name of the user must be mapped to fullname. In my case, this means that the LDAP attribute cn should be mapped to fullname. For other directory configurations the attribute may be named differently. Novell eDirectory for example, uses cn as username.
  • The LDAP attributes used to keep the e-mail address of the user must be mapped to email. In most cases this means that the LDAP attribute mail should be mapped to email.
  • Only attributes listed in the LDAP Schema tab are available in the dropdowns used to select which field to use as login name attribute, username etc in the configuration of LDAPUserFolder.
  • All attributes listed as MUST in the LDAP schemas used to create new users (and search for existing) must be listed under the LDAP Schema. If not, user registration will fail due to LDAP schema errors.
It's also very important to pay attention to the list of User Object Classes  in the configure tab. This list is used both to construct the query used when searching for user objects, and to create new user objects at registration. At new user registration, an LDAP object is first created with all attributes (except the RDN attribute) set to [unset] in the LDAP database. As mentioned above, all attributes listed under the LDAP Schemas tab are filled with this value. Later on in the registration codepath, the attributes actually mapped to plone attributes are set (one attribute at a time, in separate LDAP requests).

The order of the PAS Plugins is very important. To get user registration to work, and for other things as well, the LDAP Multi Plugin should be at top of the list of plugins for each type of plugin.

For (much) better performance, add caching by visiting the Caches tab of both ZMI->acl_users and your LDAP Multi Plugin. Adding a cache to source_groups also seems like a good idea (there's no cache tab, so you'll have to find the URL to the cache management yourself - it's something like http://uterus:8080/Plone/acl_users/source_groups/ZCacheable_manage. For me, it seems to work using the RAM Cache Manager that already exist in any Plone 2.5 installation.

That's all the things I can remember as being important from yesterday's late night session :-).


Ett telefonsamtal

Published: 2007-02-15 21:51 UTC. Tags: humor in-swedish

Det ringde på mobilen, från någon med dolt nummer. Jag svarade och sa mitt namn.

- Jaha, då har jag nog ringt fel. Jag skulle till Hasse.

- Hasse vadå?

- Ja, Hasse i Linköping! Jag ber om ursäkt, hejdå.

Jaja.. det verkar bara bo 979 Hans i Linköping, så förr eller senare hamnar hon väl rätt.


Access SugarCRM from Python via SOAP

Published: 2007-01-30 22:35 UTC. Tags: software sugarcrm soap

I spent part of the evening writing the embryo of a python module that will hopefully make it easy to access SugarCRM from Python via SOAP.

Right now, it only contains code for adding, updating, getting and deleting Accounts, but that could easily be extended. A bunch of unit tests too. 
Not very useful unless you're a developer. You need the Zolera Soap Infrastructure to get it to work.

Get the code from SVN:

svn co 

See also:

I know the feeling..

Published: 2007-01-27 23:48 UTC. Tags: humor
Where Do You Think You're Going, Mister!?

Much to Read

Published: 2007-01-27 23:37 UTC. Tags: books general

There are so many interesting books I want to read that I often end up reading several books at once. Here's my current list of unfinished titles:

  • George Monbiot,  HEAT - How to stop the planet burning
    Very interesting study on how we can stop emitting too much carbon dioxide while still keeping most of our lifestyle. On the same matter, there's a interesting article in todays paper about the use of ethanol as fuel for cars. In short, the article claims that since the production of ethanol consumes more energy than the amount of energy available in the fuel when it reaches the consumer, using ethanol as vehicle fuel is simply not doable. I'm not surprised.
  • Philipp von Weitershausen, Web Component Development with Zope3
    Very well-written book on how to develop with Zope3.
  • Bruce Tate, Beyond Java
    This author, who has been a great fan of Java for many years, comes to the conclusion that for many purposes, it's not the best language. No shit, sherlock.
  • Andrew Hunt and David Thomas, Pragmatic Unit Testing
    Although written with JUnit as example unit test framework, this book is supposed to contain good info on how to think when writing unit tests, regardless of which language you're using.
  • Eric Meyer on CSS
    Interesting book on how to use CSS.
  • Jan Guillou, Tempelriddaren
    Fiction, in swedish. It's the second time I read it.

There's so much to learn in this world.


Published: 2007-01-22 19:45 UTC. Tags: software

Bought a book (Web Component Development with Zope 3) on A few days later, I got a mail from amazon with six recommendations for other books they thought I might like.

I already own two of them. Obviously I fit some kind of profile. Scary.


Yes, unit testing can be fun :-)

Published: 2007-01-15 21:49 UTC. Tags: software testing software engineering

Yesterday, I read one of the teaser chapters of Pragmatic Unit Testing in Java with JUnit.  It was a very interesting chapter, so I eventually ordered the book.

According to the reviews and from the looks of the table of contents, it doesn't talk too much about JUnit, but instead about general unit testing methodology in general which is what I want, as I don't do Java programming unless I can avoid it (another book on my bookshelf is btw Beyond Java, and although I think the author believes a bit much in XML as a must for the future, I feel that most of the conclusions in that book are something I can agree with - Java is on its way out, except as a niche language for "enterprise" applications. I don't know what "enterprise" is supposed to mean - "expensive and slow", perhaps?

Anyway, today at work, I had to rewrite a function that reads /etc/ldap.conf and parses out some LDAP server connection info. I had to read in more data, and change its API slightly as it was limited in the amount of data it could return. Inspired by the book, I started by writing some unit tests (using PyUnit) and then added more as I added features to the function.

Being able to run the tests while adding features, making sure that adjustments to parse and return a new type of data didn't break old data, made me fee happy and productive. Having to think about what kind of data should be returned and therefore tested also gave a better and more complete design.

In short - I'll be writing more unit tests from now on. I'm sure the book (when it arrives) will give me plenty of inspiration.


My New Fishtank

Published: 2007-01-14 20:42 UTC. Tags: humor aquarium

My new aquarium
Made myself a new fishtank. It has two rather large Salmon Salar.

Very easy to maintain and quite cheap, but I have to say that this kind of fish are rather boring to watch compared to the types of fish I keep in my larger tanks.


(Almost) perfect programming weather!

Published: 2007-01-14 13:42 UTC. Tags: software

The weather in LInköping is really cool right now. There's a major storm (weather service warns about 30m/s winds) and some rain.

Perfect weather for some programming. Currently working on the new tracker for python-dev (based on roundup)

Now, let's hope the power grid doesn't fail. About 120.000 people in Sweden have no electricity right now.

Running Wordpress on accounts

Published: 2007-01-14 12:56 UTC. Tags: software wordpress

My girlfriend has a hosting account at for her domain (number of .se-domains owned by the two people in this household: Three). Until now, she has been running static html pages generated by Dreamweaver, but a month or so ago, she decided she wanted to go for Wordpress.

As she has a background as a PC technician and a good understanding of how computers work in general, and also because Wordpress is really easy to install, she managed to install and get working with Wordpress without much help. It did not work 100%, though. The file upload dialog was not working, instead displaying an error message from Apache, and after many common administrative operatings, the same apache error message was displayed, and you had to manually navigate to a known URL to get back into the interface.

After some analysis using Wireshark, I came to the conclusion that for some reason, the Apache servers at didn't let PHP scripts set the Location header when trying to do redirects with HTTP response code 302 (temporary relocation). Weird.

The solution was to enable support for my-hacks.php (can be done via the administrative interface), and add a my-hacks.php to the root directory of the wordpress installation with the following contents:

$is_IIS = 1;

This causes wordpress to use an alternative strategy for doing redirects, which works better with the Apache servers at

The fact that has turned off the regular expression support in mod_rewrite did by the way not help when writing rules to make sure old links redirect to the new url scheme used by wordpress.

Samsung Syncmaster 204B [R] on DVI - don't try that at home!

Published: 2007-01-03 01:08 UTC. Tags: hardware linux syncmaster_204b

Note: This instruction is valid for the ATI driver included with Ubuntu Feisty Fawn (7.04). There's another entry on how to get it working in Ubuntu Gutsy (7.10).

I recently decided that it was time to replace my old trustworthy Nokia Multigraph 446XPro CRT display with a flatscreen. The 446XPro has server me well at various computers at home since 1998 (that's eight years!) but it was time for something less space-consuming on my desk. Also, I like the feeling of not sitting in front of an electron beam several hours a day.

My list of specifications for the replacement was rather short:

  • Must handle a resolution of 1600x1200 (I've been working with this resolution for many hours a day for the past 8 years, so I'm quite used to it)
  • Adjustable height
  • Reasonable price
After some research, I bought a Samsung Syncmaster 204B which seemed to be a reasonable fit given my specifications. As we'll see, the word Syncmaster is somewhat ironic in the name of the product... Also, it turned out that I got a Samsung Syncmaster 204B [R], which turned out to be very significant..

I got the screen just a few days after ordering it, and connected it to my graphics card, a ATI Radeon 9200SE, via analog VGA. After adjusting the vertical refresh to the recommended 60Hz, I got the display working, but with some distortions which made it hard to work with given the high resolution and the small font I use for displaying information. This was a disappointment. Obviously, the VGA decoder in the screen is not good enough to handle the recommended solution.

As a colleague of mine had similar trouble at work and solved them by switching to a graphics card with DVI output, I decided to go the easy way and buy a new graphics card, as the graphics card I had lacked DVI output. It turned out that the 9200SE was the very last card in the series that only had analog VGA output. My usual luck with hardware..

I bought a ATI Radeon 9250 as replacement and installed it. This gave me a sharp image. Yay! Or so I thought, because now, the screen started to go blank now and then with irregular intervals. It went completely black and then came back after half a second or so. Boy, that's irritating!

After many attempts, I managed to find the right words that made Google lead me right. This forum article led me to this forum article which describes the problem - it's a bug in the DVI implementation of Syncmaster 204B [R]. It can't handle the bandwidth. Gah! My usual luck with hardware..

The forum articles says this bug appears only on Syncmaster 204B [R], and only on models made in China. The latter seems not to be true, as mine is made in Slovakia.

There's a workaround - by lowering the vertical refresh to 56Hz, the problem goes away.

I'll do what I can to get a new screen without this bug anyway.

Here's my xorg.conf I use with the Radeon 9250 and the Syncmaster.

Bad Jokes

Published: 2007-01-03 00:27 UTC. Tags: humor

During the holidays, I came up with some really really really bad jokes.

Two graphics programs were out walking. Suddenly, one of them were hit by a (PCI) bus. The other one said:

Hey! Sketchup!

The other one is unfortunately in swedish:

Hur sa man godnatt i Hitlertyskland?
"Nazi, Nazi!"

I know. I should have kept my mouth shut instead of polluting the world with this "humor".