The (next) government game

Assume that after elections two coalitions are formed. Let’s call them Player1 and Player2. Player1, although they can rule, wants Player2 to join them in forming a Government. Player2 refuses and aims for reelection where they believe that they will be in a better position. It is all a game of success and failure on the government to be formed:

The Government Game

So in the case where Player 2 believes that Player 1 cannot make it alone, they bet on their downfall in order to win the next elections whenever they are. And while Player 1 knows that they cannot make it, even with Player 2 on board, they push for their participation so as to make them irrelevant too in the next elections.

Any similarities to present day politics is purely coincidental.

Leadership is nature’s way of removing morons from the productive flow

The title is Dogbert‘s 1995 statement of the Dilbert Principle. See what Orwell wrote:

“Between the two branches of the Party there is a certain amount of interchange, but only so much as will ensure that weaklings are excluded from the Inner Party and that ambitious members of the Outer Party are made harmless by allowing them to rise.”

Then again, everyone gets promoted to their level of incompetence.

Το κοπάδι

The flock, circa 2007

Η φωτογραφία είναι από συγκέντρωση μεγάλου κόμματος πριν τις εκλογές του 2007. Πήγα επειδή ένας καλός μου φίλος “θα το εκτιμούσε πολύ” όπως μου είπε. Τι θυμάμαι; Θυμάμαι σε κάθε τραπέζι μπουκάλι με κρασί, τυρί και ζαμπόν. Θυμάμαι το προβεβλημένο στέλεχος-βουλευτή να προμοτάρει άλλους λιγότερο έμπειρους (“Έχει αρκετούς σταυρούς η Β’ Αθηνών, οπότε να βοηθήσουμε και τους συναγωνιστές μας”), κόσμο να μπαίνει στην ουρά για χειραψία με τον μεγαλοβουλευτή (συμπεριλαμβανομένου και ενός διαιτητή της Α’ Εθνικής που έχει αποσυρθεί) και εμένα να αναρωτιέμαι ποιος πληρώνει για όλα αυτά.

Α ναι, ο μεγαλοβουλευτής είχε φροντίσει να ευχαριστήσει τον ιδιοκτήτη του χώρου για την φιλοξενία…

Ελαιοχρωματιστής – ‘Ελληνας

Painter advertisement. Ethnicity as a value added service

“ΕΛΑΙΟΧΡΩΜΑΤΙΣΤΗΣ ΕΛΛΗΝΑΣ, ΕΜΠΕΙΡΟΣ, ΥΠΕΥΘΥΝΟΣ, ΑΝΑΛΑΜΒΑΝΕΙ ΔΙΑΜΕΡΙΣΜΑΤΑ, ΤΑΡΑΤΣΕΣ, ΚΑΤΑΣΤΗΜΑΤΑ”

Ρε μάστορα για 15 και πλέον χρόνια τις δουλειές αυτές τις κάνανε οι μετανάστες και στην καλύτερη ο Έλληνας είχε το συνεργείο. Άσε που και τα συνεργεία πλέον τα τρέχανε οι μετανάστες μόνοι τους. Το γεγονός πως έχουμε φτάσει να είναι η εθνικότητα του μάστορα differentiation στην παρεχόμενη υπηρεσία είναι ενδεικτικό της κατάστασής μας ως κοινωνία.

Revelation

This is a quote from John R Boyd:

A loser is someone is someone —individual or group —who cannot build snowmobiles when facing uncertainty and unpredictable change;

Whereas,

A winner is someone —individual or group —who can build snowmobiles, and employ them in an appropriate fashion, when facing uncertainty and unpredictable change.

Yesterday’s match (FCB vs Chelsea: 2-2) reminded me of this.

[source pdf]

Note: Boyd’s favorite example during speeches, was to have his audience build a mental “snowmobile” from what they can gather from the surroundings of the situation they are in, by decomposing other stuff to build it.

memcached and MIMEDefang – a cool combination

I like milter-ahead a lot. But in our particular deployment it is not a best fit for it assumes that all the useful information for deciding whether to accept or reject email resides not on the server that it runs on, but in the servers that it queries. This is not milter-ahead’s fault. Milters have no way of expanding aliases while checking the recipient address so the programmer has to use tricks like parsing the output of sendmail -bv user@address thus running a second sendmail process for the same delivery. The alternative would be to hack milter-ahead to check with the alias database the existence of recipient addresses, but doing so the way sendmail reads the alias database is overly complex. One could also write an external daemon to monitor the alias database and inject entries in the (Berkeley DB) database maintained by milter-ahead, but that database is locked exclusively. And yes, exceptions could be entered in the access database, but that would mean maintaining two files for a single (and not so frequent) change in the alias files.

As I’ve blogged before, one of the reasons that I like MIMEDefang is that it gives the Postmaster a full programming language to filter stuff. By simply using md_check_against_smtp_server() a poor man’s non-caching version of milter-ahead is possible. Adding support to read the alias database (be it the text file or the hash table) is also trivial.

But what about the case of busy mail systems? You do not want to hammer your mail servers all the time with queries for which the answer is going to be constant for long periods of time. You need a caching mechanism. At first I thought of implementing such a mechanism the way milter-ahead does: By using a Berkeley DB database and some expiration mechanism, either from within MIMEDefang (retrieve the key and if it should have been expired by now delete it, otherwise proceed as expected) or by an external “garbage collecting” daemon. But such an interface with a clean way to enter keys and values already exists and performs well: memcached. So by using Cache::Memcached within the mimedefang-filter mimicking basic milter-ahead behavior (with caching) was done.

But what about the local aliases in the mail server? After all this was all the fuss that prompted the switch anyway. I wrote a Perl script that opened the alias database using the BerkeleyDB package. Two details need caution here:

  • The first one is ignoring the invalid @:@ entry in the alias database. You do not see it in the alias text file, but you will see it when you run praliases. Sendmail uses this entry in order to know whether the database is up-to-date or not. See the bat book for a longer discussion of this.
  • The second detail is that since the alias database is written by a C program, all strings are NULL terminated. This is not the case with strings that are used as keys and values with Perl and the BerkeleyDB package. However the Perl BerkeleyDB package provides for filters to deal with this case. You need something like:
    $db->filter_fetch_key( sub { s/\0$// } );
    

And then there’s the issue of making such a script a daemon. One can go the traditional way, use a daemonizer on steroids or simply use Proc::Daemon::Init and be done with it.

memcached comes handy to storing key-value pairs in many system administration tasks and I think I’m going to use it a lot more in mail filtering stuff.