Archive for November, 2005

Apache mailing list moderation tip

Sunday, November 27th, 2005

I don’t know if this is common knowledge, but it was a discovery for me so I figured I’d share. People often mail the mailing list owner to say they can’t unsubscribe from the ASF mailing lists. In that situation I mail the ‘-list’ command to see if I can see their address, or variant of their address and then see what the problem is. ie) an email to general-list@jakarta.apache.org.

Turns out that the digest works utterly separately. If they are getting a digest, you need to mail general-digest-list@jakarta.apache.org to find them, and they need to mail general-digest-unsubscribe@jakarta.apache.org to unsubscribe. I’m sure it’s blatantly stated in the docs, it just didn’t sink in.

PMD Applied

Friday, November 25th, 2005

Looks like Tom Copeland (PMD fame) has followed Ceki G?lc? (log4j fame) in releasing a manual via a small-town publisher. Number one thing I like from the table of contents? Tom’s last chapter lists other open source projects that do similar things. It helps suggest that the book is an open approach to documentation instead of an attempt at marketing. Something to add to the bookshelves.

Email fixed

Thursday, November 24th, 2005

The latest and hopefully the last in this story. I removed the source postfix and upgraded to the debian supplied version. I managed to lose the copy of the configuration I’d made, but fortunately I have somewhat of a backup system in place that let me easily get the old configuration. Some pain with aptitude as a mail server _has_ to be installed so I had to swap postfix/exim a few times until things were good.

Lesson’s learned?

  • Correct names for backups can be dangerous. Copy /etc/postfix to /root/postfix doesn’t protect it from the stupid locate postfix | xargs rm.

Special moments?

  • Googling for answers to the spamassassin/perl error, only to find my blog and an email in catalan as the only hits. The Internet suddenly seems a very lonely place.
  • Clicking on the icon for the backup system’s windows share and being asked for a password. Like I had a clue. SSH keys to the rescue.

Fixing Debian/Spamassassin

Wednesday, November 23rd, 2005

Hopefully I’ve managed to figure things out.

When attempting to install an SVN server ages ago on Woody, I installed Berkeley DB from scratch. Thus is appeared in my LD_LIBRARY_PATH/ld.so.conf. This was causing large problems for perl when it tried to talk to Berkeley DB. Removing it (along with various files in my /var/lib) appears to have gotten me past the problem.

Unfortunately, due to problems a year ago, my Postfix is a source install and appears to have conjoined itself to the source install of Berkeley. So if I fix SpamAssassin, I break the email server. Joy. Tomorrow night will be spent fixing this, hopefully.

Debian upgrade

Monday, November 21st, 2005

Upgraded my second, and more important, server from Debian woody to Debian sarge tonight. The previous one had gone pretty well, with the only casualty being a forum whose backend used bdb and the debian upgrade changed the installed version of bdb [at which point it all becomes very painful, so I had high hopes.

It chugged along and at the end of the day I had a broken database, broken spamassassin and looks like Java GUI stuff isn’t happy (such as the dynamically generated image at the top of this blog).

The database (postgres) had failed halfway through the automated update, but I think it was simply because the update process had made me turn it off at one point without telling me to turn it on again. A bit of reading and I was able to finish the job.

Spamassassin is less obvious. Some problem with perl that the only person on google to suffer from speaks either Spanish or Catalan (Altavista couldn’t handle it): Starting SpamAssassin Mail Filter Daemon: /usr/bin/perl: relocation error: /usr/lib/perl/5.8/auto/DB_File/DB_File.so: undefined symbol: db_version_4002.

Java’s also not too healthy, Exception in thread "main" java.lang.UnsatisfiedLinkError:
/opt/j2sdk1.4.2_05/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
. Which is probably ugly and painful.

I moved to Debian because SuSE installs involved me having to have physical access to the machine, whilst Debian promised a nice trustworthy remote upgrade. It’s not gone badly, but it’s dangerously close to being a problem.

Not using get/set….

Sunday, November 13th, 2005

Just read Bob Lee’s blog entry on getters and setters.

I recently worked on a project in which I decided to re-evaluate the public get/set and private attribute rule. I’ve always found the get/set bit quite clunky, but I’m a strong believer in the need for idiomatic Java at work, so I stick with it. One place this causes problems is when the C++ using R&D department try to look at the code; the gets/sets seem to confuse them. As this project involved a lot of R&D viewing of the code, I tried the following.

Firstly I ditched having the public methods and created classes with anonymous/package scope and anonymous/package scoped variables. My code therefore gives off warning flags to all Java developers with: “measurement.timestamp = new java.util.Date()” etc. This worked pretty well, and by not allowing the classes to be seen outside of their package, I limited the amount of perl search and replace needed to handle a renaming etc.

Pretty soon though I wanted to have multiple packages and data classes that passed between the packages. So I turned to my preference, methods with the same name.

    private int age;

    public int age() { return this.age; }
    public void age(int i) { this.age = i; }

Leading to the beautiful yet equally terror-inspiring to the idiomatic programmer, measurement.timestamp(new java.util.Date()) and Date date = measurement.timestamp().

End of the day, set/get win because it’s better to be readable and lame, than succinct and confusing. Plus the R&D guys will still just complain.

Being a pain in the arse….

Sunday, November 13th, 2005

TJ commented on the pain I’ve inspired on the Roller development mailing list recently - link: blog.tjworld.net.

Namely that with two releases that want to be made (1.3 and 2.0), I’m asking questions about LGPL and BCL dependencies/files. Namely that we need to have it made very clear that we can release with the LGPL dependencies.

There are a couple of problems at the root of all this, as I’m sure most people know.

  1. Open source is split into two camps; “keep it free” GPL and “freedom to close” BSD. The two principles cannot be reconciled but they can overlap in various ways. Also there are licenses that sit between the two; MPL/CPL.
  2. People love to sue; who wants to find themselves bankrupt because they failed to do something correctly in legal terms.

Being an individual and being sued is not hugely likely as few of us have enough assets to be worth legal action; however if it did happen we would all find ourselves in dire straits. Joining a larger organization, like the ASF, helps to provide legal protection. However, that same larger organization are now a much better target for legal attack, even if the individual is protected, so said larger organization needs to be doing some work to protect itself.

Even so, there’s not a lot in it for a legal attack on the organization; not a lot of money and at best you’d just cause some press noise and infrastructure problems. The juicy target are the downstream users;

Digging up the roots

Thursday, November 10th, 2005

My wife and I have spent the last week in a sprint to get the house ready to put on the market. Prior to that we spent the last few months slowly moving things in the right direction. Hopefully we’ll be able to stick a for-sale sign on the lawn at some time very soon. Selling a house seems to be about putting together an illusion of perfection, making sure that there’s no tiny thing that will deter the customer so you spend a lot of time staring at the floor and walls looking for something wrong.

I can feel the roots being torn out at the base of the house; ie the basement. Half of my computers are in a pile to take to the recyclers or given away, much of our crap is boxed up against a wall and the place looks tidy. It’s never looked tidy before; the laboratory of a rather deranged yet simple-minded computer techie sure, but tidy? Never.

My son is also tearing up his roots; he’s started walking, and he’s amazingly cute at it. In four days or so he’s gone from his first tentative steps to walking around trying to kick a ball and wondering why we’re clapping and cheering. You have to wonder; what was the one tiny thing that was holding him back. He’s been crusing on the furniture and standing without support for months, and he took a first step a few weeks ago. So what was it that finally clicked?

Maybe his ears found some new balance after months of crawling, or maybe it was the kick the football while holding Daddy’s hand that we’ve been playing recently :) Maybe he was just building confidence until everything felt right, an illusion of perfection again. Whatever it is, it’s a joy to watch.