Technical: May 2005 Archives

Quite a while ago I wrote a spamassassin plugin for movable type and have been using it with great success for quite a while.

Just recently I had to move my blog from one machine to another and they had incompatible Bayes database types. This meant that the Bayes database needed to be started from scratch again and I was quite worried that this would take a while. Luckily for me I was off on holiday for 2 weeks which meant I had no access to a PC to watch my comments fill up with the usual spam. On return from my holidays I then used all the spam I had received to teach the Bayes filter again.

I have been quite surprised at how little spam I have received considering I have added less than 200 spam entries to the database. The only time I get new spam now is when I ping sites when I have added a new entry which is a good indication these sites are being spidered for recent entries etc.

Add to delicious Digg This Add to My Yahoo! Add to Google Add to StumbleUpon
| | Comments (0)

For those that encounter problems when trying to get passive ftp working with iptables make sure that the following 2 modules are loaded.


This can be done as follows:

/sbin/modprobe ip_conntrack_ftp
/sbin/modprobe ip_nat_ftp

Add to delicious Digg This Add to My Yahoo! Add to Google Add to StumbleUpon
| | Comments (2)

I seem to be suffering from language envy. I have been delving into C (again) for a couple of weeks now to speed up a text indexer and I have really enjoyed it.

I am sick of Perl. Not because I don't like it it's just that I am no longer doing anything interesting with it, perhaps this is the problem and not Perl i.e. I have no more interesting things to do that Perl is suited for.

Most of the things I need to do now require more grunt than Perl has got (I am not including XS) This is partly due to everything I need to do I has already been done at some point before or CPAN has a module that does just that and cobbling modules together gets a bit tiresome after a while. I would love to be working on a large Perl project at work but unfortunately that is not the sort of stuff we do.

Some people may regard this entry as a dig at Perl but I would disagree. Perl is brilliant once you get to know it. It allows me to do pretty much anything I want in short order. This does not mean I am not allowed to peer over the fence into the other camps and look on with envy. Perhaps the grass is greener on the other side but I need a change, if nothing else I would come back to Perl with renewed vengeance.

The following languages are all in the possible camp.

Its just lovely. Anyone who has read K&R will know what I mean. Its such a small language and limited only by the programmers abilities. To quote Kim H "C is assembler on steroids". I can remember being told that in life you can only have two of the following three items in any one item:

  1. cheap
  2. fast
  3. reliable

I think as far as programming languages go C comes closest to all three than any other language. I have delved into C several times and each time I have enjoyed it.


Everyone seems to be using Python these days and singing its praises. I have actually never written anything in it which I suppose is a good enough reason to take a shot at it. It also gets a good mention in Eric Raymods How To Become A Hacker

I like C++ because like C its also on steroids but also comes with an added dose of amphetamines, this and some features I dearly love. I like OO programming. I find it intuitive and I like to use Class diagrams to model applications. I am aware the C++ is not for the faint of heart but I have had reasonable success with it when I have used it. It also has the STL which is just a god send, nothing quite like a hashmap (You can see the Perl in me now).


Again like Python I have never had anything to do with Ruby but it gets lots of good reviews from people I trust. It also has the distinct advantage that if you type "best programming language" into Google its comes first ;). I also love smalltalk and I have heard that Ruby is the Bastard child of Perl and Smalltalk.


I have my reservations about Java but on the occasions I have used it I found the docs to be reasonable. The problem I found with it was that I felt I was working with C++ but with a slower crippled version. The only reason I can think of for using it would be if you really wanted cross platform interoperability (can be done in all of the above) and if you wanted a better paying job because the job market seems to favour Java coders.

As you will probably see from the above I have left out a fair whack of possible languages I could learn. All in all I seem to keep leaning towards C/C++ so this is probably where I am going to go for a while although like most things I won't just learn it for the sake of it. I always need to be doing something constructive in anything I am learning otherwise I find it laborious and boring.

PS (I would dearly love to learn a little Python to see if it is as fast a RAD language as Perl).

Add to delicious Digg This Add to My Yahoo! Add to Google Add to StumbleUpon
| | Comments (0)