Archive for the ‘Computing’ Category.

PHP Weather is moving…

PHP Weather It’s been a while since my last post — I’ve been busy. One of the things I’ve been working on is [PHP Weather][]. And the cool thing is that I’m not alone: Max Hammond has helped me a lot. He has made the beautiful logos you see here and on http://phpweather.net — he also bought the new short address.

One of the cool new things is the updated Configuration Builder which helps you build a correct configuration file.

The framework is actually usable for other projects as well if it is adapted a bit. It works by presenting some options to the user. The input is checked at the client using JavaScript and at the server by PHP. Depending on the input more options might appear — this is controlled by the options dependencies on other options. The idea is, that the user wont be asked to fill in a database-password unless he has selected a database-type that requires a password.

So, things are moving in the right direction — you should come and join us if you want to help. There’s plenty to do: if you cannot code, then perhaps you’ll be able to go through the comments in the code and correct some of the more embarrassing spelling errors I’ve made :-)

Made a couple of Java assignments

Manitou and I met yesterday and made a couple of Java assignments which were overdue. We implemented a Heap using the Locator pattern and a Vocabulary using a Trie — it was a very good learning-experience to actually implement these ADTs instead of just talking about them.

We also talked about other things — we met at 14:00 and went home again at 23:30 so there was plenty of time :-) One of the things we discussed extensively was, that he had a book, which said, that the set of all subsets of the empty set, which is denoted 2, is {∅, {∅}}. I don’t believe that this is true — the only subset of ∅ is ∅ itself, so I would say that 2 = {∅}. If 2 = {∅, {∅}}, then that would imply, that ∅ ∈ ∅ which is clearly false, as the empty set is empty. We’ll ask Jørgen Hoffman-Jørgensen about it — he should know as he’s our teacher in Probablility Theory.

Xy-pic is cool!

Image produced by Xy-pic The image you see on the right was made with the Xy-pic macros for TeX. It’s surprisingly easy to make complicated pictures like the one on the right using Xy-pic, and because it’s a package for [LaTeX][] it’s easy to include mathematics in the diagrams.

I discovered the wonderful Xy-pic by reading a note about LaTeX made by Lars Madsen, take a look here: http://home.imf.au.dk/daleif/latexkursus/. There’s a lot of really good stuff in the note, so if you’re trying to learn LaTeX and want some Danish material to get started with, then you should definitely take a look at it.

You should also read The no so Short Introduction to LaTeX by Tobias Oetiker for even more information about LaTeX. It covers everything you’ll need to know to get started using LaTeX.

More fun with TMDA

I have (of course) played some more with TMDA — the result is a script that will parse a logfile produced by TMDA and save the result in a MySQL database. When the data is in the database, it’s easy to subject it to all sorts of statistical analysis. This is exactly what I’ve done — take a look at[TMDA Logparser here (not online anymore).

TMDA is great!

I’ve been using TMDA the last two weeks and I’m very fond of if. I’ve received about 1000 mails in those two weeks, 50 of those mails are currently held back by TMDA. They are all spam except for two mails which does look legitimate. I’ve only received a single spam message — it tricked TMDA by using an empty sender address. Empty sender addresses are used by mailservers when they bounce messages that were undeliverable, so it’s a little dangerous to block those mails. But if I receive more spam using this trick, then I’ll probably change the filters so that mail from <Mailer-Daemon@*> are let through, while other mails with an empty sender address are dropped. (I cannot send out confirmation requests for those mails, because of the empty sender address.)

It seams that the confirmation request that TMDA sends to people works well — 7 people have added themselves to my whitelist.

I also think that I’ve found the problem that caused those strange uncaught Python exceptions. It turned out that I had a .procmailrc file lying around in my homedirectory. I thought that I had cleaned up after my first attempts with TMDA and procmail but I must have forgot that file. Since I removed it, I haven’t seen any errors from TMDA.