Heroin Take Away

I just noticed the following in an article on the BBC. I admit the article was written quite a while ago but it still struck me as stating the bloody obvious.

Youngsters in Luton can now get a fix of heroin delivered faster than a pizza, a community drugs project has warned.

so whats new. I was under the impression that it pretty much the same everywhere. Only just yesterday I saw a drug deal take place on the way home from work. I regularly smell “Grass” when walking through Luton town center, particularly at night.
The articles also goes on to say

drugs use was on the rise among Asian communities in the UK.

Again, whats new. Its on the increase everywhere. To top it off though I also liked the following statement.

They also warned that drug dealers were seen by teenagers as role models.

Do I have to ask “whats new” again. Why should teenagers not look up to people who drive around in brand new BMW’s and Merc’s. When ‘Dad’ says
“Son, drugs are bad! Don’t do them and don’t sell them!”
‘Son’ then sees dad catch the bus to work while Mr drug dealer sales past with the roof down in a BMW convertible.
What message are we sending to the kids when this happens.
“Thats society won’t tolerate drugs.”
Errrrrrrrr, wrong answer!
As far as most kids are concerned they see flash cars and bling on the drug dealer, looking at his dad he sees sweat on his brow and a worn out suit on his back.
We are not sending the right message to the teenagers by allowing drug dealers to walk the streets. Lock them up and throw away the key. Of course it costs a lot of money to put people in prison so we tend towards leniency. God forbid we would be too harsh on our criminals and cost the taxpayer more money!

Blog Spam Success

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.

microsoft.com jobs feed

I have just added all of the microsoft.com jobs to the Rss Jobs search engine. They have now been indexed.
Now all I need to do is find several more large corporates to add to UKlug. If anyone has any suggestions then please feel free to let me know.

Scuba Diving in Key Largo

I finally got around to getting my PADI Open Water diving qualification while I was on holiday. Its something I have meant to do for a long time.
We decided to go to Key Largo to do it. Jenny made a few phone calls and to be honest the prices where all quite similar, $400 to $450 each. We eventually phoned Pleasure Diver.
Jenny asked them if they could squeeze us in the following day and they said they could, they also offered to lend us their DVD player so that we could watch the PADI DVD’s in our room. This extra effort on their part sold them to us and although we did not know it at the time we had really landed on our feet.
What we liked about Don and Janet was the fact that they had paid attention to lots of the details and that they went out of their way to help us. It was a real personal service and judging from what I have heard about larger dive outfits this is quite rare.
Everything was very relaxed and when we went out on the boat if the visibility was bad we would move somewhere else. We could have quite happily have dived in the areas and got the qualification but as far as Don and Janet was concerned getting the qualification should be fun which means you should be able to see wildlife or anything else you wanted to see while doing it.
It was also made interesting each time because instead of going through the motions and coming up we would do some exercises and then go looking at the wildlife and then do some more etc etc. This took the monotony out of the course while consolidating the pool work.
Another thing I didn’t expect was to have Chocolate Brownies waiting for us after each dive. They also laid on complimentary refreshments. After breathing all the dry air an ice cold bottle of water and a chocolate Brownie was exactly what the doctor ordered.
We both noticed that a lot of effort was put into customer service. We did not know it at the time but they had owned a B&B in Virginia which meant they really knew there stuff when it came to looking after guests and it showed in everything they did. The fact that they limit passengers to 6 on a 40 foot boat is a good indication that they know what it means to travel in comfort.
We spent 4 days there and I want to go back to dive with them again. For anyone interested in diving and thinking about the Keys then I could not recommend Pleasure Diver enough.

Jet Lag

I always wondered what it was like to feel the effects and to be honest I thought that it was a bit of a myth and that people made it out to be worse than it really is. I can confirm that it is every bit as bad as they say it is.
I got back to the UK from Sanford at 5:55am on Sunday and most of the day was spent trying to get to sleep but my body was having none of it. Managed a few hours that night. Monday was spent at work trying to focus on the monitor. Monday night was abysmal, passed out then woke up again at 3am and was unable to get back to sleep. I phoned in sick and then passed out again until 15:30. I am going to try to go to bed at a normal time tonight and see what happens.
It must be pretty bad for those that go to Australia.

passive ftp and iptables

For those that encounter problems when trying to get passive ftp working with iptables make sure that the following 2 modules are loaded.
ip_conntrack_ftp
ip_nat_ftp
This can be done as follows:
/sbin/modprobe ip_conntrack_ftp
/sbin/modprobe ip_nat_ftp

Language Envy

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.
C:
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.
Python:
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
C++:
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).
Ruby:
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.
Java:
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).

Postgres and libpq-fe.h

I have been using a Perl based indexer for some time now for the search facility on UKlug but just recently I have noticed that its taking a bit too long to run. This is not the first time I have optimized the indexer but this time I decided to bite the bullet and write it in C.
I have also changed the way the search engine works to tf/idf term ranking. This has added some overhead to the indexing so it would just have been slower if I had left it.
Of course interfacing with Postgresql meant that I had to blow the cobwebs off my libpq skills. Having used libpq a while back I was reasonably familiar with it but it still took me a while to get back into it. It does not help that the docs are a bit spartan and the examples are little use. It was a case of fudge it and see what works.
The indexing takes place as follows
get job text
parse out terms
count terms in text
insert into reverse index data_id,term,term_count
The actual weighting calculation takes place at runtime.
Of course there are problems with what I am doing. The biggest of which is character encoding. At the moment I have not really had to worry too much about this because most of the jobs in the database have been either from the states of UK. So for all intents and purposes treating the text as ASCII was sufficient for my needs. I have just recently added both Dutch and German feeds to the database so its getting to the point where I can no longer ignore the encoding issue.
Another problem is of course the fact that a reverse index does not scale as well as other methods although at the moment it’s handling several million entries with comfort.

passwd: Critical error – immediate abort

If you are seeing these messages then make sure that you have installed pam_cracklib.so. It will manifest itself as unrecognized module when trying to change the password or add a user.
PAM unable to dlopen(/lib/security/pam_cracklib.so)
PAM [dlerror: /lib/security/pam_cracklib.so: cannot open shared object file: No such file or directory]
PAM adding faulty module: /lib/security/pam_cracklib.so
If you ever get the following message and are not sure why!
passwd: Critical error – immediate abort
Make sure you install wenglish or another dictionary installed and run
/etc/cron.daily/cracklib
and try again.

Walsh Western Shambles

I ordered a set of Non Dell rails from Dell 7 days ago and they where ready to be delivered to me on the Thursday. I though this was great. I got a call on Thursday from Walsh Western saying that they had tried to deliver the rails. I found this very odd because Jenny was in the house. They said they left a card saying they had been there. I phoned Jenny and she had a look for the card. It wasn’t there.
Friday: Same thing. They say they left a card and Jenny was off work the whole day but we received no card and have not heard anything from them at all.
Saturday: I called them to ask what the hell was going on and they told me that it would be delivered on Monday.
Monday: No rails, No card, No phone call, Sweet FA. I tried to phone but they all close at 17:30.
TO BE CONTINUED
This is just a bit pathetic although not as pathetic as my recent encounter with Midland Mainline.