There is currently a petition on the Prime Minister’s website calling
for a clear ban on software patents. I was hesitant to sign it, not
because I want software patents, but due to the langauge of the

Software patents are used by convicted monopolists to
threaten customers who consider using rival software. As a result,
patents stifle innovation.

Patents are supposed to increase the rate of innovation by publicising
how inventions work. Reading a software patent gives no useful
information for creating or improving software. All patents are writen
in a sufficiently cryptic language to prevent them from being of any
use. Once decoded, the patents turn out to be for something so obvious
that programmers find them laughable.

It is not funny because the cost of defending against nuicance lawsuites
is huge.

The UK patent office grants software patents against the letter and the
spirit of the law. They do this by pretending that there is a difference
between software and ‘computer implemented inventions’.

Some companies waste money on ‘defensive patents’. These have no value
against pure litigation companies and do not counter threats made
directly to customers.

The aggressive and ad-hominem language doesn’t do anything to help
the cause. It looks unprofessional and will result in the authorities
ignoring it as a fanatic incoherent rant and will put off people from
signing the petition. I’d be interested to know how many people didn’t
sign because of the text.

It’s been a while since I last wrote an article, but I’ve just
published a new one on troubleshooting
. It’s based on a
couple of emails I sent to a mailing list helping someone with their
networking problem. I decided to clean it up a bit and publish it. It is
mostly for finding where the problem lies, rather than fixing the issue,
but I would be grateful for any comments you have, particularly if you
think I’ve missed any obvious steps.

mojo-jojo david% ant clean
Buildfile: build.xml

     [echo] Deleting all project files
   [delete] Deleting directory /home/david/tomcat5.5-5.5.20/servletapi
   [delete] Deleting directory /home/david/tomcat5.5-5.5.20/container
   [delete] Deleting directory /home/david/tomcat5.5-5.5.20/jasper
   [delete] Deleting directory /home/david/tomcat5.5-5.5.20/connectors
   [delete] Deleting directory /home/david/tomcat5.5-5.5.20/build

Total time: 46 seconds
mojo-jojo david% ls
build.xml  debian/
mojo-jojo david% 


I decided it was probably time that I started backing up my
PostgreSQL databases and ended up writing a quick script to do just
that. I did have a look at pg_dumpall, but it appears
to only write to stdout, meaning I couldn’t have a file per database
like I wanted.


set -u
set -e


date=$(date +"%Y-%m-%d")
mkdir -p $dumpdir
find $dumpdir -name "*.sql" -mtime +10 -exec rm {} ;
for database in $(su - postgres -c "psql -l -t" | cut -d'|' -f 1 | grep -v template0);
        su - postgres -c "pg_dump $database" > $dumpdir/$database-$date.sql;

su - postgres -c "pg_dumpall -g" > $dumpdir/global-$date.sql

Just stick that in /etc/cron.daily/postgresql-backups and
you should end up with 10 days worth of backups. I’m not sure if
postgreSQL can have spaces in database names. I’m assuming it can’t.
The only other issue to deal with is not storing it on the same machine
as the database server, let alone on the same physical hardware or even
worse, the same partition.

Update: Corrected typo and added dumping global
objects to the script.

Sorry to anyone that got spammed by my change to pyblosxom
earlier today. I changed the base url, which changed the link of the
entries. I should sort out having proper guids.

It can be quite discouraging to type “yum update” and have
yum simply go off forever. Among other things, one must wait a great
long time to distinguish this behavior from yum’s normal mode of
operation. Other times, it comes back very quickly with a message
saying, for all practical purposes, “RPM crashed, you lose,

via (subscription

Jonathan Corbet normally manages to amuse me on a weekly basis, but
this time he’s outdone himself. Consider my subcription renewed
for another year.

Update: I;ve been convinced to include a subscriber
link to the article for those without subscriptions.

use atom
rather than RSS. It has a <updated/> element for the last time the
entry was updated and a <published/> element for the date the
entry was published.

If you want to stick with RSS, you can use the
<dcterms:issued/> element for the initial published date and one
of <pubdate/>, <dc:date/> or <dcterms:modified/>.
Don’t forget to include the xml namespace for dc and dcterms.

I’m not entirely sure what you did to break Planet, but using a strict
feed parser will just result in you missing a significant number of
entries. People sadly don’t produce valid feeds and will blame your
software rather than their feeds. It doesn’t help that a number of
validators aren’t entirely strict and that RSS doesn’t have a very
comprehensive spec. RSS is a lot worse than Atom, in part thanks to the
Atom validator and very well thought out spec. It’s for this reason that
I ended up writing Eddie rather
than using ROME as it was a DOM
parser and just failed to get any information out of a non-wellformed
feed. Eddie on the other hand is a SAX-based parser. In a recent
comparison, an Eddie based aggregator managed to correctly parse several
more entries than a ROME based aggregator one particular day.

You also have major
aggregators being liberal. Sam Ruby discussed
this recently
with Bloglines becoming the defacto validator; if
bloglines parses it, then it’s valid. We had the same problem with HTML
with people making sure their pages worked in a browser rather than met
the spec.

I suspect the problem you had with Planet is that you failed to close
a tag, causing the rest of the page to be in bold or be a link etc.
This is fairly easily solvable and in fact has been with FeedParser,
which is the feed parsing library Planet uses. It has support for using
HTMLTidy and similar libraries for fixing unbalanced elements. Eddie
uses TagSoup to do a similar thing. As a result I’ve not noticed any
particular entry leaking markup and breaking the page. Parhaps Planet
Debian just needs to install one of the markup cleaning libraries.

I agree that people should use XML tools where possible.
Unfortunately, most blogging tools use text based templating systems,
which makes producing non-wellformed XML too easy. To deal with this I
pass all my output through an XSLT filter, which means that everything
is either well formed or doesn’t output at all. Unfortunately I don’t
think everyone would be capable or willing to use XSLT.

I was using our Fedora 3 server and decided to restart sshd running in a

[root@winky /]# /etc/init.d/sshd restart
Stopping sshd:/etc/init.d/sshd: line 212: kill: (1483) - No such process
Connection to winky closed by remote host.
Connection to winky closed.
mimsy david% ssh winky -l root
ssh: connect to host winky port 22: Connection refused

Thank you very much Fedora.

A “friend” of mine has recently been sending me forwarded jokes and
other assorted crap we all grew out of sending about 5 minutes after
we learnt how to send emails. This I can cope with, but recently, for
every email she sends, I’ve been receiving an automated email from a
server somewhere telling me that it’s blocked an attachment, once for
each attachment
in the original email. That’s crime number one. Looking
at it further it appears that its not the sender’s mail servers doing
it, but once of the recipient’s mail servers. When it gets an email
with an attachment it’s blocked, it emails everyone in the To: header
to tell them, irrespective of whether they are local users or
. That’s crime number two.

I thought I’d email to tell them of
this problem, but unsurprisingly it bounced. That’s crime number
three. Looking on their website, I couldn’t find any technical
contacts, which wasn’t really surprising. I did how ever find a
“general enquiries” form, so I filled that in. Unfortunately, they
used the following html for the message box:

<textarea name="Feedback1:fldEnquiry" rows="6" cols="1"
   id="Feedback1_fldEnquiry" class="enquiryTable"></textarea>

The result is that you get a text box 6 rows high and one column
across, which is basically unuseable. Interestingly they appear to
add style="width: 350px;" in IE, which makes it work. I’ll
make that crimes 4 and 5, cos doing different things for different
browsers is a crime in itself.

I await a phone call or email from them.