<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Julius' Blog</title>
  <link href="http://blog.plenz.com/atom.xml" rel="self" />
  <link href="http://blog.plenz.com/" />
  <updated>2012-02-22T23:18:56+01:00</updated>
  <id>http://blog.plenz.com</id>
  <author>
    <name>Julius Plenz</name>
    <email>blog@plenz.com</email>
  </author>
  
  <entry>
    <title type="html">Bookdump</title>
    <link href="http://blog.plenz.com/2012-02/bookdump.html" />
    <updated>2012-02-22T20:41:00+01:00</updated>
    <id>http://blog.plenz.com/2012-02/bookdump</id>
    <content type="html">&lt;p&gt;&lt;img src=&quot;/img/thinking-kahneman.jpg&quot;
alt=&quot;Cover of Kahneman's »Thinking, fast and slow«&quot;
style=&quot;float:right; margin: 0 0 .7em .3em&quot; /&gt;
Ein Buch, das man sich wirklich nicht entgehen lassen sollte, ist
&lt;strong&gt;Thinking, fast and slow&lt;/strong&gt; von Nobelpreisträger &lt;strong&gt;Daniel Kahneman&lt;/strong&gt;.
Es ist sicherlich kein sehr mitreißendes Buch, aber auch nicht allzu
trocken oder komplex. Thema des Buches sind die zwei Akteure &lt;em&gt;System
I&lt;/em&gt; und &lt;em&gt;System II&lt;/em&gt; &amp;ndash; die Intuition, die zwar schnell, dafür aber
ungenau arbeitet und leicht zu täuschen ist, und das, was wir
&quot;angestrengtes Nachdenken&quot; nennen.&lt;/p&gt;

&lt;p&gt;Im Wesentlichen geht es darum, was für Mechnismen gewissen für uns
typischen Denkmustern zugrund liegen, wie wir sie analysieren können,
und was für Fehlinformationen sie uns glaubhaft machen können. Als
wissenschaftliche Grundlage dienen dafür Gedankenexperimente, die
großteils auch an Gruppen von Probanden getestet werden. (Jeweils
gegen monetäre Entschädigung, häufig ist die Höhe der Entschädigung
auch Grundlage des Experiments; wer finanziert sowas eigentlich? Und
warum mache ich nie bei solchen Studien mit, wo man durch Beantworten
einiger weniger Fragen ein paar Dutzend Euro erhalten kann? &amp;ndash;)&lt;/p&gt;

&lt;p&gt;Kahneman erklärt anhand einiger simpler kognitiver Illusionen, denen
wir tagtäglich erliegen und die uns als scheinbar rationale Wesen
objektiv völlig irrationale Handlungen unternehmen lassen, wie wir
diese Illusionen a) erkennen können und teilweise auch b) dagegen
vorgehen können.&lt;/p&gt;

&lt;p&gt;Das Buch hat übrigens einen guten Index, so dass ich auch die äußerst
passende Zusammenfassung aus dem Nachwort wiederfinden konnte:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;The way to block errors that originate in System 1 [intuition] is
simple in principle: recognize the signs that you are in a cognitive
minefield, slow down, and ask for reinforcement from System 2 [careful
thinking, as in: doing the math, considering statistics]. This is how
you will proceed when you next encounder the &lt;a href=&quot;http://en.wikipedia.org/wiki/M%C3%BCller-Lyer_illusion&quot;&gt;Müller-Lyer
illusion&lt;/a&gt;.
When you see lines with fins pointing in different directions, you
will recognize the situation as one in which you should not trust your
impression of length. Unfortunately, this sensible procedure is least
likely to be applied when it is needed most. We would all like to have
a warning bell that rings loudly whenever we are about to make a
serious error, but no such bell is available, and cognitive illusions
are generally more difficult to recognize than perceptual illusions.
(p. 417)&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Im Nachwort räumt Kahneman übrigens mal eben so mit der &lt;a href=&quot;https://en.wikipedia.org/wiki/Chicago_school_of_economics&quot;&gt;Chicago
School&lt;/a&gt;
auf, die ja wesentlich auf der Illusion eines &quot;rationalen Menschen&quot;
aufbaut: &lt;q lang=&quot;en&quot;&gt;The economists of the Chicago school do not face
that problem [whether to protect people from themselves], because
rational agents do not make mistakes. For adherents of this school,
freedom is free of charge.&lt;/q&gt; (p. 412) &amp;ndash; &amp;ndash;&lt;/p&gt;

&lt;p&gt;Etwas leichtere Kost war &lt;strong&gt;Philip Roths&lt;/strong&gt; &lt;strong&gt;Nemesis&lt;/strong&gt;. Im Sommer 1944
geht es ums Überleben: Für die einen, weil sie in den Krieg ziehen
müssen, für die anderen, weil sie zu jung sind, und sich zu Hause mit
einer Polioepidemie konfrontiert sehen. Auch wenn der Protagonist
diesmal nicht krebskrank in der Midlife-Crisis steckt, gelingt es Roth
doch leider nicht, mal einen Roman zu schreiben, in dem es nicht um
Tod, Verfall und Bedauern über das eigene Leben geht. Nichts also,
womit ich mich identifizieren kann. &amp;ndash; Viel eher kam ich dagegen
mit &lt;strong&gt;Charles Bukowskis&lt;/strong&gt; autobiographischem Character &lt;em&gt;Chinaski&lt;/em&gt; in
&lt;strong&gt;Das Liebesleben der Hyäne&lt;/strong&gt; zurecht: Ein herrliches Buch, das ich an
einem Abend gelesen habe. Hoffentlich bin ich mit 50 auch noch so gut
drauf!&lt;/p&gt;

&lt;p&gt;Mal wieder zwei nicht zu Ende gelesene Bücher, die mich nicht vom
Hocker gehauen haben: &lt;strong&gt;Thomas Pakenham: Der kauernde Löwe&lt;/strong&gt;, eine
monumentale, aber doch etwas schwerfällige Biographie der Eroberung
und Kolonialisierung der Mitte des afrikanischen Kontinents (also im
Wesentlichen auch die Suche nach der Quelle des Nil) &amp;ndash; &lt;strong&gt;Anne
Michaels: Wintergewölbe&lt;/strong&gt;, ein Roman über den Ab- und Wiederaufbau des
&lt;a href=&quot;http://en.wikipedia.org/wiki/Abu_Simbel_temples&quot;&gt;Abu-Simbel-Tempels&lt;/a&gt;.
Die Abschnitte über die forcierte Umsiedlung der Nubier (und das
Pendant in Kanada) ist spannend und ergreifend, aber alles
pseudo-bedeutungsschwere dazwischen langweilt nach den ersten drei
Seiten, leider.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">&quot;Shouting in the Dark&quot;</title>
    <link href="http://blog.plenz.com/2012-02/shouting-in-the-dark.html" />
    <updated>2012-02-21T15:56:00+01:00</updated>
    <id>http://blog.plenz.com/2012-02/shouting-in-the-dark</id>
    <content type="html">&lt;p&gt;Al Jazeera's documentary about the Bahrain protests, &lt;em&gt;Shouting in the Dark&lt;/em&gt;,
&lt;a href=&quot;http://www.aljazeera.com/news/middleeast/2012/02/201222184931745785.html&quot;&gt;has received a prestigeous award&lt;/a&gt;.
The documentary is really worth watching.&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube-nocookie.com/embed/xaTKDMYOBOU&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;true&quot;&gt;&lt;/iframe&gt;


&lt;p&gt;I found the insidious practices of the Bahraini prince &amp;ndash; and the Arab
league's suport &amp;ndash; extremely unnerving.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Bundespräsident</title>
    <link href="http://blog.plenz.com/2012-02/bundespr%C3%A4sident.html" />
    <updated>2012-02-19T23:33:00+01:00</updated>
    <id>http://blog.plenz.com/2012-02/bundespräsident</id>
    <content type="html">&lt;p&gt;Ich vermeide es größtenteils, über Politik zu schreiben. Das liegt
im wesentlichen daran, dass es einfach sehr viele Leute gibt,
deren Tagesgeschäft das ist und die folglich darin um einige
Größenordnungen besser sind als ich. Außerdem ist es so, dass mich die
Beschäftigung mit Politik fast ausnahmslos wütend macht: Täglicher
Politik-Nachrichten-Konsum ist bestens dazu geeignet, den Glauben an
Fortschritt in unserer Gesellschaft zunichte zu machen.&lt;/p&gt;

&lt;p&gt;Aktueller Anlass ist natürlich &lt;a href=&quot;http://tagesschau.de/inland/kandidatensuchebundespraesident106.html&quot;&gt;die Einigung vierer von fünf im
Bundestag vertretenen Parteien auf Gauck als neuen
Bundespräsidenten&lt;/a&gt;.
Man &lt;em&gt;bemüht&lt;/em&gt; sich dort noch nicht einmal, diesem Gauck irgendwelche
Qualitäten, die ihn als Bundespräsidenten auszeichnen würden,
zuzusprechen: &lt;q&gt;Merkel sagte, mit Gauck verbinde sie vor allem die
gemeinsame Vergangenheit in der DDR. Für Gauck habe sich der Weg von
der Kirche in die Politik von fast alleine ergeben. Ihn zeichne aus,
ein &quot;wahrer Demokratielehrer&quot; geworden zu sein.&lt;/q&gt; &amp;ndash; Ja,
Demokratielehrer schön und gut. Aber Aufgabe des Bundespräsidenten
sollte es ja nicht sein, Demokratie zu lehren. Seine Aufgabe sollte es
vor allem auch sein, den Fokus auf Probleme im Land und im politischen
Diskurs zu lenken. Das kann man von Gauck wohl eher weniger erwarten.&lt;/p&gt;

&lt;p&gt;Im wesentlichen scheint ein schlagendes Argument zu sein, dass sich
viele Deutschen Gauck als Präsidenten wünschen. Das klingt auch
vernünftig, bis man &lt;a href=&quot;http://www.nachdenkseiten.de/?p=11012&quot;&gt;die Hintergründe
recherchiert&lt;/a&gt;. Kaliber
&quot;Guttenberg ist so nett&quot;, sag ich nur.&lt;/p&gt;

&lt;p&gt;Ein &lt;em&gt;Pastor&lt;/em&gt; soll Präsident in Deutschland werden. &amp;ndash; Pastoren:
Das sind diejenigen, die professionell, das heißt um ihr täglich Brot
zu verdienen, Tag für Tag, Woche für Woche Unwahrheiten predigen. Das
sind diejenigen Menschen, die die evangelische Kirche repräsentieren
&amp;ndash; und somit im Grunde ihres Wesens &lt;em&gt;gegen&lt;/em&gt; Fortschritt und
Selbstverantwortlichkeit sind. (Man darf sich wohlgemerkt nicht von
der Tatsache blenden lassen, dass auch Gutes aus diesen Kreisen
kommt!) &amp;ndash; &amp;ndash; Wenn wir eines in diesem Land &lt;em&gt;nicht&lt;/em&gt; gebrauchen
können, dann einen zahnlosen,
&lt;a href=&quot;http://www.rhein-zeitung.de/startseite_artikel,-Wulff-Nachfolge-Stimmung-gegen-Gauck-im-Netz-_arid,382775.html&quot;&gt;anti-sozialen&lt;/a&gt;,
&lt;em&gt;christlichen&lt;/em&gt; Bundespräsidenten.&lt;/p&gt;

&lt;p&gt;Auch wenn man Fefes Ratschläge vielleicht nicht immer erst nehmen
sollte: Die &lt;a href=&quot;https://blog.fefe.de/?ts=b1c0b489&quot;&gt;Nominierung Georg Schramms&lt;/a&gt;
wäre in der Tat &lt;a href=&quot;https://blog.fefe.de/?ts=b1c0b489&quot;&gt;ein Geniestreich&lt;/a&gt;
der Piraten &amp;ndash; &lt;a href=&quot;https://blog.fefe.de/?ts=b1bf98cf&quot;&gt;gewesen&lt;/a&gt;. Ich
habe heute zwei Stunden lang alte TV-Mitschnitte von Schramm geschaut
&amp;ndash; die nota bene alle in öffentlich-rechtlichen Kanälen liefen,
das hat mich doch positiv überrascht! &amp;ndash; und da ist wirklich mal
ein Mann, der mit der Faust auf den Tisch haut, &lt;a href=&quot;http://youtu.be/urvK7_OCpjQ&quot;&gt;ein Loblied auf den
Zorn singt&lt;/a&gt; und &lt;em&gt;wirklicht&lt;/em&gt; etwas zu
sagen hat.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Sag ich doch, andere können das besser. So zum Beispiel Deniz Yücel
in &lt;a href=&quot;https://taz.de/Kommentar-Gauck/!88277/&quot;&gt;seinem Replik&lt;/a&gt; auf die Kritik
Lobos, der dessen &lt;a href=&quot;https://www.taz.de/Kolumne-Besser/!88071/&quot;&gt;Kolumne&lt;/a&gt; kritisierte:
&lt;q&gt;Der Holocaust, meint er [Gauck], ist eine Ersatzreligion der Gottlosen. Damit stellt
er sich in die Tradition von Leuten, die ein Leben und Denken ohne Gott für
unvorstellbar halten und den Nationalsozialismus gerne für ein Produkt der
Gottlosigkeit halten, anstatt darin auch das in Ideologie wie Praxis
modernisierte und radikalisierte Ergebnis des christlichen Antijudaismus zu
erkennen.&lt;/q&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">C Programming Exam Fail</title>
    <link href="http://blog.plenz.com/2012-02/c-programming-exam-fail.html" />
    <updated>2012-02-17T15:26:00+01:00</updated>
    <id>http://blog.plenz.com/2012-02/c-programming-exam-fail</id>
    <content type="html">&lt;p&gt;I just wrote an exam for the course &lt;em&gt;Technische Informatik III&lt;/em&gt; which was about
operating systems and network communication. In the exercises throughout the
semster, we &lt;a href=&quot;http://git.plenz.com/ti3/&quot;&gt;had to program in C a lot&lt;/a&gt;. Naturally,
in the exam was one task about interpreting what a C program does.&lt;/p&gt;

&lt;p&gt;It was really simple: Listening on a UDP socket and print incoming packets
along with source address and port. The program looked somewhat like this (from
what I remember; also some things were done in a not so clever way on the exercise
sheet, and they had obfuscated the variable names to a non-descriptive
&lt;code&gt;a&lt;/code&gt;, &lt;code&gt;b&lt;/code&gt;, etc.):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;sys/types.h&amp;gt;
#include &amp;lt;sys/socket.h&amp;gt;
#include &amp;lt;netinet/in.h&amp;gt;
#include &amp;lt;arpa/inet.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;error.h&amp;gt;

int main(int argc, char *argv[])
{
    int sockfd;
    struct sockaddr_in listen, incoming;
    socklen_t incoming_len;

    char buf[1024];
    int len; /* of received data */

    /* listen on 0.0.0.0:5000 */
    listen.sin_family = AF_INET;
    listen.sin_addr.s_addr = INADDR_ANY;
    listen.sin_port = htons(5000);

    if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
        perror(&quot;socket&quot;);

    if(bind(sockfd, (struct sockaddr *) &amp;amp;listen, sizeof(listen)) == -1)
        perror(&quot;bind&quot;);

    while(1) {
        len = recvfrom(sockfd, buf, 1024, 0, (struct sockaddr *) &amp;amp;incoming,
                        &amp;amp;incoming_len);
        buf[len] = '\0';
        printf(&quot;from %s:%d: \&quot;%s\&quot;\n&quot;, inet_ntoa(incoming.sin_addr),
                ntohs(incoming.sin_port), buf);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I lol'd so hard when I saw this. It's a classic off-by-one error. (Can
you spot it, too?)&lt;/p&gt;

&lt;p&gt;If you want to store &lt;em&gt;x&lt;/em&gt; bytes of data in a string, reserve &lt;em&gt;x+1&lt;/em&gt;
bytes for the NULL termination character. Here, if you send a message
that is exactly 1024 bytes long (or longer, as it'll get truncated),
&lt;code&gt;buf[len]&lt;/code&gt; will actually be the 1025&lt;sup&gt;th&lt;/sup&gt; byte. Which might
just be anything.&lt;/p&gt;

&lt;p&gt;And those guys want to teach network and filesystem programming
&amp;ndash; hilarious. :-D&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Momente im Winter</title>
    <link href="http://blog.plenz.com/2012-02/momente-im-winter.html" />
    <updated>2012-02-13T09:26:00+01:00</updated>
    <id>http://blog.plenz.com/2012-02/momente-im-winter</id>
    <content type="html">&lt;p&gt;In manchen Momenten hasse ich das Leben hier: Habe gerade eben den Zug
in Dresden verpasst, und der nächste fährt erst in zwei Stunden. Der
Gutschein der Deutschen Bahn, den ich vor ein paar Wochen per Post
bekam und den ich nun einzulösen gedachte, ist nur für Fahrkarten
gültig, deren Wert fünfzig Euro übersteigt (wohlgemerkt &lt;em&gt;nach&lt;/em&gt; 50%
BC-Rabatt) &amp;ndash; hat man ja auch eher seltener, wenn's keine ganz
große Reise ist.&lt;/p&gt;

&lt;p&gt;Und so sitze ich am Hauptbahnhof bei frostigen Graden. Na immerhin
macht es sich bezahlt, dass ich UMTS eingerichtet habe &amp;ndash; das
funktioniert nämlich.&lt;/p&gt;

&lt;p&gt;Wäre doch bloß Sommer, dann wär's sicher ganz angenehm hier.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">minimizing Linux filesystem cache effects</title>
    <link href="http://blog.plenz.com/2012-02/minimizing-linux-filesystem-cache-effects.html" />
    <updated>2012-02-09T23:43:00+01:00</updated>
    <id>http://blog.plenz.com/2012-02/minimizing-linux-filesystem-cache-effects</id>
    <content type="html">&lt;p&gt;Last weekend I toyed around a bit and tried to write a &lt;a href=&quot;https://github.com/Feh/nocache&quot;&gt;shared object
library that can be used via &lt;code&gt;LD_PRELOAD&lt;/code&gt; to minimize the effect a
program has on the Linux filesystem
cache&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Basically the use case is that you have a productive system running,
and you don't want your backup script to fill the filesystem cache
with mostly useless information at night (files that were cached
should stay cached). I didn't test whether this
brings measurable improvements yet.&lt;/p&gt;

&lt;p&gt;The coding was really fun and provided me with yet another insight how
the simple concept of file descriptors in UNIX is just great. (GNU
software is tough, though: I got stuck once, and &lt;a href=&quot;http://stackoverflow.com/questions/9161116/intercepting-the-openat-system-call-for-gnu-tar&quot;&gt;found help on
Stackoverflow&lt;/a&gt;,
which I had never used before.)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Fragen</title>
    <link href="http://blog.plenz.com/2012-02/fragen.html" />
    <updated>2012-02-02T22:42:00+01:00</updated>
    <id>http://blog.plenz.com/2012-02/fragen</id>
    <content type="html">&lt;p&gt;Gute Vortragende &amp;ndash; seien es Dozenten, Professoren oder einfach
nur Leute, die etwas referieren oder präsentieren &amp;ndash; zeichnen
sich unter anderem dadurch aus, dass sie mit den Zuhörern
interagieren, an den richtigen Stellen Pausen machen und
weiterführende Fragen stellen, statt monoton zu reden. Man kann dieses
&quot;Fragen stellen&quot; aber in zweierlei Hinsicht falsch bzw.
kontraproduktiv einsetzen.&lt;/p&gt;

&lt;p&gt;Zunächst sind Suggestivfragen nur teilweise angebracht. Fragen wie
&quot;Fällt Ihnen hieran etwas auf?&quot;, die bewirken sollen, dass das
Publikum die Situation kritisch unter die Lupe nimmt und eventuelle
Ungereimtheiten aufspürt, sind gut. Aber rhetorisch anmutende Fragen
wie &quot;Alles verstanden?&quot;, bei denen spürbar wird, dass ein &lt;em&gt;Ja&lt;/em&gt; erwartet
wird, sind meist nicht produktiv: Die wenigsten werden sich melden,
falls sie etwas nicht verstanden haben, und der Vortragende wiegt sich
in falscher Sicherheit. Eine gute Alternative ist: &quot;Gibt es Fragen bis
hierher?&quot;, und eine anschließende kleine Besinnungspause.&lt;/p&gt;

&lt;p&gt;In meinen Augen wirklich desaströs ist eine zu lose, offene, aber
zugleich extrem erwartungsvolle Fragetaktik. &quot;Wie können wir X
erreichen?&quot;, ohne dass das Auditorium auch nur ansatzweise weiß, wie
das Problem angegangen werden kann. Dann macht sich Verwirrung breit,
und spätere Fragen, die möglicherweise sehr einfach zu beantworten
sind, werden möglicherweise gar nicht oder zumindest nur sehr zögerlich
beantwortet, weil das Publikum meint, die Fragestellung missverstanden
zu haben, genau &lt;em&gt;weil&lt;/em&gt; die Lösung auf der Hand liegt. &amp;ndash; Das
lähmt die Interaktion nachhaltig.&lt;/p&gt;

&lt;p&gt;Zwei solcher Fragen, die eine kaum zu beantworten, die nachfolgende
trivial, seien hier als Beispiel angeführt:&lt;/p&gt;

&lt;p&gt;&amp;ndash; Was haben wir nun für ein Problem bei der kanonischen Wahl der
Basis des Tangentialraumes? (Gesuchte Antwort: Weil &lt;em&gt;M&lt;/em&gt; nicht in einem
umgebenden Raum betrachtet werden kann, muss T&lt;sub&gt;p&lt;/sub&gt;M mit Hilfe
von Äquivalenzklassen der Differentiale von Kurven, die in &lt;em&gt;M&lt;/em&gt; durch
&lt;em&gt;p&lt;/em&gt; verlaufen, untersucht werden.)&lt;/p&gt;

&lt;p&gt;&amp;ndash; Welche Struktur hat T&lt;sub&gt;p&lt;/sub&gt;M dann? (Gesuchte Antwort:
Vektorraumstruktur.)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Pizzabäcker</title>
    <link href="http://blog.plenz.com/2012-02/pizzab%C3%A4cker.html" />
    <updated>2012-02-01T00:31:00+01:00</updated>
    <id>http://blog.plenz.com/2012-02/pizzabäcker</id>
    <content type="html">&lt;p&gt;In letzter Zeit mache ich mehrmals pro Woche selbst Pizza. Das
schmeckt nicht nur besser und ist viel billiger als Fertigpizza, es
macht auch einfach Spaß und hat etwas meditatives.&lt;/p&gt;

&lt;p&gt;Ich mache einmal die Woche Teig aus einem Würfel Hefe, ca. 700g Mehl
und 0.35L Wasser &amp;ndash; der reicht für drei große Pizzen. (Den Teig
eine Stunde gehen lassen, ab dann aber im Kühlschrank abgedeckt
aufbewahren!)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/img/pizza0.jpg&quot;&gt;&lt;img src=&quot;/img/pizza0.thumb.jpg&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;/img/pizza1.jpg&quot;&gt;&lt;img src=&quot;/img/pizza1.thumb.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/img/pizza2.jpg&quot;&gt;&lt;img src=&quot;/img/pizza2.thumb.jpg&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;/img/pizza3.jpg&quot;&gt;&lt;img src=&quot;/img/pizza3.thumb.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/img/pizza4.jpg&quot;&gt;&lt;img src=&quot;/img/pizza4.thumb.jpg&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;/img/pizza5.jpg&quot;&gt;&lt;img src=&quot;/img/pizza5.thumb.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/img/pizza6.jpg&quot;&gt;&lt;img src=&quot;/img/pizza6.thumb.jpg&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;/img/pizza7.jpg&quot;&gt;&lt;img src=&quot;/img/pizza7.thumb.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/img/pizza8.jpg&quot;&gt;&lt;img src=&quot;/img/pizza8.thumb.jpg&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;/img/pizza9.jpg&quot;&gt;&lt;img src=&quot;/img/pizza9.thumb.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lecker!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Krebsgeschwüre dieser Welt</title>
    <link href="http://blog.plenz.com/2012-01/krebsgeschw%C3%BCre-dieser-welt.html" />
    <updated>2012-01-30T19:47:00+01:00</updated>
    <id>http://blog.plenz.com/2012-01/krebsgeschwüre-dieser-welt</id>
    <content type="html">&lt;p&gt;Ich habe eben versucht, meinen altes Notebook auf Ebay einzustellen.
Schließlich und endlich &lt;a href=&quot;http://www.ebay.de/itm/Gebrauchtes-IBM-Thinkpad-X41-12-1-Docking-Station-zwei-Netzteilen-/110817677671&quot;&gt;hat es dann auch
geklappt&lt;/a&gt;.
Nicht, dass das einfach war: Anscheinend kann man den Ebay Richt Text
Editor nicht mit Firefox benutzen. Zumindest ich kann das nicht.
Deswegen konnte ich keine Artikelbeschreibung einstellen.
Mangels Alternativen habe ich dann Windows XP in einer KVM gebootet,
und das Angebot mit dem Internet Explorer erstellt. Der funktioniert
aber auch nur teilweise: Das Tutorial über die neue Art und Weise, wie
eBay Geld überträgt, musste ich durch&quot;klicken&quot;, indem ich oben in der
URL die &lt;code&gt;pageNr&lt;/code&gt;-Parameter hochgezählt habe. Die &quot;Weiter&quot;-Buttons
waren leider nicht sichtbar, außer auf der letzten Seite.&lt;/p&gt;

&lt;p&gt;Ich habe lange nicht mehr eine so inkompetent aufgebaute und
unübersichtliche Seite wie eBay benutzt. Ein pures Wunder, wie das
Leute tagtäglich benutzen können.&lt;/p&gt;

&lt;p&gt;Merken die Leute nicht, dass es benutzbare und unbenutzbare Webseiten
gibt? Gibt eBay kein Geld für Usability-Tester aus?! &amp;ndash;
Unbegreiflich für mich.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">shredding</title>
    <link href="http://blog.plenz.com/2012-01/shredding.html" />
    <updated>2012-01-30T14:09:00+01:00</updated>
    <id>http://blog.plenz.com/2012-01/shredding</id>
    <content type="html">&lt;p&gt;I'm currently &lt;a href=&quot;http://man.cx/shred&quot;&gt;shred&lt;/a&gt;ding my old X41's hard drive, because
I want to sell it (if you are interested, contact me). I'm overwriting it with
zeros, ten passes:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ shred -vfz -n 10 /dev/sda
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Luckily, the disk was fully encrypted all the time. So it's just a precaution.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/img/x41-shred.jpg&quot;&gt;&lt;img src=&quot;/img/x41-shred.thumb.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Ten Years of Vim</title>
    <link href="http://blog.plenz.com/2012-01/ten-years-of-vim.html" />
    <updated>2012-01-30T02:17:00+01:00</updated>
    <id>http://blog.plenz.com/2012-01/ten-years-of-vim</id>
    <content type="html">&lt;p&gt;About ten years ago, I began using &lt;a href=&quot;http://www.vim.org/&quot;&gt;Vim&lt;/a&gt;. Since
about eight years ago, I have been using Vim for every email, every
piece of code, literally &lt;em&gt;every&lt;/em&gt; text I write. Today,
I want to write a short text about how I came to use Vim and what I
like about it.&lt;/p&gt;

&lt;p&gt;I don't really remember when I first used Vim. It must have been
around the time when I was programming PHP a lot. I had access
to a &quot;real&quot; computer at home &amp;ndash; running Windows XP &amp;ndash; in
2002 for the first time; before that, I could only use older
Macintoshs. It's typical for first-time Vi users to stumble into
believing &amp;ndash; by hear-say, I guess &amp;ndash; that it is indeed a
&lt;em&gt;really&lt;/em&gt; superior editor, until &lt;em&gt;they try it out the first time and
can't even save&lt;/em&gt;, because they don't know how to. That were my
first experiences too, probably.&lt;/p&gt;

&lt;p&gt;Anyhow, at some point in time I ditched &lt;a href=&quot;http://www.zend.com/products/studio/&quot;&gt;PHP Zend
Studio&lt;/a&gt; for
&lt;a href=&quot;http://www.scintilla.org/SciTE.html&quot;&gt;SciTE&lt;/a&gt;. Later, I got to know Vim
(i.e., by reading a tutorial about it and actually understanding it)
and was instantly hooked. Probably, the guys over at
&lt;a href=&quot;http://www.html-q.net/&quot;&gt;#html.de&lt;/a&gt; talked me into it. Ironically, I
used Vim before I ever used a UNIX-like operating system.&lt;/p&gt;

&lt;p&gt;In my Vim learning curve, I identify seven important advances:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Understanding the Modes Concept.&lt;/em&gt; &amp;ndash; This, of course, is
something everybody needs to grok. It's fairly straight-forward,
once you think about it.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Understand the Visual Mode and Yank/Paste.&lt;/em&gt; &amp;ndash; Line-wise
selection already gives you more power than a regular editor when
moving code.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Understand Mappings and Macros.&lt;/em&gt; &amp;ndash; Even today I am amazed
how few people automate things. If it's one line, do it manually.
If it's three lines, carefully think about the task &lt;em&gt;while
recording a macro for it&lt;/em&gt;!&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Unterstanding Windows.&lt;/em&gt; &amp;ndash; Multiple files and stuff.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Consequently using [h], [j], [k], [l].&lt;/em&gt; &amp;ndash; This actually was
a much bigger step that you might think. I went to great lengths to
achive this: &lt;a href=&quot;http://git.plenz.com/configs/tree/.vimrc?id=8609adce1234194c5481e4e196684374bc80cbea#n127&quot;&gt;I configured the arrow mapping to &lt;code&gt;:echoerr&lt;/code&gt; a
message.&lt;/a&gt;
Today, I configure all programs to use Vim key bindings, especially
for horizontal and vertical navigation. It's the first thing to do.
I only use the arrow keys for Mplayer seeking.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Using Text Objects.&lt;/em&gt; &amp;ndash; See &lt;code&gt;:help text-objects&lt;/code&gt;, if you
don't know about them.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Switching to a US keyboard layout.&lt;/em&gt; &amp;ndash; Once you do this, all
the Vim commands begin to make sense. (I used a German layout
before.)&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Steps 1&amp;ndash;5 happened in the first two years. The text object only
came with more recent Vim development, and I'm not quite sure when I
adopted them. Learning the US layout was around 2006, maybe.&lt;/p&gt;

&lt;p&gt;When I switched to using Debian in 2004, using Vim for all tasks
already felt natural. Of course, at that point I finally came to
understand Vim not merely as a text editor, but as a &lt;em&gt;philosophy&lt;/em&gt;.
And that is what fascinates me to this day: The Vi way of editing text
is much more than a set of clever key bindings. It's a
&lt;a href=&quot;http://stevelosh.com/blog/2010/09/coming-home-to-vim/#a-language-of-text-editing&quot;&gt;language&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/vi-ned.jpg&quot; style=&quot;float:right;margin:0 0 .2em .5em&quot;
title=&quot;Oh, Ned! You are a Vi man after all!&quot; alt=&quot;Vi-vs.-Emacs fight&quot; /&gt;
In a way, I'm really professional at using Vim. If I think of the
tasks I do, I suspect there are very few superfluous keys I press
during editing. I have acquired a really good intuition of how to skip
to a particular line, to a particular function parameter or a certain
word in a sentence. (I use [H], [M], [L] for global on-screen
navigation a lot, and I heavily use the [f], [t], [F] and [T] jump
commands.) Just as you don't actually think about the letters you type
when you become a good typist, I don't think about what command keys I
press in Normal mode. I just press them, and the cursor magically
moves around to where my eyes rest. This is good.&lt;/p&gt;

&lt;p&gt;On the other hand, I am just using core Vim features, most of which
are already found in original Vi implementations. My really
&lt;a href=&quot;https://github.com/Feh/configs/commits/master/.vimrc&quot;&gt;conservative .vimrc change history&lt;/a&gt;
shows that I pretty much settled my editing habits. &amp;ndash; But: &lt;em&gt;I have
never used a third-party plugin before.&lt;/em&gt; Strange as it may sound, I
never felt the urge to do so.
&lt;a href=&quot;https://wincent.com/products/command-t&quot;&gt;Command-T&lt;/a&gt; certainly looks
like it could be of use; however, I usually start a new Vim instance
and go with the Z Shell completion, which I suspect to be superior in
more than one way, to find the file(s). &amp;ndash; Thus I must acknowledge
that there might be vast possibilities yet do discover. (Oh, and while
confessing, there's another big one: I have never used
Emacs. All I know about it is hear-say.)&lt;/p&gt;

&lt;p&gt;For keyboard enthusiasts, there are two quirks with Vim: It mainly
relies on Escape for mode switches, and the keys for many
combinations are aligned for QWERTY layouts. There's just no way
around it: while [c] and [d] are mnemonic for &lt;em&gt;cut&lt;/em&gt; and &lt;em&gt;delete&lt;/em&gt;, [h],
[j], [k], [l] simply aren't. There's no way justify their use when
switching to Dvorak, and that's why I didn't (switch). I also once
tried mapping [j][j] to Escape, or using the Caps Lock key as Escape
replacement; I can't really stick to using it. (I also stick to
calling &lt;code&gt;vim&lt;/code&gt; on the command line instead of a shorter alias. It is
the fourth most command I type, after &lt;code&gt;sudo&lt;/code&gt;, &lt;code&gt;git&lt;/code&gt;, and &lt;code&gt;man&lt;/code&gt;.)&lt;/p&gt;

&lt;p&gt;For me, text editing is equal to using Vim. I feel like a four-year
old moving a mouse when I'm forced to use another editor on other
people's computers. And because text editing is really clumsy with
regular text editors, I no longer wonder why people don't really
bother to correct errors: the effort is just not worth it.&lt;/p&gt;

&lt;p&gt;If I had to sum up the difference between Vim and other editors in one
sentence, it is this: &lt;em&gt;While other editors are great for creating
text, Vim is also great at &lt;strong&gt;manipulating&lt;/strong&gt; text&lt;/em&gt;. And text
manipulation, for most programmers and authors, is what it's all about.&lt;/p&gt;

&lt;p&gt;:wq&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Kamikazes</title>
    <link href="http://blog.plenz.com/2012-01/kamikazes.html" />
    <updated>2012-01-30T00:03:00+01:00</updated>
    <id>http://blog.plenz.com/2012-01/kamikazes</id>
    <content type="html">&lt;p&gt;Gerade mal zweistellige View-Zahlen? Das wundert mich. &amp;ndash; Ich embedde das
mal direkt, vielleicht hilft das...&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/yMiQsmnMKBU&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;




&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/IrAi7UUpfps&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;




&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/xOzgFjLleVk&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;

</content>
  </entry>
  
  <entry>
    <title type="html">Rapzeugs</title>
    <link href="http://blog.plenz.com/2012-01/rapzeugs.html" />
    <updated>2012-01-22T17:56:00+01:00</updated>
    <id>http://blog.plenz.com/2012-01/rapzeugs</id>
    <content type="html">&lt;p&gt;Was so liegen geblieben ist:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Marsimotos Release war ja noch viel krasser gehypet als &lt;em&gt;23&lt;/em&gt; von
Sido und Bushido. Leider ist auf der Platte im wesentlichen das
durchgekommen, was ich nicht mag. Hat mich also nicht vom Hocker
gehauen, wobei &lt;a href=&quot;http://vimeo.com/34148292&quot;&gt;der Film&lt;/a&gt; teilweise
ziemlich cool war. &quot;I got five&quot; ist die erwähnenswerte Ausnahme.&lt;/li&gt;
&lt;li&gt;Letzte Woche habe ich &lt;a href=&quot;http://blutzbruedaz-film.de/&quot;&gt;Blutzbrüdaz&lt;/a&gt;
gesehen. Lohnt sich auf jeden Fall, und ist irgendwie ein lustiger
Mix aus Realität und Fantasie.&lt;/li&gt;
&lt;li&gt;Was momentan aus Wuppertal kommt ist wirklich der Hammer. Prezident
hat mal eben so sein komplettes Album &lt;em&gt;Querschläger&lt;/em&gt; &lt;a href=&quot;http://www.whiskeyrap.de/&quot;&gt;online
gestellt&lt;/a&gt;. Und auch Mythos und Antagonist
aka. Kamikazes haben &lt;a href=&quot;http://meinrap.de/2011/11/20/exklusiv-kamikazes-koenigsmische-download/&quot;&gt;ein Mixtape online
gestellt&lt;/a&gt;,
das Albumpotential hat. Verdammt gut.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Bei mir läuft die Königsmische auf Repeat.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">vlock and suspend to ram</title>
    <link href="http://blog.plenz.com/2012-01/vlock-and-suspend-to-ram.html" />
    <updated>2012-01-20T19:43:00+01:00</updated>
    <id>http://blog.plenz.com/2012-01/vlock-and-suspend-to-ram</id>
    <content type="html">&lt;p&gt;I've had weird race conditions when using &lt;code&gt;vlock&lt;/code&gt; together with &lt;code&gt;s2ram&lt;/code&gt;. It
appears suspend to ram &lt;a href=&quot;http://lxr.free-electrons.com/source/kernel/power/console.c&quot;&gt;wants to switch
VTs&lt;/a&gt;, while
&lt;code&gt;vlock&lt;/code&gt; hooks into the switch requests and explicitly disables them. So some of
the time, the machine would not suspend, while at other times, &lt;code&gt;vlock&lt;/code&gt; wouldn't
be able to acquire the VT.&lt;/p&gt;

&lt;p&gt;To solve this, I wrote a simple &lt;code&gt;vlock&lt;/code&gt; plugin, which simply clears the lock
mechanism, writes &lt;code&gt;mem&lt;/code&gt; to &lt;code&gt;/sys/power/state&lt;/code&gt; and later reinstates the locking
mechanism. This plugin is called after &lt;code&gt;all&lt;/code&gt; and &lt;code&gt;new&lt;/code&gt;. Thus, the screen will
be locked properly before suspending.&lt;/p&gt;

&lt;p&gt;Here's my &lt;code&gt;suspend.c&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;unistd.h&amp;gt;
#include &amp;lt;errno.h&amp;gt;
#include &amp;lt;sys/types.h&amp;gt;
#include &amp;lt;sys/stat.h&amp;gt;
#include &amp;lt;fcntl.h&amp;gt;

/* Include this header file to make sure the types of the dependencies
 * and hooks are correct. */
#include &quot;vlock_plugin.h&quot;
#include &quot;../src/console_switch.h&quot;

const char *succeeds[] = { &quot;all&quot;, &quot;new&quot;, NULL };
const char *depends[] =  { &quot;all&quot;, &quot;new&quot;, NULL };

bool vlock_start(void __attribute__ ((__unused__)) **ctx_ptr)
{
    int fd;

    unlock_console_switch();

    if((fd = open(&quot;/sys/power/state&quot;, O_WRONLY)) != -1) {
        if(write(fd, &quot;mem&quot;, 3) == -1)
            perror(&quot;suspend: write&quot;);
        close(fd);
    }

    lock_console_switch();

    return true;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Simply paste it to the &lt;code&gt;vlock&lt;/code&gt; modules folder, &lt;code&gt;make suspend.so&lt;/code&gt; and copy it to
&lt;code&gt;/usr/lib/vlock/modules&lt;/code&gt;. I now invoke it like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;env VLOCK_PLUGINS=&quot;all new suspend&quot; vlock
&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Xorg, really?!</title>
    <link href="http://blog.plenz.com/2012-01/xorg-really.html" />
    <updated>2012-01-20T13:27:00+01:00</updated>
    <id>http://blog.plenz.com/2012-01/xorg-really</id>
    <content type="html">&lt;p&gt;Are you fucking kidding me? &lt;a href=&quot;http://gu1.aeroxteam.fr/2012/01/19/bypass-screensaver-locker-program-xorg-111-and-up/&quot;&gt;You reintroduce broken behaviour that possibly
has devastating security consequences and and make it &lt;strong&gt;the
default&lt;/strong&gt;?!&lt;/a&gt;
Yeah I agree the &quot;usual&quot; X server locking approach is not the best way to do it
&amp;ndash; but to knowingly smash the security of people's computers on a grand
scale... that's priceless.&lt;/p&gt;

&lt;p&gt;(My locking solution is &lt;code&gt;env USER=feh vlock -a -n&lt;/code&gt;, again.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; &lt;a href=&quot;http://who-t.blogspot.com/2012/01/xkb-breaking-grabs-cve-2012-0064.html&quot;&gt;Why it happened&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">zsh: complete words from tmux pane</title>
    <link href="http://blog.plenz.com/2012-01/zsh-complete-words-from-tmux-pane.html" />
    <updated>2012-01-19T20:53:00+01:00</updated>
    <id>http://blog.plenz.com/2012-01/zsh-complete-words-from-tmux-pane</id>
    <content type="html">&lt;p&gt;Today I wrote a rather cool Z-Shell completion function: It will
present all words that are found in the current tmux pane in a zsh
completion menu. That means you can actually complete words from the
&lt;em&gt;output&lt;/em&gt; of commands that you just executed. (In a way it's a little
bit like the &lt;a href=&quot;http://www.opensource.apple.com/source/zsh/zsh-53/zsh/Functions/Zle/keeper&quot;&gt;keeper
function&lt;/a&gt;,
without the overhead of remembering to call &lt;code&gt;keeper&lt;/code&gt; in the first place.)&lt;/p&gt;

&lt;p&gt;The code below defines two keybindings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ctrl-X t&lt;/strong&gt; to do a &lt;em&gt;prefix&lt;/em&gt; completion: only words from the pane
that share the same prefix will be presented&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ctrl-X Ctrl-X&lt;/strong&gt; to do a &quot;find stuff like crazy&quot; completion. If you
see the output and just enter something from the middle of the word,
it'll just as well complete. For example, if you see &lt;code&gt;176.9.247.89&lt;/code&gt;
somewhere in the pane, try typing &lt;code&gt;.9&lt;/code&gt; and hitting Ctrl-X twice.
It'll complete to that IP address.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Here's the code:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;_tmux_pane_words() {
  local expl
  local -a w
  if [[ -z &quot;$TMUX_PANE&quot; ]]; then
    _message &quot;not running inside tmux!&quot;
    return 1
  fi
  w=( ${(u)=$(tmux capture-pane \; show-buffer \; delete-buffer)} )
  _wanted values expl 'words from current tmux pane' compadd -a w
}

zle -C tmux-pane-words-prefix   complete-word _generic
zle -C tmux-pane-words-anywhere complete-word _generic
bindkey '^Xt' tmux-pane-words-prefix
bindkey '^X^X' tmux-pane-words-anywhere
zstyle ':completion:tmux-pane-words-(prefix|anywhere):*' completer _tmux_pane_words
zstyle ':completion:tmux-pane-words-(prefix|anywhere):*' ignore-line current
zstyle ':completion:tmux-pane-words-anywhere:*' matcher-list 'b:=* m:{A-Za-z}={a-zA-Z}'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;How does it work? &lt;code&gt;_tmux_pane_words&lt;/code&gt; will just capture the current
pane's contents (&lt;code&gt;capture-pane&lt;/code&gt;), print out the buffer that
contains it (&lt;code&gt;show-buffer&lt;/code&gt;) and then delete it again
(&lt;code&gt;delete-buffer&lt;/code&gt;). &amp;ndash; The rest of the magic happens via Zsh's
excellent completion mechanisms.&lt;/p&gt;

&lt;p&gt;See it in action (after typing &lt;code&gt;spm^X^X&lt;/code&gt;):&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/2012-01-19-205829_508x163_scrot.png&quot; /&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Wenn der kleine Hunger kommt...</title>
    <link href="http://blog.plenz.com/2012-01/wenn-der-kleine-hunger-kommt.html" />
    <updated>2012-01-17T20:11:00+01:00</updated>
    <id>http://blog.plenz.com/2012-01/wenn-der-kleine-hunger-kommt</id>
    <content type="html">&lt;p&gt;... Rucolasalat mit Tomaten!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/img/rucolasalat.jpg&quot;&gt;&lt;img src=&quot;/img/rucolasalat.thumb.jpg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">trying pthreads</title>
    <link href="http://blog.plenz.com/2012-01/trying-pthreads.html" />
    <updated>2012-01-17T01:37:00+01:00</updated>
    <id>http://blog.plenz.com/2012-01/trying-pthreads</id>
    <content type="html">&lt;p&gt;Today I played around with POSIX threads a little. In an assignment,
we have to implement a very, very simple webserver that does
asynchronous I/O. Since it should perform well, I thought I'd not only
serialize I/O, but also parallelize it.&lt;/p&gt;

&lt;p&gt;So there's a boss that just accepts new inbound connections and
appends the fds to a queue:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;clientfd = accept(sockfd, (struct sockaddr *) &amp;amp;client, &amp;amp;client_len);
if(clientfd == -1)
    error(&quot;accept&quot;);
new_request(clientfd);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;new_request&lt;/code&gt; function in turn appends it to a queue (of size
&lt;code&gt;TODOS&lt;/code&gt; = 64), and emits a &lt;code&gt;cond_new&lt;/code&gt; signal for possibly waiting
workers:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;pthread_mutex_lock(&amp;amp;mutex);
while((todo_end + 1) % TODOS == todo_begin) {
    fprintf(stderr, &quot;[master] Queue is completely filled; waiting\n&quot;);
    pthread_cond_wait(&amp;amp;cond_ready, &amp;amp;mutex);
}
fprintf(stderr, &quot;[master] adding socket %d at position %d (begin=%d)\n&quot;,
    clientfd, todo_end, todo_begin);
todo[todo_end] = clientfd;
todo_end = (todo_end + 1) % TODOS;
pthread_cond_signal(&amp;amp;cond_new);
pthread_mutex_unlock(&amp;amp;mutex);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The workers (there being 8) will just emit a &lt;code&gt;cond_ready&lt;/code&gt;, possibly
wait until a &lt;code&gt;cond_new&lt;/code&gt; is signalled, and then extract the first
client fd from the queue. After that, a simple function involving some
reads and writes will handle the communication on that fd.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;pthread_mutex_lock(&amp;amp;mutex);
pthread_cond_signal(&amp;amp;cond_ready);
while(todo_end == todo_begin)
    pthread_cond_wait(&amp;amp;cond_new, &amp;amp;mutex);
clientfd = todo[todo_begin];
todo_begin = (todo_begin + 1) % TODOS;
pthread_mutex_unlock(&amp;amp;mutex);

// handle communication on clientfd
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(Full source is here: &lt;a href=&quot;http://git.plenz.com/ti3/tree/ueb9/webserver.c&quot;&gt;webserver.c&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;Now this works pretty well and is fairly easy. I'm not very
experienced with threads, though, and run into problems when I do
massive parallel requests.&lt;/p&gt;

&lt;p&gt;If I run &lt;code&gt;ab&lt;/code&gt;, the Apache Benchmark tool with 10,000 requests, 1,000
concurrent, on the webserver it'll go up to 9000-something requests and
then lock up.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ab -n 10000 -c 1000 http://localhost:8080/index.html
...
Completed 8000 requests
Completed 9000 requests
apr_poll: The timeout specified has expired (70007)
Total of 9808 requests completed
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The webserver is blocked; its last line of output reads like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[master] Queue is completely filled; waiting
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If I attach strace while in this blocking state, I get this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ strace -fp `pidof ./webserver`
Process 21090 attached with 9 threads - interrupt to quit
[pid 21099] recvfrom(32,  &amp;lt;unfinished ...&amp;gt;
[pid 21098] recvfrom(23,  &amp;lt;unfinished ...&amp;gt;
[pid 21097] recvfrom(31,  &amp;lt;unfinished ...&amp;gt;
[pid 21095] recvfrom(35,  &amp;lt;unfinished ...&amp;gt;
[pid 21094] recvfrom(34,  &amp;lt;unfinished ...&amp;gt;
[pid 21093] recvfrom(33,  &amp;lt;unfinished ...&amp;gt;
[pid 21092] recvfrom(26,  &amp;lt;unfinished ...&amp;gt;
[pid 21091] recvfrom(24,  &amp;lt;unfinished ...&amp;gt;
[pid 21090] futex(0x6024e4, FUTEX_WAIT_PRIVATE, 55883, NULL
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So the children seem to be starving on unfinished &lt;code&gt;recv&lt;/code&gt; calls, while
the master thread waits for any children to work away the queue. (With
a queue size of 1024 and 200 workers I couldn't reproduce the
situation.)&lt;/p&gt;

&lt;p&gt;How can one counteract this? Specify a timeout? Spawn workers on
demand? Set the &lt;code&gt;listen()&lt;/code&gt; backlog argument to a low value? &amp;ndash; or
is it all Apache Benchmark's fault? *confused*&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">&quot;Wofür Deutschland Krieg führen darf. Und muss.&quot;</title>
    <link href="http://blog.plenz.com/2012-01/wof%C3%BCr-deutschland-krieg-f%C3%BChren-darf-und-muss.html" />
    <updated>2012-01-08T20:48:00+01:00</updated>
    <id>http://blog.plenz.com/2012-01/wofür-deutschland-krieg-führen-darf-und-muss</id>
    <content type="html">&lt;p&gt;&lt;img src=&quot;/img/ulrich-deutschland-krieg-streitschrift.jpg&quot;
style=&quot;margin:0 .7em .2em 0; float:left;&quot; /&gt;
Ich habe unter der Woche &lt;strong&gt;Bernd Ulrichs&lt;/strong&gt; Streitschrift &lt;strong&gt;Wofür Deutschland Krieg
führen darf. Und muss.&lt;/strong&gt; vom Oktober 2011 gelesen. Das Buch war für mich unter
mehreren Aspekten interessant. Einerseits beleuchtet es die
Hintergründe der Kriege, die ich damals als Kind noch nicht
mitbekommen habe &amp;ndash; den Namen UÇK kannte ich zwar aus den
Nachrichten, wusste aber damit nichts zu verbinden &amp;ndash; und
bietet so eine gute Perspektive auf die jüngere Deutsche Geschichte,
gerade auch in Hinblick auf die Auswirkungen der Wiedervereinigung auf
die geopolitische Sicherheitslage Europas und der Welt, sowie das
politische Selbstbewusstsein Deutschlands. Andererseits meldet sich
hier aus der Generation meiner Eltern ein Kriegsdienstverweigerer und
ehemaliger Mitarbeiter des Fraktionsvorstandes der Grünen im Deutschen
Bundestag zu Wort, der mittlerweile stellvertretender Chefredaktuer
und Leiter des Politik-Ressorts der Zeit ist.&lt;/p&gt;

&lt;p&gt;Das ganze ist flüssig zu lesen, aber natürlich kontrovers &amp;ndash; und
das soll es ja auch sein. Zunächst muss gesagt werden, dass das Buch
eine Reihe interessanter Einsichten enthält, die auch sehr treffend
ausformuliert sind. Über die Tatsache, dass sich in der deutschen
Bevölkerung nur sehr schwierig eine stabile Mehrheit für einen Einsatz
der Bundeswehr finden lässt, bemerkt er ganz richtig (S. 53):&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Hinzu kommt ein ganz profaner Umstand. In Deutschland finden
unablässig irgendwelche Wahlen statt, weshalb eine kriegführende
Bundesregierung einem andauernden Plebiszit ausgesetzt ist, das sie
nur überstehen kann, solange andere als die militärischen Fragen
wahlentscheidend sind.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Und weiter:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Die Regierung wird infolgedessen dazu tendieren, die Fragen von
Krieg und Frieden möglichst nicht zu thematisieren, ja, ihre
Thematisierung aktiv zu verhindern.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Eine weitere interessante Beobachtung stellt Ulrich über die
&quot;spezielle Verbindung&quot; zwischen Deutschland und Israel an (S. 73):&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;In der wachsenden Distanz zu Israel und in die zunehmende Skepsis
gegen Militäreinsätze hinein bringt nun die Merkel-Doktrin
Deutschland näher an einen Militäreinsatz für Israel. Hier liegt
eine enorme latente Spannung.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Schaut man auf das Inhaltsverzeichnis, so kann man das Buch in einige
wesentliche Thesen zusammenfassen:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Aufweichung der Bündnistreue: Emanzipation von der Bündnispflicht,
hin zu Von-Fall-zu-Fall-Entscheidungen.&lt;/li&gt;
&lt;li&gt;Die Kriege im Irak und in Afghanistan waren falsch; die auf dem
Balkan und in Libyen richtig.&lt;/li&gt;
&lt;li&gt;Künftige Militäreinsätze im Ausland sollten &quot;Polizeicharakter&quot;
haben, Völkerrecht ist teilweise überholt.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Meine Generation, also die zur Zeit des Niedergangs der DDR oder nach
dem Mauerfall Geborenen, sind in meinen Augen sehr pazifistisch
eingestellt, und das ist gut so. Rundheraus würde ich sagen: Krieg ist
immer falsch.&lt;/p&gt;

&lt;p&gt;Leider stimmt das nicht. Ja, wenn man an all die Kriege denkt, die
Amerika so geführt hat im Südosten Asiens, oder wie die Kriege in
Afghanistan und dem Irak laufen: das ist abgrundtief falsch. &amp;ndash;
Andererseits muss man sich immer wieder den
&lt;a href=&quot;http://de.wikipedia.org/wiki/V%C3%B6lkermord_in_Ruanda&quot;&gt;Ruandischen Genozid&lt;/a&gt;
vor Augen halten, und die damalige
&lt;a href=&quot;https://en.wikipedia.org/wiki/Rwandan_Genocide#United_Nations&quot;&gt;Passivität der UN&lt;/a&gt;.
Dadurch, dass westliche Mächte nicht eingegriffen haben, &lt;em&gt;obwohl&lt;/em&gt; sie
ziemlich gut wussten, dass ein riesiger Völkermord passierte, &lt;em&gt;das&lt;/em&gt; ist
unverantwortlich. &amp;ndash; Wenn man sagt &quot;Krieg ist in keinem Fall
tragbar&quot;, dann öffnet man dem Kulturrelativismus Tür und Tor. Profan
ausgedrückt, sagt man: &quot;Lass die Anderen doch mit sich selbst
klarkommen. Wenn sie sich abschlachten, dann ist das nicht mein
Problem, und nicht einmal notwendigerweise falsch.&quot; &amp;ndash; eine
solche Einstellung ist sehr, sehr gefährlich. Von daher ist für den
Pazifisten die Fragestellung, ob es &lt;em&gt;überhaupt&lt;/em&gt; legitime Kriege gibt,
eine sehr viel schwierigere, als sie auf den ersten Blick scheint.&lt;/p&gt;

&lt;p&gt;Im Nachhinein kann man möglicherweise sagen, dass der Einsatz der
Bundeswehr als Teil des NATO-Bündnisses in Libyen gerechtfertigt
gewesen wäre. &lt;a href=&quot;http://www.dw-world.de/dw/article/0,,15493120,00.html&quot;&gt;Der Einsatz ist mittlerweile
beendet&lt;/a&gt;, und
der Aufbau des Landes kann beginnen. Wenn ein Präsident die Luftwaffe
gegen das eigene Volk einsetzt, dann sollte es schwer sein,
wegzuschauen. &amp;ndash; Natürlich muss man sich überlegen,
&lt;a href=&quot;http://img.dailymail.co.uk/i/pix/2007/12_02/gaddafiEPA1012_468x533.jpg&quot;&gt;wer&lt;/a&gt;
&lt;a href=&quot;http://www.chinadaily.com.cn/world/images/attachement/jpg/site1/20090710/0013729e48090bc1321e37.jpg&quot;&gt;denn&lt;/a&gt;
die Machtposition Gaddafis über Jahrzehnte gefestigt hat. Aber man
kann und darf die Frage nach militärischer Intervention nicht mit
einer antiimperialistischen Floskel à la &quot;hätten wir nicht X gemacht
... wäre nicht Y passiert&quot; abtun. Dort sterben Leute.&lt;/p&gt;

&lt;p&gt;Ich tue mich auch schwer in der Frage, zumal ich von einer anderen
Prämisse ausgehe, was die Situation zugegebenermaßen leichter macht:
Ich empfinde nichts für das Staatenkonstrukt Deutschland. Deutsche
Kultur, insbesondere die deutsche Sprache und Literatur, sowie
klassische Musik bedeutet mir etwas &amp;ndash; das geht aber über
Staatengrenzen hinaus. Der Großteil von Deutschland &amp;ndash; das heißt,
alles außerhalb von Hamburg und Berlin &amp;ndash; bedeutet mir
&lt;em&gt;nichts&lt;/em&gt;, ganz einfach &lt;em&gt;nichts&lt;/em&gt;. Ich habe da schließlich nie
gelebt. Aber ohne die Grundlage von konstruierten Staaten, die
gemeinsam agieren, entfällt natürlich die Notwendigkeit zur
Verantwortung gegenüber anderen Staaten &amp;ndash; es bleibt die
Verantwortung von Menschen gegenüber anderen Menschen, und dort sind
die Menschenrechte ein ziemlich allgemein akzeptierter Konsens.&lt;/p&gt;

&lt;p&gt;Zusammenfassend lässt sich sagen, dass das Buch einige spannende
Einsichten, auch in das Wirken von Presse und Politik, bereit hält.
Und es ist beeindruckend zu sehen, wie ein ehemaliger überzeugter
pazifistischer Aktivist heute Kriege zu legitimieren versucht.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">mutt sidebar patch improvements</title>
    <link href="http://blog.plenz.com/2012-01/mutt-sidebar-patch-improvements.html" />
    <updated>2012-01-08T19:32:00+01:00</updated>
    <id>http://blog.plenz.com/2012-01/mutt-sidebar-patch-improvements</id>
    <content type="html">&lt;p&gt;It is generally accepted as an almost universal truth that mutt sucks,
but is the MUA that sucks less than all others. While people use
either Vim or Emacs and fight about it, I hardly see any people fight
about whether mutt is good or bad. There is, to my knowledge, no
alternative worth mentioning.&lt;/p&gt;

&lt;p&gt;Mutt dates back well into the mid-nineties. As you might imagine, with
lots of contributors over the course of almost two decades, the
code quality is rather messy.&lt;/p&gt;

&lt;p&gt;When development had stalled for quite a while in the mid-2000's, a
&lt;a href=&quot;http://synflood.at/blog/index.php?/archives/337-Forking-mutt.html&quot;&gt;fork was attempted&lt;/a&gt;.
While mutt-ng was quite popular for a while, most changes were
incorporated back into mainline mutt at some point.
(Ironically, the latest article in the &lt;a href=&quot;http://mutt-ng.supersized.org/&quot;&gt;mutt-ng development
blog&lt;/a&gt; is from October 2006 and is
titled &quot;mutt-ng isn't dead!&quot;). The development of main mutt gained
some momentum again, triggered in large parts by the
contributions of late Rocco Rutte.&lt;/p&gt;

&lt;p&gt;I remember two big features that the original mutt authors just
wouldn't integrate into mainline: The headercache patch and the
sidebar patch. About the former I can't say anything, but lately I've
been fixing the Sidebar patch in various places. (We use mutt at work
and rely heavily on e-mail communication, so we'd like a bug-free user
agent, naturally.)&lt;/p&gt;

&lt;p&gt;When all the mutt forking went about five years ago, I didn't know
much about it. Retrospectively, I see the people did a hell of a job.
Long before mutt-ng was forked, &lt;a href=&quot;http://guckes.net/&quot;&gt;Sven&lt;/a&gt; told me he
and &lt;a href=&quot;http://michael-prokop.at/&quot;&gt;Mika&lt;/a&gt; met in Graz for several weeks to
sift and sort through the availbale patches, intending to do a &quot;super
patch&quot;.&lt;/p&gt;

&lt;p&gt;Mutt's code quality is arguably rather messy.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There's a wild mix of 2-, 4- or 8-space indentation, often mixed
with spaces (or vice versa)&lt;/li&gt;
&lt;li&gt;The user interface is &lt;em&gt;completely&lt;/em&gt; tangled with application logic&lt;/li&gt;
&lt;li&gt;It uses curses directly. Go figure&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;On top of that, the Sidebar patch tries to make it even worse. Imagine
this: mutt draws a mail from position (line=x,char=0) to the end of
the line. Now the sidebar patch will introduce a left &quot;margin&quot;, such
that the sidebar can be drawn there. Thus, all code parts where a line
is started from the leftmost character has to be rewritten to check
if the sidebar is active and possibly start drawing at
(line=x,char=20).&lt;/p&gt;

&lt;p&gt;The sidebar code quality is a fringe case of bad code. Really, it
sucks. However, there's no real way to &quot;do it right&quot;, since original
mutt never planned for a sidebar.&lt;/p&gt;

&lt;p&gt;Who maintains the sidebar patch? &amp;ndash; Not sure. There's a version
at &lt;a href=&quot;http://thomer.com/mutt/&quot;&gt;thomer.com&lt;/a&gt;, but he says:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;July 20, 2006&lt;/strong&gt; I quit. Sadly, there seems to be no desire
to absorb the sidebar patch into the main source tree.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;The most up-to-date version is found at
&lt;a href=&quot;http://www.lunar-linux.org/mutt-sidebar/&quot;&gt;Lunar Linux&lt;/a&gt;. Last update
is from mid-2009.&lt;/p&gt;

&lt;p&gt;Debian offers a &lt;code&gt;mutt-patched&lt;/code&gt;
&lt;a href=&quot;http://packages.debian.org/mutt-patched&quot;&gt;package&lt;/a&gt; that includes the
sidebar patch, albeit in a different version than usually found 'round
the net. In short, this patch is a mess, too.&lt;/p&gt;

&lt;p&gt;But since I made all the fixes, I decided to contact the
package's maintainer, Antonio Radici. He promptly responded and said
he'd happily fix all the issues, so I started by opening two
&lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646941&quot;&gt;bug&lt;/a&gt;
&lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646942&quot;&gt;reports&lt;/a&gt;.
Nothing has happened since.&lt;/p&gt;

&lt;p&gt;The patches run quite stable for my colleagues, so I think it's best
to release them. Maybe someone else can use them. Please note that I
have absolutely no interest in taking over any Sidebar patch
maintainance. ;-)&lt;/p&gt;

&lt;p&gt;For some of the patches I provide annotations. They all feature quite
descriptive commit messages, and apply cleanly on top of the
&lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=pkg-mutt/mutt.git&quot;&gt;Debian mutt repository&lt;/a&gt;'s
master branch.&lt;/p&gt;

&lt;p&gt;The first four patches are not by me, they are just the corresponding
patches from the &lt;code&gt;debian/patches/&lt;/code&gt; directory applied to have a
starting point.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0001-applying-debian-patches-mutt-patched-multiple-fcc.patch&quot;&gt;0001-applying-debian-patches-mutt-patched-multiple-fcc.patch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0002-applying-debian-patches-mutt-patched-sidebar.patch&quot;&gt;0002-applying-debian-patches-mutt-patched-sidebar.patch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0003-applying-debian-patches-mutt-patched-sidebar-dotted.patch&quot;&gt;0003-applying-debian-patches-mutt-patched-sidebar-dotted.patch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0004-applying-debian-patches-mutt-patched-sidebar-sorted.patch&quot;&gt;0004-applying-debian-patches-mutt-patched-sidebar-sorted.patch&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The first few patches fix rather trivial bugs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0005-Fix-sidebar-compilation-errors-on-IRIX-systems.patch&quot;&gt;0005-Fix-sidebar-compilation-errors-on-IRIX-systems.patch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0006-Fix-counting-of-flagged-mails-in-mboxes.patch&quot;&gt;0006-Fix-counting-of-flagged-mails-in-mboxes.patch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0007-Fix-various-sidebar-drawing-issues.patch&quot;&gt;0007-Fix-various-sidebar-drawing-issues.patch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0008-Fix-setting-CurrBuffy-when-invoking-mutt-via-f.patch&quot;&gt;0008-Fix-setting-CurrBuffy-when-invoking-mutt-via-f.patch&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Now come the performance critical patches. They are the real reason I
was assigned the task to repair the sidebar:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0009-cache-time-when-sidebar-last-counted-all-the-mails.patch&quot;&gt;0009-cache-time-when-sidebar-last-counted-all-the-mails.patch&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This patch fixes a &lt;em&gt;huge&lt;/em&gt; speed penalty. Previously, the sidebar would
count the mails (and thus read through the whole mbox) &lt;em&gt;every time
that mtime &gt; atime&lt;/em&gt;! This is just an incredible oversight by the
developer and must have burned hundreds of millions of CPU cycles.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;This introduces a member `sb_last_checked' to the BUFFY struct. It
will be set by `mh_buffy_update', `buffy_maildir_update' and
`buffy_mbox_update' when they count all the mails.

Mboxes only: `buffy_mbox_update' will not be run unless the
condition &quot;sb_last_checked &amp;gt; mtime of the file&quot; holds. This solves
a huge performance penalty you obtain with big mailboxes. The
`mx_open_mailbox' call with the M_PEEK flag will *reset* mtime and
atime to the values from before. Thus, you cannot rely on &quot;mtime &amp;gt;
atime&quot; to check whether or not to count new mail.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Also, don't count mail if the sidebar is not active:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0010-only-count-mail-if-sidebar-is-active.patch&quot;&gt;0010-only-count-mail-if-sidebar-is-active.patch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0011-buffy-check-msg_unread-if-sidebar-is-active.patch&quot;&gt;0011-buffy-check-msg_unread-if-sidebar-is-active.patch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0012-fix-sidebar-and-buffy-updates.patch&quot;&gt;0012-fix-sidebar-and-buffy-updates.patch&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Then, I removed a lot of cruft and simply stupid design. Just consider
one of the functions I removed:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;-static int quick_log10(int n)
-{
-        char string[32];
-        sprintf(string, &quot;%d&quot;, n);
-        return strlen(string);
-}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That is just insane.&lt;/p&gt;

&lt;p&gt;Now, customizing the sidebar format is simple, straight-forward and
mutt-like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sidebar_format

    Format string for the sidebar. The sequences `%N', `%F' and
    `%S' will be replaced by the number of new or flagged messages
    or the total size of the mailbox. `%B' will be replaced with
    the name of the mailbox. The `%!' sequence will be expanded to
    `!' if there is one flagged message; to `!!' if there are two
    flagged messages; and to `n!' for n flagged messages, n&amp;gt;2.
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0013-introduce-sidebar_format-option.patch&quot;&gt;0013-introduce-sidebar_format-option.patch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0014-introduce-sidebar_folderindent-option.patch&quot;&gt;0014-introduce-sidebar_folderindent-option.patch&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;While investigating mutt's performance, one thing struck me: To decode
a mail (eg. from Base64), mutt will create a temporary file and print
the contents into it, later reading them back. This also happens &lt;strong&gt;for
evaluating filters that determine coloring&lt;/strong&gt;. For example,&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;color   index  black green  '~b Julius'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;will highlight mail containg my name in the body in bright green (this
is tremendously useful). However, for displaying a message in the
index, it will be decoded to a temporary file and later read back.
This is just insane, and clearly a sign that the mutt authors wouldn't
bother with dynamic memory allocation.&lt;/p&gt;

&lt;p&gt;By chance I found a glib-only function &lt;code&gt;fmemopen()&lt;/code&gt;,
&lt;a href=&quot;http://linux.die.net/man/3/fmemopen&quot;&gt;&quot;fmemopen, open_memstream, open_wmemstream - open memory as stream&quot;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;From the commit message:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;When searching the header or body for strings and the
`thorough_search' option is set, a temp file was created, parsed,
and then unlinked again. This is now done in memory using glibc's
open_memstream() and fmemopen() if they are available.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This makes mutt respond much more rapidly.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0015-keep-buffer-like-temp-file-in-memory.patch&quot;&gt;0015-keep-buffer-like-temp-file-in-memory.patch&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Finally, there are some patches that fix various other issues, see
commit message for details.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0016-Bugfix-use-realpath-on-initial-folder.patch&quot;&gt;0016-Bugfix-use-realpath-on-initial-folder.patch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0017-Sidebar-Copy-numbers-before-leaving-mailbox.patch&quot;&gt;0017-Sidebar-Copy-numbers-before-leaving-mailbox.patch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0018-Fix-Buffy-Sidebar-and-mail_check_recent-issues.patch&quot;&gt;0018-Fix-Buffy-Sidebar-and-mail_check_recent-issues.patch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0019-Copy-number-of-flagged-messages-when-leaving-mbox.patch&quot;&gt;0019-Copy-number-of-flagged-messages-when-leaving-mbox.patch&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;There you go. I appreciate any comments or further improvements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update 1:&lt;/strong&gt; The original author contacted me. He told me he's written most of
the code in a single sitting late at night. ;-)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update 2:&lt;/strong&gt; The 16&lt;sup&gt;th&lt;/sup&gt; patch will make mutt crash when you compile it with &lt;code&gt;-D_FORTIFY_SOURCE=2&lt;/code&gt;. There's a fix:
&lt;a href=&quot;http://plenz.com/tmp/mutt-sidebar-patches/0020-use-PATH_MAX-instead-of-_POSIX_PATH_MAX-when-realpat.patch&quot;&gt;0020-use-PATH_MAX-instead-of-_POSIX_PATH_MAX-when-realpat.patch&lt;/a&gt; (thanks, Jakob!)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Bookdump</title>
    <link href="http://blog.plenz.com/2012-01/bookdump.html" />
    <updated>2012-01-05T19:56:00+01:00</updated>
    <id>http://blog.plenz.com/2012-01/bookdump</id>
    <content type="html">&lt;p&gt;Ich habe erstaunlich wenig gelesen die letzten paar Monate. Außerdem
habe ich zwei Bücher nicht zu Ende gelesen, was sonst gar nicht meine
Art ist.&lt;/p&gt;

&lt;p&gt;Die unfertigen Bücher: &lt;strong&gt;David Foster Wallace: The Pale King&lt;/strong&gt;, war
mir viel zu unklar und querbeet. Man muss sich vorstellen, dass jemand
das Thema &quot;Boredom&quot; am Beispiel einer merkwürdigen Ansammlung von
Steuereintreibern im Illinois der '70er Jahre veranschaulichen will.
Und das Buch ist, nicht zuletzt aufgrund seiner Sprache, unglaublich
schwer lesbar. Typisch DFW, nur nicht mitreißend. (Konstant lustig ist
nur die Situationen, in die &quot;David Wallace&quot; aufgrund der
Namensverwechslung gerät.) &amp;ndash; Dann habe ich mir auf einer
Zugfahrt große Teile von &lt;strong&gt;Michail Bulgakow: Der Meister und
Margarita&lt;/strong&gt; gegönnt. Aber über der Hälfte, und als sie Besen reitend
noch immer Unsinn reden, habe ich das Buch wieder weg gelegt. Ich habe
von dem Autor mehr erwartet, nachdem mir mehrere Leute von ihm
vorgeschwärmt hatten.&lt;/p&gt;

&lt;p&gt;Einen weiteren Roman habe ich von &lt;strong&gt;Bret Easton Ellis&lt;/strong&gt; gelesen:
&lt;strong&gt;Less than Zero&lt;/strong&gt;. Der war wesentlich besser als &quot;The Rules of
Attraction&quot;: Einfach mehr, und bessere Dekadenz. &amp;ndash; Auch von
&lt;strong&gt;Irvin D. Yalom&lt;/strong&gt; habe ich ein zweites Buch gelesen, nachdem mir &quot;Und
Nietzsche weinte&quot; sehr, sehr gut gefallen hatte. (Der Film ist
keinesfalls zu empfehlen.) &lt;strong&gt;Die Schopenhauer-Kur&lt;/strong&gt; ist nicht
historisch, dafür mit allerlei historischen Notizen gespickt. Ein
schöner Roman.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Peter Seibel: Coders at Work&lt;/strong&gt; ist ein schönes Buch: In 20
Interviews stellen sich Programmiergrößen wie Jamie Zawinsky und auch
Donald Knuth einem ganzen Katalog von Fragen: Debuggen via
Single-Stepping, oder doch lieber Quick'n'dirty-Print-Statements?
Editor oder IDE? Was war der härteste Bug, den sie je behoben haben?
&amp;ndash; Alles in allem der wunderbare Beweis dafür, dass diese Leute
auch nur Menschen sind, außerdem gibt es Gelegenheit, über das eigene
Codeschreiben zu reflektieren, und eventuell gewisse Fallstricke bei
der Projektplanung bei Anderen wie bei sich selbst aufzudecken.&lt;/p&gt;

&lt;p&gt;(Ich habe dieses Buch als Anlass genommen, mir &lt;strong&gt;The Art of Computer
Programming&lt;/strong&gt;, Band 1, zu kaufen. Ob sie dieses Buch gelesen haben
wurden nämlich auch fast alle gefragt. Durch den &quot;harten, mathematischen
Teil&quot; bin ich schon gut durchgekommen, aber mit dem MIX-Teil habe ich
erst ein bisschen begonnen.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;David Foster Wallace: Everything and More&lt;/strong&gt; ist grandios. Es ist der
erste Nicht-Roman, den ich von DFW gelesen habe. Im wesentlichen geht
es um die Eigenschaften der reellen Zahlen, die einen
Mathematikstudenten im ersten Semester in Analysis I tage-, wenn nicht
sogar wochenlang beschäftigen: Wie kann es sein, dass es unendlich
viele rationale Zahlen sind, sie aber 0% der reellen Zahlen ausmachen?
Wie kann es verschiedene &quot;Größen&quot; von Unendlichkeit geben? &amp;ndash; Das
ganze bettet DFW liebevoll in einen historischen Kontext und
mathematisch nicht ganz präzise, aber doch wunderbar verständliche,
selbst erfundene Notation ein. Schon der Untertitel deutet einiges an
Sprachwitz an: &lt;em&gt;A Compact History of Infinity&lt;/em&gt;. Für
Mathematikinteressierte definitiv zu empfehlen!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">tmux session names</title>
    <link href="http://blog.plenz.com/2012-01/tmux-session-names.html" />
    <updated>2012-01-03T17:47:00+01:00</updated>
    <id>http://blog.plenz.com/2012-01/tmux-session-names</id>
    <content type="html">&lt;p&gt;Usually, I name my tmux sessions according to what project I'm working on. To
attach a specific session, I use a custom &lt;code&gt;tm&lt;/code&gt; function, with the appropriate
completion:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# 2011-10-19: tmux shortcut for creating/attaching named sessions
  tm() {
    [[ -z &quot;$1&quot; ]] &amp;amp;&amp;amp; { echo &quot;usage: tm &amp;lt;session&amp;gt;&quot; &amp;gt;&amp;amp;2; return 1; }
    tmux has -t $1 &amp;amp;&amp;amp; tmux attach -t $1 || tmux new -s $1
  }

# 2011-10-19
# stolen from completion function _tmux
  function __tmux-sessions() {
      local expl
      local -a sessions
      sessions=( ${${(f)&quot;$(command tmux list-sessions)&quot;}/:[ $'\t']##/:} )
      _describe -t sessions 'sessions' sessions &quot;$@&quot;
  }
  compdef __tmux-sessions tm
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It looks like this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/tmux-session-completion.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;A colleague use this, but with a modification. If &lt;code&gt;[[ -z &quot;$1&quot; ]]&lt;/code&gt;, he'll simply
do a &lt;code&gt;tmux attach&lt;/code&gt;, which will attach the last recently used session.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Kindergeld ab jetzt einkommensunabhängig</title>
    <link href="http://blog.plenz.com/2012-01/kindergeld-ab-jetzt-einkommensunabh%C3%A4ngig.html" />
    <updated>2012-01-03T17:07:00+01:00</updated>
    <id>http://blog.plenz.com/2012-01/kindergeld-ab-jetzt-einkommensunabhängig</id>
    <content type="html">&lt;p&gt;Seit dem 1. Januar wird das Kindergeld unabhängig vom Einkommen des
Kindes gewährt. Damit fällt die bisherige Grenze von 8.004 Euro pro
Jahr weg.&lt;/p&gt;

&lt;p&gt;Ich habe ja keine Ahnung von Jura und den Techniken von Juristen. Aber
es sieht mir so aus, als ob da sehr, sehr wenig automatisiert wurde
bisher. Als naiver, und (im positiven Sinne) fauler, technisch
versierter Mensch, stelle ich mir das so vor:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Öffne BKGG.txt&lt;/li&gt;
&lt;li&gt;Klicke auf &quot;Unterschiede zur vorherigen Version&quot;&lt;/li&gt;
&lt;li&gt;Finde, dass der Paragraph über die 8.004 Euro ersetzt wurde&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Aber: denkste! Nach zehn Minuten Recherche bin ich in etwa so weit:
Das &quot;Steuervereinfachungsgesetz 2011&quot; wurde &lt;a href=&quot;http://www.treffpunkteltern.de/article.php?sid=1173&quot;&gt;am 19. Juni
2011&lt;/a&gt;
beschlossen, und im &lt;a href=&quot;http://www.buzer.de/gesetz/9913/index.htm&quot;&gt;BGBl. I S. 2131 (Nr.
55)&lt;/a&gt; im &lt;a href=&quot;http://www.buzer.de/gesetz/9913/a173142.htm&quot;&gt;Artikel
12&lt;/a&gt; bekannt gegeben. (Das
Original im PDF gibt es &lt;a href=&quot;http://www.bgbl.de/Xaver/media.xav?SID=anonymous3256023226382&amp;amp;bk=Bundesanzeiger_BGBl&amp;amp;name=bgbl%2FBundesgesetzblatt%20Teil%20I%2F2011%2FNr.%2055%20vom%2004.11.2011%2Fbgbl111s2131.pdf&quot;&gt;hier von
bgbl.de&lt;/a&gt;.)
Das liest sich so:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;2. § 2 wird wie folgt geändert:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;a) In Absatz 2 werden die Sätze 2 bis 10 durch die folgenden Sätze
ersetzt:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;„Nach Abschluss einer erstmaligen Berufsausbildung und eines
Erststudiums wird ein Kind in den Fällen des Satzes 1 Nummer 2 nur
berücksichtigt, wenn das Kind keiner Erwerbstätigkeit nachgeht. Eine
Erwerbstätigkeit mit bis zu 20 Stunden regelmäßiger wöchentlicher
Arbeitszeit, ein Ausbildungsdienstverhältnis oder ein geringfügiges
Beschäftigungsverhältnis im Sinne der §§ 8 und 8a des Vierten Buches
Sozialgesetzbuch sind unschädlich.&quot;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;

&lt;p&gt;Ahh, gut, denke ich mir &amp;ndash; und was stand denn ehemals in § 2, Abs.
2, Satz 2&amp;ndash;10 BKGG? &lt;a href=&quot;http://www.gesetze-im-internet.de/bkgg_1996/__2.html&quot;&gt;Jetzt steht da nämlich natürlich nur die
neue Fassung!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Immerhin kann &lt;a href=&quot;http://buzer.de&quot;&gt;buzer.de&lt;/a&gt; schonmal alle Gesetze, die
ein anderes Gesetz ändern, auflisten, also eine Art Versionshistorie:
&lt;a href=&quot;http://www.buzer.de/gesetz/1166/l.htm&quot;&gt;Änderungen am BKGG&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Leider&lt;/em&gt; kann man aber nicht einfach die vorherige Version via der
&lt;a href=&quot;http://archive.org/&quot;&gt;Wayback Machine&lt;/a&gt; aufrufen, denn &lt;a href=&quot;http://www.buzer.de/robots.txt&quot;&gt;die robots.txt
von bauzer.de&lt;/a&gt; liest sich u.a. so:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;User-agent: ia_archiver
Disallow: /
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Großartig. Justlaw.de haben genau den gleichen Eintrag. Dejure.de ist nur
zweimal in 2006 archiviert worden, das hilft auch nicht wirklich.&lt;/p&gt;

&lt;p&gt;Wie komme ich nun an ein Text-Diff? Unter &lt;a href=&quot;http://www.recht-in.de/gesetz/bkgg_2007_bundeskindergeldgesetz_inhaltsverzeichnis.html&quot;&gt;recht-in.de gibt es
prinzipiell die Möglichkeit, eine alte Version
abzurufen&lt;/a&gt;,
nur leider wurden aufgrund der Beendigung der Kooperation mit der
Rechtsdatenbank&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;[w]ie bereits angekündigt ... alle Urteile, Gesetze und Kommentare von
recht-in.de entfernt. Wir bedanken uns für das entgegengebrachte
Vertrauen.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Dang!&lt;/p&gt;

&lt;p&gt;Durch Zufall stoße ich auf lexetius.com, und da gibt es &lt;em&gt;genau&lt;/em&gt;
das, was ich brauche, zum Beispiel hier die &lt;a href=&quot;http://lexetius.com/PfandBG/1#text-sign6&quot;&gt;Gegenüberstellung der
alten und neuen Version des
PfandBG&lt;/a&gt; &amp;ndash; leider nur
ist das BKGG nicht aufgeführt. Der Mensch, der das gemacht hat, wurde
anscheinend auch &lt;a href=&quot;http://www.jurawiki.de/BestesFreiesJuristischesInternetProjekt2009#Nominierungen&quot;&gt;für einen Preis auf dem EDV-Gerichtstag 2009
nominiert&lt;/a&gt;.
Wonach ich also suche, ist ein Gesetz in &quot;historisch-synoptischer
Edition&quot;. Sowas gibt es für das BGB auch als
&lt;a href=&quot;http://delegibus.com/2008,2.pdf&quot;&gt;PDF&lt;/a&gt;, von dem Autor
von lexetius.com.&lt;/p&gt;

&lt;p&gt;Und endlich, schließlich, nach über vierzig Minuten Recherche und mit
dem neuen Stichwort &quot;synoptisch&quot; bzw. &quot;Synopse&quot; lande ich via
Google(!), weil ich das Nutzerinterface zunächst nicht kapiert hatte,
wieder bei &lt;strong&gt;buzer.de&lt;/strong&gt;. Dort sieht die Gesetzesänderung so aus (Link
hinter dem Bild geht zur Seite):&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.buzer.de/gesetz/1166/al31836-0.htm&quot;&gt;&lt;img
src=&quot;/img/vergleichstext_bkgg.png&quot; width=&quot;600&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wow. Diese Seite muss ich mir wirklich merken!&lt;/p&gt;

&lt;p&gt;Was habe ich gelernt? &amp;ndash; Auch wenn ich es niemals vorhatte, merke
ich doch, wie richtig es war, &lt;em&gt;nicht&lt;/em&gt; Jura zu studieren. Und ich muss
mir dieses Jahr keine Sorgen um eventuelle Kindergeldrückzahlungen
machen.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Happy New Year!</title>
    <link href="http://blog.plenz.com/2011-12/happy-new-year.html" />
    <updated>2011-12-31T17:05:00+01:00</updated>
    <id>http://blog.plenz.com/2011-12/happy-new-year</id>
    <content type="html">&lt;p&gt;I started this blog exactly one year ago. Over the course of this
year, I wrote 105 articles. That is not really much, and I want to
write more &amp;ndash; just about the stuff that's on my mind. So stay
tuned. ;-)&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/blogstats-one-year.png&quot; alt=&quot;Usage statistics for
blog.plenz.com&quot; /&gt;&lt;/p&gt;

&lt;p&gt;A Happy New Year to all my readers!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">28C3, Tag 3 und 4</title>
    <link href="http://blog.plenz.com/2011-12/28c3-tag-3-und-4.html" />
    <updated>2011-12-30T19:36:00+01:00</updated>
    <id>http://blog.plenz.com/2011-12/28c3-tag-3-und-4</id>
    <content type="html">&lt;p&gt;Ich war ehrlich gesagt die letzten beiden Tage nicht im bcc, sondern habe nur
von zu Hause Streams geschaut. Den letzten Congress über war ich
komplett beschäftigt, hatte immer was zu tun, bin zu nichts gekommen
&amp;ndash; und dieses Jahr sind so gut wie alle Leute, die ich sonst
immer dort getroffen habe, nicht da gewesen. Die Atmosphäre ware
gefühlt nicht so nett wie noch die vergangenen Jahre.&lt;/p&gt;

&lt;p&gt;Die &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4746.en.html&quot;&gt;Bitcoin-Analyse&lt;/a&gt; war nett und aufschlussreich. Aber auch hier
gab es direkt Contra im Publikum und vor allem im IRC &amp;ndash; ich weiß
da nie so recht, was man glauben soll. Interessant, dass sie den Fakt
gebracht haben, dass &lt;a href=&quot;http://falkvinge.net/2011/05/29/why-im-putting-all-my-savings-into-bitcoin/&quot;&gt;Rick Falkvinge seine Altersvorsorge in BTC
angelegt
hat&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Der &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4663.en.html&quot;&gt;&quot;Cellular protocol stacks for Internet&quot;&lt;/a&gt;-Talk war sicherlich
aufschlussreich, wenn man durch die ganzen Akronyme durchgestiegen
ist. Ich habe nichts verstanden.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4751.en.html&quot;&gt;&quot;The Hack will not be televised?&quot;&lt;/a&gt; war eine nette Kollektion von
Filmen, von denen ich einige auch noch nicht gesehen hatte. Der
Fnord-Jahresrückblick war ganz nett.&lt;/p&gt;

&lt;p&gt;Ich habe mir extra den Wecker gestellt, um nach nur fünf Stunden
Schlaf für den Talk um 13:30 aufzustehen, &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4587.en.html&quot;&gt;&quot;bup: Git for
backups&quot;&lt;/a&gt;. Leider gab es keine Demo, und nur wenige Informationen,
die über das Lesen der Doku hinausgingen.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Old DVDs and mplayer</title>
    <link href="http://blog.plenz.com/2011-12/old-dvds-and-mplayer.html" />
    <updated>2011-12-29T22:37:00+01:00</updated>
    <id>http://blog.plenz.com/2011-12/old-dvds-and-mplayer</id>
    <content type="html">&lt;p&gt;I was just watching an old DVD of mine (from 2003), but was annoyed that the
video had &quot;hardcoded&quot; black bars at the top and the bottom and was in
interlaced format. A fast motion looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/img/mplayer-standard.png&quot;&gt;&lt;img
src=&quot;/img/mplayer-standard.thumb.png&quot; alt=&quot;In motion, no deinterlacing, boders&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But mplayer can do everything! You just need to know how. Here it is: Use the
&lt;code&gt;cropdetect&lt;/code&gt; video filter, skip to the actual video and let it run for a while
(it will detect the black areas that don't change). Then copy the output:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ mplayer -vf cropdetect dvd://
...
[CROP] Crop area: X: 5..717  Y: 57..421  (-vf crop=704:352:10:64).
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, play the movie in 4:3 aspect racio, and force cropping at the numbers you
just found out. Additionally, use the &lt;code&gt;yadif&lt;/code&gt; deinterlacer:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ mplayer -aspect 4:3 -vf yadif,crop=704:352:10:64 dvd://
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now the same scene (with heavy motion) looks much nicer:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/img/mplayer-improved.png&quot;&gt;&lt;img
src=&quot;/img/mplayer-improved.thumb.png&quot; alt=&quot;In motion, deinterlacing, boders cropped&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">28C3, Tag 2</title>
    <link href="http://blog.plenz.com/2011-12/28c3-tag-2.html" />
    <updated>2011-12-29T03:31:00+01:00</updated>
    <id>http://blog.plenz.com/2011-12/28c3-tag-2</id>
    <content type="html">&lt;p&gt;Heute nicht so viele Talks geschaut. &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4735.en.html&quot;&gt;&quot;Reverse-engineering a Qualcomm
baseband&quot;&lt;/a&gt; war irgendwie verdammt cool &amp;ndash; einen GDB an den Debug-Port
eines USB-3G-Adapters anschließen und allerlei Disassembly-Magie betreiebn
&amp;ndash; aber leider (sprachlich) schwer zu verstehen.&lt;/p&gt;

&lt;p&gt;Der Nachfolgende Talk, &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4660.en.html&quot;&gt;&quot;Post Memory Corruption Memory Analysis&quot;&lt;/a&gt;,
hatte unglaubliches Potenzial. Den Menschen hätte man mal zwei Stunden
lange reden lassen sollen. Leider konnte er nur einen kleinen Teil
seiner 90 Folien zeigen, und war glaube ich von der ziemlich
unwissenden Audienz ein wenig geschockt. Ist nunmal nicht die
Blackhat.&lt;/p&gt;

&lt;p&gt;Ich habe mich das erste Mal mit
&lt;a href=&quot;http://en.wikipedia.org/wiki/Position-independent_code&quot;&gt;PIE&lt;/a&gt;
außerhalb von &lt;code&gt;-fPIC&lt;/code&gt; auseinandergesetzt, was ja im ersten Moment
nicht schlecht klingt. Sein Exploit habe ich nicht so 100% verstanden.
Die Technik aber ist super-elegant: Einfach den Prozess einhundert Mal
wegforken, überprüfen, wo die Adressen anlaufen, und daraus eine
höchstwahrscheinliche Stelle finden. Simpel, aber scheint gut zu
funktionieren.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Abschreiben</title>
    <link href="http://blog.plenz.com/2011-12/abschreiben.html" />
    <updated>2011-12-28T17:37:00+01:00</updated>
    <id>http://blog.plenz.com/2011-12/abschreiben</id>
    <content type="html">&lt;p&gt;Erst dachte ich, dass ich einfach bloß vergessen hätte, dass ich heute
schon die taz gelesen hatte. Der komplette Artikel inklusive diverser
Formulierungn kam mir bekannt vor. Aber dann habe ich nochmal
nachgeschaut, und der Artikel &lt;a href=&quot;http://taz.de/CCC-Kongress-zu-berwachung-beginnt/!84441/&quot;&gt;&quot;Liebesaffäre&quot; mit
Diktatoren&lt;/a&gt;
(taz) und &lt;a href=&quot;http://www.zeit.de/digital/2011-12/ccc-jahreskongress-software&quot;&gt;&quot;Liebesaffäre zwischen westlichen Technologie-Unternehmen
und Diktatoren&quot;&lt;/a&gt; (Zeit online)
ist in vielen Teilen fast im Wortlaut gleich. Einzelne Sätze sind
korrigiert bzw. hinzugefügt.&lt;/p&gt;

&lt;p&gt;Ehrlich? Liefert die DPA so gut vorstrukturierte Artikel, dass man da
nur noch einen Absatz reinfüllen muss, und das als &quot;eigenes&quot; verkaufen
kann?&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">28C3, Tag 1</title>
    <link href="http://blog.plenz.com/2011-12/28c3-tag-1.html" />
    <updated>2011-12-28T03:29:00+01:00</updated>
    <id>http://blog.plenz.com/2011-12/28c3-tag-1</id>
    <content type="html">&lt;p&gt;Die Rechnung &quot;Lange schlafen und &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4897.en.html&quot;&gt;Keynote&lt;/a&gt; mit Laptop im Bett gucken&quot; ging
nichtso ganz auf: Das Netz im bcc war flaky und deshalb kamen die FEM-Streams
nicht aus dem Gebäude heraus. Dafür in Ruhe geduscht.
Der nachfolgende &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4876.en.html&quot;&gt;Talk von Anne Roths&lt;/a&gt; war interessant &amp;ndash; ich
hatte die wesentlichen Aspekte der Dresden-Affäre gar nicht so
wirklich mitbekommen.&lt;/p&gt;

&lt;p&gt;Der Vortrag über &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4799.en.html&quot;&gt;die Sicherheit von Eisenbahnnlagen&lt;/a&gt; war
interessant und unheimlich zugleich. Bei auf physikalischem Kontakt
oder simplen Induktionen basierenden Notbremssystemen haben Saboteure
auf offener Strecke ja wirklich ein &lt;em&gt;leichtes&lt;/em&gt; Spiel. (Sidefact: Dass
Sitzplatzreservierungen in den ICEs immer noch per Diskette
eingespielt werden lässt auch ein bisschen erahnen, wie &quot;modern&quot; die
Technik der Bahn bisweilen ist.)&lt;/p&gt;

&lt;p&gt;Die Talks hatte ich von zu Hause mit den mittlerweile funktionierenden
Streams geguckt. Dann wollte ich schnell ins bcc los, um einen Platz
in Saal 1 zu finden. Hat leider nicht geklappt.&lt;/p&gt;

&lt;p&gt;Daraufhin saß ich für den zweiten Part der Talks auf Ebene A mit
Kabelnetz und habe weiter Streams geschaut. Den
&lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4901.en.html&quot;&gt;Staatstrojaner-Talk&lt;/a&gt; habe ich nur teilweise gehört, den Großteil
der Details hatte ich aber auch schon in der Entstehung verfolgt, von
daher nicht viel neues.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4766.en.html&quot;&gt;Travis' Talk über PIP-Exploits&lt;/a&gt; war hingegen äußerst interessant.
Schaut euch den am besten selbst an (z.B. beim
&lt;a href=&quot;http://ondemand.28c3.fem-net.de/&quot;&gt;FEM-On-Demand-Stream&lt;/a&gt;). Die
wesentliche Idee, die man im Hinterkopf behalten sollte: Man kann
prinzipiell, und wenn man genügend Bandbreite hat, Radio-Frames ohne
Radio-Equipment verschicken &amp;ndash; also IP-Pakete schicken, die mit
gewisser Wahrscheinlichkeit als andere Pakete aufgefasst werden, wenn
Sie über Wireless-Equipment an den Empfänger geschickt werden. Das
ganze ist standards-compliant und ist ein (OSI-)Level-1-Exploit.
Beeindruckend.&lt;/p&gt;

&lt;p&gt;In der Pause habe ich mir einen Sitzplatz organisiert in Saal 1. Der
anschließende Talk, &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4848.en.html&quot;&gt;The coming war on general computation&lt;/a&gt;, war
nicht neu, aber rhetorisch sehr gut (ohne Slides). Ich habe allerdings
nur mit halbem Ohr zugehört. Zum Glück gibt es solche Leute, die sich
mit lernresistenten Politikern und Lobbyisten herumschlagen.&lt;/p&gt;

&lt;p&gt;Bei &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4736.en.html&quot;&gt;Karsten Nohls Talk&lt;/a&gt; konnte man schon im Voraus davon
ausgehen, dass etwas beeindruckendes präsentiert werden würde. Das war
dann auch so. Wie bei den beiden vorherigen Talks gilt wieder:
Dringend anschauen, und sich im Klaren darüber sein, dass GSM im
wesentlichen kaputt ist. Oh, und: In Zukunft die Handyrechnung mal
genauer untersuchen, wenn sie erstaunlich hoch ist. ;-)&lt;/p&gt;

&lt;p&gt;Danach kam &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4930.en.html&quot;&gt;Dan Kaminskys &quot;Black Ops of TCP/IP 2011&quot;&lt;/a&gt;. Dan hat
häufig interessante Ideen aber hat irgendwie weder primärquellen oder
veröffentlicht Resultate so, dass sie auffindbar oder nachvollziehbar
wären. (Eine Ausnahme, die mir einfällt, ist das DNS-Tunneling-Tool
OzymanDNS.) Der Talk ging zunächst um BitCoins, an denen er eineige
mehr oder weniger interessante und geeky-lustige Feststellungen
machte. Schließlich kam er dann doch noch auf TCP/IP zu sprechen, um
später auch noch etwas zu Net-neutrality/QoS zu erzählen. Interessante
Anregungen &amp;ndash; aber irgendwie nicht so wirklich aufschlussreich.
Dazu kommt, dass er schnell redet &lt;em&gt;und&lt;/em&gt; gleichzeitig andere Infos auf
den überfüllten Slides stehen hat. Eins zur Zeit geht, beides nicht...&lt;/p&gt;

&lt;p&gt;Die nachfolgende Pentanews Game Show war gefühlt schlechter und
schlechter programmiert (vom Interface her) als letztes Mal.&lt;/p&gt;

&lt;p&gt;Ich habe merkwürdige Probleme mit dem WLAN beim Congress. Ich führe
das momentan darauf zurück, dass es mehrere APs mit der gleichen ESSID
gibt, und natürlich ein beträchtliches Noise-Level herrscht. Das
Problem tritt ortsunabhängig und sowohl auf 5Ghz und 2.4Ghz auf, und
liest sich im Log wie folgt:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[86969.683316] wlan0: authenticate with b4:a4:e3:64:8d:cd (try 1)
[86969.684909] wlan0: authenticated
[86969.685164] wlan0: associate with b4:a4:e3:64:8d:cd (try 1)
[86969.688341] wlan0: RX AssocResp from b4:a4:e3:64:8d:cd (capab=0x1 status=0 aid=25)
[86969.688351] wlan0: associated
[86996.951510] wlan0: deauthenticating from b4:a4:e3:64:8d:cd by local choice (reason=2)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Man beachte die 27 Sekunden, die zwischen Association und Deassociation liegen.
Manchmal ist auch &lt;code&gt;reason=3&lt;/code&gt;. Ich habe diverse Optionen für das
&lt;code&gt;iwlagn&lt;/code&gt;-Modul ausprobiert, um das Problem zu lösen (u.a.
&lt;code&gt;11n_disable=1&lt;/code&gt; und &lt;code&gt;swcrypto=1&lt;/code&gt;), allerdings ohne Erfolg. Wenn ich
allerdings &lt;em&gt;nicht&lt;/em&gt; via &lt;code&gt;iwconfig&lt;/code&gt; arbeite, dann geht es: Ich habe das
erste Mal &lt;code&gt;wicd&lt;/code&gt; installiert und benutzt, und damit funktioniert das
WLAN wunderbar. Keine Idee, warum.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">sed and jekyll tags</title>
    <link href="http://blog.plenz.com/2011-12/sed-and-jekyll-tags.html" />
    <updated>2011-12-27T03:18:00+01:00</updated>
    <id>http://blog.plenz.com/2011-12/sed-and-jekyll-tags</id>
    <content type="html">&lt;p&gt;Did you know the &lt;code&gt;-s&lt;/code&gt; switch to &lt;code&gt;sed&lt;/code&gt;? I had the strange effect that
operating on several files produced different results between when I
called &lt;code&gt;sed&lt;/code&gt; repeatedly in a &lt;code&gt;for&lt;/code&gt; loop and passing all the files as
arguments just once. &amp;ndash; &lt;code&gt;-s&lt;/code&gt; tells &lt;code&gt;sed&lt;/code&gt; not to consider all
files to be one big stream, but to separate them from each other.&lt;/p&gt;

&lt;p&gt;Anyway, here's a script that searches &lt;a href=&quot;http://git.plenz.com/blog/tree/_posts&quot;&gt;all the
posts&lt;/a&gt; now and gives me
numbers on the tags I already used.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/sh

sed -s -n '
    /---/,/---/ {
        /tags:/ {
            s/^tags: \[//;
            s/\]$//;
            s/, */\n/g;
            p
        }
    }' ~/blog/_posts/*.markdown | sort | uniq -c | sort -n
&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">28C3</title>
    <link href="http://blog.plenz.com/2011-12/28c3.html" />
    <updated>2011-12-27T02:23:00+01:00</updated>
    <id>http://blog.plenz.com/2011-12/28c3</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;https://events.ccc.de/congress/2011/wiki/Main_Page&quot;&gt;&lt;img
src=&quot;/img/28c3_banner_hochkant.png&quot; alt=&quot;28C3 propaganda sticker&quot;
style=&quot;float:left; margin-right:.5cm;&quot; /&gt;&lt;/a&gt;
I'll be at &lt;a href=&quot;https://events.ccc.de/congress/2011/wiki/Main_Page&quot;&gt;the 28th Chaos Communication
Congress&lt;/a&gt; the next few
days. If you are there, too, write me an email or &lt;a href=&quot;http://plenz.com/contact.html&quot;&gt;text
me&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I haven't throughly looked at the
&lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/&quot;&gt;Fahrplan&lt;/a&gt; yet. But there are
some classics there already, for example &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4930.en.html&quot;&gt;Dan
Kaminsky&lt;/a&gt;,
the Fnord News Show or a new &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4675.en.html&quot;&gt;Neusprech talk by
maha&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Some other talks seem promising: &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4781.en.html&quot;&gt;Deceiving Authorship
Detection&lt;/a&gt;
will unveil two tools for detecting and &lt;em&gt;obfuscating&lt;/em&gt; authorship patterns; &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4710.en.html&quot;&gt;The
future of cryptology: which 3 letters algorithm(s) could be our
Titanic?&lt;/a&gt; also sounds cool.&lt;/p&gt;

&lt;p&gt;I was surprised to see a &lt;a href=&quot;https://events.ccc.de/congress/2011/Fahrplan/events/4587.en.html&quot;&gt;talk about
&quot;bup&quot;&lt;/a&gt;.
Usually, the Congress has a very un-techy focus. To outsiders this might sound
strange, but it's mainly about &lt;em&gt;ideas&lt;/em&gt;, not so much about technology of the
status quo. Talk topics normally include &quot;What if X happens?&quot; (where X is in:
internet lockdown, censorship, Aliens arrive, ...), &quot;How can we hack X?&quot; (X
being: CCTVs, mobile devices, our government, ...), &quot;How we hacked X&quot; (where X
might just be your occasional airport access control badges system).&lt;/p&gt;

&lt;p&gt;Anyway, I hope I'll have some time to play around with stuff I had on my mind
for some time now.&lt;/p&gt;

&lt;p&gt;Preparation for tomorrow's Keynote: &lt;a href=&quot;http://www.ted.com/talks/evgeny_morozov_is_the_internet_what_orwell_feared.html&quot;&gt;Evgeny Morozov's TED
talk&lt;/a&gt;.&lt;/p&gt;

&lt;br style=&quot;clear:both;&quot; /&gt;

</content>
  </entry>
  
  <entry>
    <title type="html">Fotos</title>
    <link href="http://blog.plenz.com/2011-12/fotos.html" />
    <updated>2011-12-27T02:07:00+01:00</updated>
    <id>http://blog.plenz.com/2011-12/fotos</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;http://mplenz.jimdo.com/&quot;&gt;Mein Bruder&lt;/a&gt; interessiert sich seit einiger Zeit
sehr für Fotografie und macht wirklich gute Bilder. Die folgenden Fotos von
mir hat er über die Feiertage gemacht:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/img/julius1.jpg&quot;&gt;&lt;img src=&quot;/img/julius1.thumb.jpg&quot; title=&quot;Mit Lampe statt Kopf&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/img/julius2.jpg&quot;&gt;&lt;img src=&quot;/img/julius2.thumb.jpg&quot; title=&quot;Bei der Arbeit&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/img/julius3.jpg&quot;&gt;&lt;img src=&quot;/img/julius3.thumb.jpg&quot; title=&quot;Mit neuem Buch (N. Stephensons REAMDE)&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">git grep</title>
    <link href="http://blog.plenz.com/2011-12/git-grep.html" />
    <updated>2011-12-22T13:55:00+01:00</updated>
    <id>http://blog.plenz.com/2011-12/git-grep</id>
    <content type="html">&lt;p&gt;Mit &lt;a href=&quot;http://noone.org/blog&quot;&gt;Axel&lt;/a&gt; und &lt;a href=&quot;http://efho.de/&quot;&gt;Frank&lt;/a&gt; kam ich
auf Gits eigenes &lt;code&gt;grep&lt;/code&gt; zu sprechen. Warum wird die Funktionalität da
gedoppelt und neu programmiert?&lt;/p&gt;

&lt;p&gt;Ein Auszug meiner Antwortmail an die beiden, für das Blog mit Links
angereichert:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Im wesentlichen leistet git-grep das gleiche wie grep auf allen
verwalteten Dateien. &lt;em&gt;ABER&lt;/em&gt; es ist, und das war m.E. die
Hauptmotivation dahinter, es überhaupt zu schreiben, viel schneller
als reguläres grep. (Und &lt;a href=&quot;http://ridiculousfish.com/blog/posts/old-age-and-treachery.html&quot;&gt;reguläres grep zu schlagen ist ja
bekanntermaßen schon schwer&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;Zum Beispiel, wenn man im Kernel-Tree greppt. (Alle Kommandos mehrfach
ausgeführt, so dass der Cache voll ist.)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ time grep foo -- **/*.c NO
grep foo -- **/*.c &amp;amp;&amp;gt;| /dev/null  17.67s user 0.22s system 99% cpu 17.928 total

$ time git grep foo -- **/*.c NO
git grep foo -- **/*.c &amp;amp;&amp;gt;| /dev/null  6.17s user 0.31s system 109% cpu 5.888 total
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Viel beeindruckender wird es noch, wenn man für git-grep das
Globbing-Muster erst gar nicht angibt.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ time git grep foo NO
git grep foo &amp;amp;&amp;gt;| /dev/null  0.66s user 0.30s system 342% cpu 0.281 total
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Oder alternativ ein Globbing-Muster angibt, das aber &lt;em&gt;nicht&lt;/em&gt; erst von
der Shell expandieren lässt:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ time git grep foo -- '*.c' NO
git grep foo -- '*.c' &amp;amp;&amp;gt;| /dev/null  0.46s user 0.16s system 300% cpu 0.208 total
&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Also noch mal zusammengefasst: Wenn ich in allen C-Dateien nach &quot;foo&quot; greppe,
bin ich mit der Git-Version auf meinem System 17.9/0.208 = &lt;em&gt;86.05&lt;/em&gt; mal so
schnell wie reguläres grep. Anders ausgedrückt: Das eine Kommando dauert, das
andere ist fast &quot;sofort da&quot;.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Wie das geht? Im wesentlichen ist das auf Multithreading
zurückzuführen. (Sieht man ja auch an den CPU-Zahlen: grep bei ca.
100% = eine CPU, git-grep bei &gt;300% = drei CPUs.)&lt;/p&gt;

&lt;p&gt;Im Mutltithreading-Modus von git-grep gibt es den Haupt-Thread, der
einfach alle Blobs einsammelt, die überprüft werden sollen, und die an
acht Threads weitergibt, die dann entsprechend asynchron die Matches
durchschauen können, aber trozdem alles in einer sinnvollen
Reihenfolge ausgeben. (Details: &lt;a href=&quot;https://github.com/gitster/git/blob/master/builtin/grep.c&quot;&gt;builtin/grep.c&lt;/a&gt;)&lt;/p&gt;&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">X220's UMTS card</title>
    <link href="http://blog.plenz.com/2011-12/x220s-umts-card.html" />
    <updated>2011-12-22T13:22:00+01:00</updated>
    <id>http://blog.plenz.com/2011-12/x220s-umts-card</id>
    <content type="html">&lt;p&gt;I've been toying around with the UMTS module in my X220 lately. I got
a pre-paid SIM from &lt;a href=&quot;http://blau.de&quot;&gt;blau.de&lt;/a&gt;, who offer 24h UMTS
flatrates for 2,40 EUR. (This is probably my use case: Being somewhere
without internet access for a day or two. This only happens so often,
so I don't want a &quot;real&quot; flat.)&lt;/p&gt;

&lt;p&gt;My UMTS card is manufactured by Sony Ericsson and connected via
internal USB:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ lsusb -v -s 004:003
    ...
    idVendor           0x0bdb Ericsson Business Mobile Networks BV
    idProduct          0x1911
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The installation is easy: Just insert the SIM card behind the battery
as &lt;a href=&quot;http://forums.lenovo.com/t5/image/serverpage/image-id/4121iF2F67FA086EE1A0D/image-size/original?v=mpbl-1&amp;amp;px=-1&quot;&gt;shown
here&lt;/a&gt;.
Add yourself to the &lt;code&gt;dialout&lt;/code&gt; group, log in again, and you're set.&lt;/p&gt;

&lt;p&gt;You can first connect to your device using &lt;code&gt;chat&lt;/code&gt; or &lt;code&gt;picocom&lt;/code&gt; (which
you can be terminated via C-a C-x). To ask if you can use the SIM
without PIN, send the &lt;code&gt;AT+CPIN?&lt;/code&gt; command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ picocom /dev/ttyACM0
...
AT+CPIN?
+CPIN: READY
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you're not ready to go, I would disable the PIN request using a regular phone. (I did.)&lt;/p&gt;

&lt;p&gt;Dialling out is easy. I set up two profiles in the &lt;code&gt;/etc/wvdial.conf&lt;/code&gt;
that allow me to switch between &quot;pay per megabyte&quot; and &quot;dayflat&quot;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[Dialer blau]
Modem = /dev/ttyACM0
Init1 = AT+CGDCONT=1,&quot;IP&quot;,&quot;internet.eplus.de&quot;
Stupid mode = 1
phone= *99#
Username = blau
Password = blau

[Dialer tagesflat]
Modem = /dev/ttyACM0
Init1 = AT+CGDCONT=1,&quot;IP&quot;,&quot;tagesflat.eplus.de&quot;
Stupid mode = 1
phone= *99#
Username = blau
Password = blau
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The rest happens automatically, once you invoke &lt;code&gt;wvdial blau&lt;/code&gt; or
&lt;code&gt;wvdial tagesflat&lt;/code&gt;. (Note you have to execute these with root
privileges because they want to modify pppd-related config files.)
Most probably you want the follow-up command &lt;code&gt;route add default dev
ppp0&lt;/code&gt; to route all traffic via the ppp0 interface.&lt;/p&gt;

&lt;p&gt;In a test run I got a downstream speed of 190KB/s (city perimeter).
Working over SSH is not painful at all.&lt;/p&gt;

&lt;p&gt;I also played around with &lt;a href=&quot;http://wammu.eu/gammu/&quot;&gt;gammu&lt;/a&gt; a little
bit.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ gammu --identify
Device               : /dev/ttyACM0
Manufacturer         : Lenovo
Model                : unknown (F5521gw)
Firmware             : R2A07
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The Wammu interface is nice, it can even receive SMS. But sending SMSes
failed so far:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ echo &quot;Das ist ein Test&quot; | gammu --debug textall --debug-file /tmp/gammu \
    sendsms TEXT +491785542342
...
1 &quot;AT+CMGS=28&quot;
2 &quot;&amp;gt; 079194710716000011000C919471584532240000FF10C4F01C949ED341E5B41B442DCFE9^Z&quot;
3 &quot;+CMS ERROR: 500&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;... which is somewhat of an &quot;generic error&quot;. Maybe sending SMS is not
supported at all. I'll look into that later.&lt;/p&gt;

&lt;p&gt;Also, I'll have a look whether my Card supports GPS information
retrieval. &lt;a href=&quot;http://www.thinkwiki.org/wiki/Ericsson_F3507g_Mobile_Broadband_Module&quot;&gt;Thinkwiki claims a similar model does
this&lt;/a&gt;.
Interesting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Actually, I forgot one thing. I keep the following two entries in my &lt;code&gt;/etc/wvdial.conf&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[Dialer on]
Modem = /dev/ttyACM0
Init1 = AT+CFUN=1

[Dialer off]
Modem = /dev/ttyACM0
Init1 = AT+CFUN=4
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The actual sequence is now: &lt;code&gt;wvdial on &amp;amp;&amp;amp; wvdial blau&lt;/code&gt;. The &lt;code&gt;AT+CFUN=1&lt;/code&gt; will
active the radio equipment, which is necessary. And, suddenly, also SMS delivery works! :-)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">New X220</title>
    <link href="http://blog.plenz.com/2011-12/new-x220.html" />
    <updated>2011-12-10T14:38:00+01:00</updated>
    <id>http://blog.plenz.com/2011-12/new-x220</id>
    <content type="html">&lt;p&gt;I got a brand new &lt;a href=&quot;http://www.thinkwiki.org/wiki/Category:X220&quot;&gt;Thinkpad
X220&lt;/a&gt; on thursday. I'm
not much into hardware, I think it should mainly work. I have a model
with 4 GB of RAM, an i7 at 2.7 GHz, UMTS preinstalled, SSD instead of
a HDD and an IPS panel. It's a really nifty thing.&lt;/p&gt;

&lt;p&gt;Paying the extra money for the SSD is totally worth it. &lt;em&gt;Everything&lt;/em&gt;
happens instantaneous. The bootup process is down to five seconds.
The IPS panel is really worth it, too. ThinkPads have long been
criticized for their bad displays &amp;ndash; with the new panel at full
brightness, my regular screen looks really dim and grey...&lt;/p&gt;

&lt;p&gt;The Debian netinstall works smoothly. I haven't come around to testing
all the stuff like the DisplayPort connectors, Bluetooth, UMTS, USB
3.0. But the usual stuff works out of the box.&lt;/p&gt;

&lt;p&gt;However, there are major problems with the power management of both
the graphics card and the whole system, the latter one being a
regression in the recent 3.0 and 3.1 kernel series regarding
&lt;a href=&quot;http://en.wikipedia.org/wiki/Active_State_Power_Management&quot;&gt;ASPM&lt;/a&gt;.
Currently I'm using the 3.1.0-1-amd64 kernel with the
&lt;code&gt;pcie_aspm=force&lt;/code&gt; boot parameter. I cannot really see a difference in
power consumtion when varying this parameter, though.&lt;/p&gt;

&lt;p&gt;A &lt;a href=&quot;http://www.phoronix.com/scan.php?page=article&amp;amp;item=intel_i915_power&amp;amp;num=1&quot;&gt;major thing&lt;/a&gt;,
however, is re-enabling the RC6 mode of the graphics chip. This alone
saves more than 4W when the computer is in an idle state. My
&lt;code&gt;/etc/modprobe.d/i915-kms.conf&lt;/code&gt; looks like this now:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;options i915 modeset=1
options i915 i915_enable_rc6=1
options i915 i915_enable_fbc=1
options i915 lvds_downclock=1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Suspend/resume works fine, no flickering effects. I use the following
command to find out the current power consumption:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;while sleep 1; do
    awk '{printf&quot;%.2f\n&quot;,$1/-1000}' &amp;lt; /sys/devices/platform/smapi/BAT0/power_now;
done
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This requires the &lt;code&gt;tp_smapi&lt;/code&gt; kernel module to be loaded. With full
brightness (0) and while writing this blog article, the consumption is at
~12W; with medium brightness (8) it's ~8.5W; at the lowest brightness
(15) it's ~8W; With the display completely turned off, it's ~6.5W.
There are people who
&lt;a href=&quot;http://forums.linuxmint.com/viewtopic.php?f=191&amp;amp;t=85424#p498935&quot;&gt;claim&lt;/a&gt;
they only have an ~5.4 power consumption. If you have any other hints
on this or if you own an X220 yourself, I'd be interested in the details.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">ZM</title>
    <link href="http://blog.plenz.com/2011-12/zm.html" />
    <updated>2011-12-10T14:03:00+01:00</updated>
    <id>http://blog.plenz.com/2011-12/zm</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=YY2kQICWJoM&quot;&gt;Das Video&lt;/a&gt; ließ es ja schon erwarten: Das Album &lt;em&gt;Kauft
nicht bei Zugezogenen&lt;/em&gt;, das man sich &lt;a href=&quot;http://herrmerkt.blogspot.com/2011/12/zugezogen-maskulin-kauft-nicht-bei.html&quot;&gt;hier&lt;/a&gt; runterladen kann, steckt
voller lustiger Hommagen und längst überfälliger Kritik am Berlin-Hype.&lt;/p&gt;

&lt;p&gt;Mal ein Zitat aus &quot;Jugend O.S.T.&quot;, durchsetzt mit Samples altbekannter Raps
(kursiv markiert):&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Ich stürzte in die Schwärze, in die Leere /&lt;br /&gt;
Rap ist meine Schwester und &lt;em&gt;ich schütze ihre Ehre&lt;/em&gt; /&lt;br /&gt;
Meine Jugend versaute ich durch das Verweigern von Befehlen /&lt;br /&gt;
&lt;em&gt;doch ich schicke deine Homies ins Gehege&lt;/em&gt; /&lt;br /&gt;
ich schalte dich aus, schalte auf stur /&lt;br /&gt;
ZM kämpft &lt;em&gt;gegen die Kultur&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Grandios.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">demotivating maths</title>
    <link href="http://blog.plenz.com/2011-12/demotivating-maths.html" />
    <updated>2011-12-05T21:48:00+01:00</updated>
    <id>http://blog.plenz.com/2011-12/demotivating-maths</id>
    <content type="html">&lt;p&gt;Math is not easy. (&lt;a href=&quot;http://blog.plenz.com/2011-10/pictures-in-pictures.html&quot;&gt;See
also&lt;/a&gt;) I saw
&lt;a href=&quot;http://i.imgur.com/rfHbw.jpg&quot;&gt;this&lt;/a&gt; scroll by today:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/math_imgur2.jpg&quot; alt=&quot;37 = 2 * 18&quot; style=&quot;width:600px;&quot; /&gt;&lt;/p&gt;

</content>
  </entry>
  
  <entry>
    <title type="html">GUI simplicity vs. UNIX simplicity</title>
    <link href="http://blog.plenz.com/2011-11/gui-simplicity-vs-unix-simplicity.html" />
    <updated>2011-11-24T18:59:00+01:00</updated>
    <id>http://blog.plenz.com/2011-11/gui-simplicity-vs-unix-simplicity</id>
    <content type="html">&lt;p&gt;I &lt;a href=&quot;http://blog.plenz.com/2011-10/gnome-is-not-aqua.html&quot;&gt;ranted about the new Unity
interface&lt;/a&gt; some weeks
ago. On several occasions thereafter, I had to help people solve
problems they had using some sort of graphical user interface.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Example I:&lt;/em&gt; I was debugging a broken VPN connection. The connection
settings were managed by the KDE network manager, which is rather easy
to use. Internally, of course, the network manager just writes out
some temporary configuration files and starts the PPP daemon with a lot of
custom flags. That's all fine if it works &amp;ndash; but in this case it
didn't work. It just said: &quot;connection failed&quot;, no diagnostics given.
(The solution was to enable
&lt;a href=&quot;http://en.wikipedia.org/wiki/Microsoft_Point-to-Point_Encryption&quot;&gt;MPPE&lt;/a&gt;,
which itself was trivial: ticking the corresponding box. How did I
find this out? Tailing &lt;code&gt;/var/log/dmesg&lt;/code&gt; while connecting. It said
right there: MPPE not enabled, but server side requires it.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Example II:&lt;/em&gt; The gnome network manager somehow fucked up. Even now I
don't know why. It says &quot;connecting&quot;, and then nothing happens. No
diagnostics.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;UNIX is simple. It really is. There is a &lt;a href=&quot;http://catb.org/esr/writings/taoup/html/&quot;&gt;reasonable and
easy-to-follow philosophy behind
it&lt;/a&gt;. But UNIX requires the
user to know what he wants to do, and read error messages. &lt;em&gt;UNIX
simplicity is not the same as iPhone simplicity.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Eric S. Raymond wrote this &lt;a href=&quot;http://catb.org/esr/writings/taoup/html/ch01s06.html&quot;&gt;set of
rules&lt;/a&gt; that
should guide UNIX program design. In this context, two important
rules stick out (emphasis mine):&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Rule of Silence:&lt;/strong&gt; When a program has nothing
surprising to say, it should say nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule of Repair:&lt;/strong&gt; When you must fail, fail &lt;em&gt;noisily&lt;/em&gt;
and as soon as possible.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Although this is of course mostly aimed at text user interface
programs, you can get an important point here. Most GUIs adhere to
the Rule of Silence quite well &amp;ndash; in fact so well that they
seldom say anything &lt;em&gt;at all&lt;/em&gt;!&lt;/p&gt;

&lt;p&gt;Since many UNIX GUIs invoke text-interface programs under the hood, it
should be a necessity to be able to view &lt;em&gt;how&lt;/em&gt; those program failed.
Luckily, most TUI programs provide descriptive error messages. If they are
hidden in the GUI there are two effects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the &quot;regular&quot; user sees that something fails, and&lt;/li&gt;
&lt;li&gt;the admin looking at the problem sees that something fails and pulls
out his hair trying to find out &lt;em&gt;what&lt;/em&gt; &amp;ndash; so that he can repair
it!&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I don't use GUI programs at all, except for a Browser
(Vimperator/Firefox), a PDF viewer (Zathura) and The GIMP. Mostly,
this is because of usability considerations. But also, I'm afraid to
use a computer where I cannot see what is happening. And that's
exactly the case with GUIs that do stuff that can fail: &lt;em&gt;I don't know
what they are doing and why they are failing!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I the end I always go the extra mile and read up on the PPP daemon,
for example. This wouldn't be necessary if GUIs had a switch to do
some really verbose logging. That would help tremendously. Plus a
button to display that log. Should be easy, shouldn't it?&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Rap am Freitag</title>
    <link href="http://blog.plenz.com/2011-11/rap-am-freitag.html" />
    <updated>2011-11-11T21:16:00+01:00</updated>
    <id>http://blog.plenz.com/2011-11/rap-am-freitag</id>
    <content type="html">&lt;p&gt;Bushido hat ja den Bambi bekommen. Alle regen sie sich auf. Verständlicherweise
&lt;a href=&quot;http://www.taz.de/Burda-liebt-Bushido-/!81729/&quot;&gt;heult die taz rum&lt;/a&gt;, und
entblödet sich auch nicht, möglichst krasse Zitate als explizit vom Burda-Verlag
als einen &quot;wertvollen Beitrag zum gegenseitigen Verständnis sozialer Gruppen mit
unterschiedlichen kulturellen Wurzeln&quot; zu bezeichnen. Arm, das ist arm.&lt;/p&gt;

&lt;p&gt;Selbst die Piratenpartei &lt;a href=&quot;http://www.piratenpartei.de/Pressemitteilung/bambi-f%C3%BCr-bushido-piraten-vermissen-grundlegende-werte-beim-burda-verlag&quot;&gt;kritisiert die
Preisvergabe&lt;/a&gt;.
Oh. Aber für Pressemitteilungen zu wesentlichen, medial besonders
wichtigen Kernthemen wie dem Bundestrojaner habt ihr Tage gebraucht?
&amp;ndash; Ja, nee, ist klar.&lt;/p&gt;

&lt;p&gt;Den Bambi &amp;ndash; ich habe übrigens heute das erste Mal bewusst von der
Institution &quot;Bambi-Verleihung&quot; gehört... &amp;ndash; den Bambi für Integration hat
Bushido aber natürlich verdient. Vielleicht sollte man mal aus einem
anderen Blickwinkel drauf schauen:&lt;/p&gt;

&lt;p&gt;Ein ehemaliger Randgruppen-Rapper, der sich so weit hocharbeitet, dass
er mit den Stars und Sternchen des deutschen Fernsehens koksen kann;
seinen eigenen Kinofilm und eine nette Villa in Dahlem hat; ganz
offensichtlich gut das Klischee des Ausländers bedienen kann, und
versteht, wie er polarisieren kann. Ein Rapper, der einen fetten
Major-Deal hat, und es nicht mehr nötig hat, gute Musik zu machen,
sondern einfach mit dem Mainstream schwimmen kann. (&quot;23&quot; gehört?
Puuuhh.) Einer, der offensichtlich gut genug in der schmierigen Welt
zwischen Entertainment und Aufmerksamkeit heischendem Journalismus
umherwandelt, um sich so einen Preis vergeben zu lassen. &amp;ndash;
Eindeutig gut integriert, würde ich mal sagen.&lt;/p&gt;

&lt;p&gt;Boah ist das lachhaft, wie alle auf ihm rumkloppen. &lt;a href=&quot;http://staiger.tumblr.com/post/12650284235/briefe-an-mama&quot;&gt;Staiger hat da
sehr gut drüber reflektiert mit einem fiktiven &quot;Brief an
Mama&quot;.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Oh ja, Rap: Savas'
&lt;a href=&quot;http://www.amazon.de/gp/product/B005QEHYLI/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=wwwkoolsavasd-21&amp;amp;linkCode=as2&amp;amp;camp=1638&amp;amp;creative=6742&amp;amp;creativeASIN=B005QEHYLI&quot;&gt;Aura&lt;/a&gt;
ist da. Ziemlich gutes Album &amp;ndash; und zum Glück ein nicht
&quot;integrierter&quot; Rapper, sondern fresh wie eh und je.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Dönermann, der vierte...?</title>
    <link href="http://blog.plenz.com/2011-11/d%C3%B6nermann-der-vierte.html" />
    <updated>2011-11-11T20:43:00+01:00</updated>
    <id>http://blog.plenz.com/2011-11/dönermann-der-vierte</id>
    <content type="html">&lt;p&gt;Irgendwie hatte ich es ja geahnt, nachdem der Dönermann unten seit
mehreren Wochen umgebaut wurde...&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Berlin ist nicht nur die Stadt der 1.000 rund um die Uhr geöffneten
Dönerläden, sondern auch die Stadt der 1.000 vorübergehend
geschlossenen Dönerläden. &quot;Vorübergehend&quot;, weil Dönerläden &amp;ndash;
wie auch Pizzerien, Schawarmastände, Schnellbäckereien und der ganze
Rest &amp;ndash; in Berlin grundsätzlich nie final und endgültig
geschlossen werden, sondern immer nur &quot;renoviert&quot;.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Diese wunderbare Beobachtung stammt aus einem Artikel, der
interessanterweise &lt;a href=&quot;http://www.taz.de/!80619/&quot;&gt;die Dönerladen-Renovierungs-Taktik mit WikiLeaks
in Verbindung setzt&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Stimmt ja auch irgendwie. Kommt zwar viel rum auf dem Twitter-Feed von
Wikileaks, aber irgendwie nichts von Substanz, sondern nur ein
kontinuierlicher Linkdump über WL-Press-Coverage. Oh, und natürlich
immer wieder die Hinweise, dass das Geld nach wie vor eingefroren ist,
und Assange und Manning mehr oder weniger ohne Charges gehalten
werden, was natürlich abscheulich ist (besonders im Fall Manning).
Aber rumheulen bringt nichts, leider. &amp;ndash;&lt;/p&gt;

&lt;p&gt;Der Dönermann unten hat nun wieder Alkohol und eine Bar, wieder
Spielautomaten und keine Toiletten mehr (?!). Dafür kein &lt;a href=&quot;/2011-08/neuer-d%C3%B6nermann.html&quot;&gt;frisch
gebackenes Brot&lt;/a&gt; mehr. Schade.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Don't believe the hype...?</title>
    <link href="http://blog.plenz.com/2011-11/dont-believe-the-hype.html" />
    <updated>2011-11-11T20:13:00+01:00</updated>
    <id>http://blog.plenz.com/2011-11/dont-believe-the-hype</id>
    <content type="html">&lt;p&gt;A while ago a link to the following chart from &lt;a href=&quot;http://popcon.debian.org/&quot;&gt;Debian
Popcon&lt;/a&gt; appeared
&lt;a href=&quot;http://news.ycombinator.com/&quot;&gt;HN&lt;/a&gt;, claiming that &quot;Git is exploding&quot;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://qa.debian.org/popcon-graph.php?packages=subversion+git+mercurial+bazaar&amp;show_installed=on&amp;show_vote=on&amp;want_legend=on&amp;want_ticks=on&amp;from_date&amp;to_date&amp;hlght_date&amp;date_fmt=%25Y-%25m&amp;beenhere=1&quot;&gt;&lt;img src=&quot;img/git-hn.png&quot; width=&quot;500&quot; style=&quot;border:0;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I was pretty fascinated by the steep rise of Git's curve. Of course,
the statistics are not representative, but they resemble a good set of
somewhat typical Debian systems.&lt;/p&gt;

&lt;p&gt;Today, I somehow thought about the graph again &amp;ndash; and started
investigating. Take a look at this graph:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://qa.debian.org/popcon-graph.php?packages=git-core+git&amp;show_installed=on&amp;show_nofiles=on&amp;want_legend=on&amp;want_ticks=on&amp;from_date=2009-01-01&amp;to_date=2011-01-01&amp;hlght_date=&amp;date_fmt=%25Y-%25m&amp;beenhere=1&quot;&gt;&lt;img src=&quot;img/git-crit.png&quot; width=&quot;500&quot; style=&quot;border:0;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On April 1st, one of the Git package maintainers &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=users/jrnieder-guest/git.git;a=commitdiff;h=5aaa336bcafed93d643d263aa95301b833d7980e&quot;&gt;uploaded a commit
that changed Git's package name to &quot;git&quot; from
&quot;git-core&quot;&lt;/a&gt;.
In the graph above you can very well see the steep ascend of of the red
line (&quot;git installed&quot;), while at the same time a sudden drop of the
&quot;git no-files&quot; package occurs. Slowly, the purple &quot;git-core no-files&quot;
follows, indicating that APT replaced git-core with its dummy
package that only contains dependencies, no files.&lt;/p&gt;

&lt;p&gt;This doesn't explain why the red line's ascend is so steep; however,
there must be some relation the package's name change.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">touch screens</title>
    <link href="http://blog.plenz.com/2011-11/touch-screens.html" />
    <updated>2011-11-09T22:42:00+01:00</updated>
    <id>http://blog.plenz.com/2011-11/touch-screens</id>
    <content type="html">&lt;p&gt;I don't own a smart phone. Neither do I own an ebook reader. It's not
that I don't like the idea; I like it. It's just that the products
in that area still is in a very embryoinic state.&lt;/p&gt;

&lt;p&gt;Considering what an iPhone or the Kindle can do, that sound like a
pretty strange statement. But actually, it isn't. Let the technology
be really advanced &amp;ndash; if the user interface is no good, the
product is no good.&lt;/p&gt;

&lt;p&gt;And the current user interfaces are no good. As &lt;a href=&quot;http://worrydream.com/ABriefRantOnTheFutureOfInteractionDesign/&quot;&gt;this nice
article&lt;/a&gt;
points out really well, we are degraded to finger-swiping and tapping
motions at best. With my &lt;a href=&quot;http://blog.ashfame.com/wp-content/uploads/2008/07/nokia-5310-xpressmusic.jpg&quot;&gt;current
phone&lt;/a&gt;,
I can type an SMS without looking at the display; control the MP3
player without taking the phone out of my pocket; switch it to silent
without looking at it. &amp;ndash; The key point here is to &lt;em&gt;sense&lt;/em&gt;
things. Or, as the article concludes:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;With an entire body at your command, do you seriously think the
Future Of Interaction should be a single finger?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Side show, but the same principle applies: Keyboard vs. Mouse. Can you
actually &lt;em&gt;feel&lt;/em&gt; the corner of windows, buttons, etc.? &amp;ndash; I can't.
But I can sure feel whether I pressed a key. I can type without
looking at &lt;a href=&quot;http://www.daskeyboard.com/&quot;&gt;my keyboard&lt;/a&gt;, but I wouldn't
even care to touch the mouse without looking at the screen.&lt;/p&gt;

&lt;p&gt;The day we have smartphones that not only have &quot;force feedback&quot; but
real, tangible, tactile buttons and the illusion of touching a
non-flat, non-homogeneous surface, I'll buy one. Same goes for the
Kindle as soon as I can feel the edge of the paper and roll it like it
was a few pages of printout or a paperback.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">rss rant</title>
    <link href="http://blog.plenz.com/2011-10/rss-rant.html" />
    <updated>2011-10-30T14:41:00+01:00</updated>
    <id>http://blog.plenz.com/2011-10/rss-rant</id>
    <content type="html">&lt;p&gt;Rant Saturday! &lt;a href=&quot;http://feliciaday.com/blog/rss-rant&quot;&gt;Very good rant about sites un-implementing RSS feeds.&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">gnome is not aqua</title>
    <link href="http://blog.plenz.com/2011-10/gnome-is-not-aqua.html" />
    <updated>2011-10-30T13:51:00+01:00</updated>
    <id>http://blog.plenz.com/2011-10/gnome-is-not-aqua</id>
    <content type="html">&lt;p&gt;Dear GNOME team,&lt;/p&gt;

&lt;p&gt;I'd like to point out a fact to you: You are not, and should not compete with,
&lt;a href=&quot;http://en.wikipedia.org/wiki/Aqua_GUI&quot;&gt;Apple's Aqua GUI&lt;/a&gt;. There are
several reasons for that, but let me tell my story first.&lt;/p&gt;

&lt;p&gt;I installed Ubuntu 11.10 on a friend's laptop yesterday. The new Unity user
interface is somewhat unusable, of course. (Side rant: Unlike you
might think, quite many people out there have actual monitors, not
just tiny eeePC displays. Some even have computers that are more than
a few months old and lack the required processing power for stupid
eye-candy.) &amp;ndash; First thing to do: Install &lt;code&gt;gnome-shell&lt;/code&gt; and
select &quot;GNOME classic&quot; at the login screen. Second thing: Disable
startup sound.&lt;/p&gt;

&lt;p&gt;Enter $DEVELOPER, saying: &quot;Oh, fuck this shit. Everybody wants these
drum sounds at startup. So we'll make it hard to disable it.&quot; Guess
how you can do it: &lt;a href=&quot;http://maketecheasier.com/disable-login-sound-in-ubuntu-oneiric-quick-tips/2011/09/15&quot;&gt;Edit a somewhat buried file with root
privileges&lt;/a&gt;.
Try explaining that to your parents over the phone.&lt;/p&gt;

&lt;p&gt;At one point I realize: There is no &quot;Settings&quot; menu any more. There
just isn't. There are vague comments in some blogs this thing is
missing, but I can't find where they put it. That's what qualifies as
a &lt;em&gt;regression&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The &quot;System Settings&quot; have moved, too, and &lt;a href=&quot;http://blog.sudobits.com/wp-content/uploads/2011/09/system-settings-ubuntu1110.jpg&quot;&gt;looks like its OS X
counterpart&lt;/a&gt;.
Now if there's one thing Apple is really good at, it's making people
feel comfortable (or even elitist!) thinking &lt;em&gt;inside the box&lt;/em&gt; &amp;ndash;
by ways of designing a bearable user interface that hides complicated
stuff. Mostly, though, this means you can &lt;em&gt;only&lt;/em&gt; do what some
(possibly narrow-minded) developer intended.&lt;/p&gt;

&lt;p&gt;However, You, the GNOME team, are not good at it. Part of it is the
simple fact that there just happen to &lt;em&gt;exist&lt;/em&gt; tons of configuration
options. If you hide them &amp;ndash; and by hiding I mean: making it
unaccessable without using the shell and/or editing special files
&amp;ndash; you are &lt;em&gt;crippling&lt;/em&gt; the user.&lt;/p&gt;

&lt;p&gt;So, please, stop &quot;making things better&quot;. Or, if you do, on your way
please don't destroy the perfectly running classig GUI in order to
&quot;improve&quot; it. You are not Apple. You will never be Apple. The Aqua
design sucks, too, but they never had a lot of configuration options
in the first place. The Gnome Shell had.&lt;/p&gt;

&lt;p&gt;Thank you.&lt;/p&gt;

&lt;p&gt;P.S.: I don't use Desktop Environments myself, so I might have got
some terminology wrong. But the fact alone I cannot find ways to
configure stuff in two hour's time should tell tales.&lt;/p&gt;

&lt;p&gt;P.P.S.: Bad decision: &lt;a href=&quot;http://petermoulding.com/sites/default/files/ubuntu_11.4_gnome_scroll_bar_overlay.png&quot;&gt;The scrollbars.&lt;/a&gt;
Try teaching a person over age 60 (or below five) to use the 5px-wide scrool bar to
make pop up an additional small scrollbar &lt;em&gt;outside&lt;/em&gt; the window that
actually enables scrolling the window contents. Again: not all people
have a scroll wheel in their mouse. At least provide an easy settings
dialog to disable this behaviour.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I'm &lt;a href=&quot;http://bytebaker.com/2011/10/19/ubuntu-should-zig-to-apples-zag/&quot;&gt;not
alone&lt;/a&gt;,
even &lt;a href=&quot;http://esr.ibiblio.org/?p=3822&quot;&gt;esr&lt;/a&gt; made that point a while
ago.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Yardsale</title>
    <link href="http://blog.plenz.com/2011-10/yardsale.html" />
    <updated>2011-10-25T22:14:00+02:00</updated>
    <id>http://blog.plenz.com/2011-10/yardsale</id>
    <content type="html">&lt;p&gt;Mein guter Freund Valentin zieht in die Schweiz &amp;ndash; und verkauft
alles, was er nicht mitnehmen kann. (Das scheint mir, abgesehen von
Computer, Büchern, Kleidung und Zahnbürste, fast alles zu sein.)&lt;/p&gt;

&lt;p&gt;Wenn ihr also an günstigem, gebrauchten Hausrat oder auch an einem
großartigen DJ-Set interessiert seid, solltet ihr bei &lt;a href=&quot;http://haenel.co/yardsale/&quot;&gt;seinem
Yardsale&lt;/a&gt; vorbei schauen. Ich habe auch
schon zwei Sachen gekauft. Die schwarzen Klappstühle werden wunderbar
in die Küche passen, sobald sie erst einmal gestrichen ist. ;-)&lt;/p&gt;

&lt;p&gt;Übrigens: Das ist der erste Geek-kompatible Yard-Sale, den ich gesehen
habe. Die Seite ist autogeneriertes HTML, dessen Markdown-Quellen &lt;a href=&quot;https://github.com/esc/myyardsale&quot;&gt;auf
Github&lt;/a&gt; verwaltet werden.
Entsprechend kann man anhand der Commits
(&lt;a href=&quot;https://github.com/esc/myyardsale/commits/master.atom&quot;&gt;Atom-Feed&lt;/a&gt;)
verfolgen, was so verkauft wird.&lt;/p&gt;

&lt;p&gt;Zum Schluss ein Pro-Tip: Man muss nicht per E-Mail kaufen. Einfach das
Repo auf Github forken, den entsprechenden Artikel in den Sold-Bereich
verschieben, &lt;code&gt;git add -u&lt;/code&gt;, committen, und Valentin schreiben. &amp;ndash;
&lt;strong&gt;Oder wer von euch kann von sich sagen, er habe schon mal per
Pull-Request eingekauft?!&lt;/strong&gt; &amp;ndash; Na eben.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">great stuff</title>
    <link href="http://blog.plenz.com/2011-10/great-stuff.html" />
    <updated>2011-10-25T21:21:00+02:00</updated>
    <id>http://blog.plenz.com/2011-10/great-stuff</id>
    <content type="html">&lt;p&gt;I took a look at &lt;a href=&quot;http://cheezpictureisunrelated.files.wordpress.com/2011/10/wtf-photos-videos-what-is-this-madness.gif&quot;&gt;this animated gif&lt;/a&gt; and couldn't really figure out what it was and how it happened. But now I know you can &lt;a href=&quot;http://www.instructables.com/id/Cobra-Weave-Exploding-Stick-Bomb/&quot;&gt;create&lt;/a&gt; such a cool thing &amp;ndash; called &lt;em&gt;Cobra Weave Exploding Stick Bomb&lt;/em&gt; -- on your own, or watch &lt;a href=&quot;http://www.viralviralvideos.com/2011/06/09/domino-style-stick-explosion-by-kinect-king-americas-got-talent/&quot;&gt;professionals do that&lt;/a&gt;. Amazing.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">twitter search</title>
    <link href="http://blog.plenz.com/2011-10/twitter-search.html" />
    <updated>2011-10-18T21:42:00+02:00</updated>
    <id>http://blog.plenz.com/2011-10/twitter-search</id>
    <content type="html">&lt;p&gt;I don't have a twitter account. But in certain cases, I follow people
or events using the Twitter web site or RSS feeds. Because, luckily,
Twitter provides usable RSS feeds, although I'm pretty sure they don't
advocate or event document it.&lt;/p&gt;

&lt;p&gt;Simply use a URL like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=USERNAME
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But, seriously, you'd want to allow people to search for stuff, right?
To become interested and later immersed in Twitter.&lt;/p&gt;

&lt;p&gt;So evey time I want to look up a hash tag, I go to &lt;code&gt;twitter.com&lt;/code&gt; and
duh &amp;ndash; there is no search form. You can only sign in or sign up.
&lt;strong&gt;No search form.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not even is there a &lt;em&gt;link&lt;/em&gt; to a search form. How hard would that be?
My workaround is to go to &lt;code&gt;twitter.com/a&lt;/code&gt; &amp;ndash; the timeline of
certain @a, of whom I don't know who he is, but &quot;a&quot; is comfortable
letter to type &amp;ndash; and there it is, at the top of the screen: a
search box.&lt;/p&gt;

&lt;p&gt;Seriously? &amp;ndash; Can it be that hard?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Three people approached me with different ideas/URL of how
to find the search form. The most mnmonically convenient seems to be
&lt;a href=&quot;http://search.twitter.com/&quot;&gt;search.twitter.com&lt;/a&gt;, though there is a
&lt;a href=&quot;http://mobile.twitter.com/searches&quot;&gt;javascript-free mobile version&lt;/a&gt;,
too. Consequently, I added a form to &lt;a href=&quot;http://q.plenz.com/&quot;&gt;my general-purpose search
page&lt;/a&gt;. (Thanks for the hints to: Skudo,
&lt;a href=&quot;http://www.neureich-bimbeshausen.de/&quot;&gt;Julian&lt;/a&gt; and
&lt;a href=&quot;http://chneukirchen.org/&quot;&gt;Chris&lt;/a&gt;.)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">spam ratio</title>
    <link href="http://blog.plenz.com/2011-10/spam-ratio.html" />
    <updated>2011-10-13T11:24:00+02:00</updated>
    <id>http://blog.plenz.com/2011-10/spam-ratio</id>
    <content type="html">&lt;p&gt;How much spam do you get? &amp;ndash; I have a feeling I get more than I
deserver. So I checked my spm ratio, i.e. the number of (recognized)
spam mails divided my the number of total mails (as far as the
procmail log spans, which is some 270,000 mails).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ echo $(fgrep -c 'Subject: *****SPAM*****' Mail/from) / \
    $(fgrep -c 'Subject: ' Mail/from) | bc
.952154
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now this is gross. Only less than five percent of the mail I receive
might be of interest to me. :-(&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">gc via cron on hosted git repos</title>
    <link href="http://blog.plenz.com/2011-10/gc-via-cron-on-hosted-git-repos.html" />
    <updated>2011-10-12T22:43:00+02:00</updated>
    <id>http://blog.plenz.com/2011-10/gc-via-cron-on-hosted-git-repos</id>
    <content type="html">&lt;p&gt;If you host Git repositories, you might want to implement a cron job
that automatically triggers garbage collection on the server side.
As a regular user you can't usually access the unreachable objects
anyway, so there's no point to keep them.&lt;/p&gt;

&lt;p&gt;However, when invoking &lt;code&gt;git gc&lt;/code&gt;, Git will pack loose objects together.
This has a huge advantage: When a user clones a whole repository, Git
will compress all objects within a single packfile and transfer it via
the Git protocol. If all the objects are already in one packfile,
there's no overhead in creating a temporary packfile. (If you just
want to get a subset of commits, it's easier for git to &quot;thin out&quot; the
existing packfile, too.)&lt;/p&gt;

&lt;p&gt;You can usually see if a computationally expensive temporary packfile
is created if there is a message like &lt;code&gt;remote: counting objects ...&lt;/code&gt;
that keeps on counting for a while. For some hosters, this takes quite
some time, because the server is under high load.&lt;/p&gt;

&lt;p&gt;I use the following script to trigger &lt;code&gt;git gc&lt;/code&gt; every night:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/sh

BASE=/var/git/repositories

su - git -c &quot;
cd $BASE
find . -name '*.git' -type d | while read repo; do
    cd $BASE/\$repo &amp;amp;&amp;amp; git gc &amp;gt;/dev/null 2&amp;gt;&amp;amp;1
done
&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You might want to omit the &lt;code&gt;su&lt;/code&gt; part if you create a script that's
executable by the owner of your git repositories itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; If you don't use &lt;a href=&quot;http://hjemli.net/git/cgit/tree/cgitrc.5.txt#n36&quot;&gt;cgit's age
files&lt;/a&gt;, you'll have all your
repos displaying they were recently changed in the &quot;idle&quot; column. To work
around this, include the following command adter the &lt;code&gt;git gc&lt;/code&gt; call:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;mkdir -p info/web &amp;amp;&amp;amp;
git for-each-ref \
    --sort=-committerdate \
    --format='%(committerdate:iso8601)' \
    --count=1 'refs/heads/*' \
    &amp;gt; info/web/last-modified
&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">svn 1.7</title>
    <link href="http://blog.plenz.com/2011-10/svn-17.html" />
    <updated>2011-10-12T02:21:00+02:00</updated>
    <id>http://blog.plenz.com/2011-10/svn-17</id>
    <content type="html">&lt;p&gt;I feel I have a pretty good understanding of Git. Before I came
accustomed to it around the end of 2009, however, I had never
extensively used version control.&lt;/p&gt;

&lt;p&gt;Sure, I used RCS for simple projects; I played around with CVS and
bought a book about it; in 2007 I became somewhat accustomed to
Mercurial, because the &lt;a href=&quot;http://suckless.org/&quot;&gt;suckless&lt;/a&gt; and
&lt;a href=&quot;http://grml.org/&quot;&gt;grml&lt;/a&gt; projects used them at the time.&lt;/p&gt;

&lt;p&gt;All the time I happened to use Subversion, also for coordinating the
work on the &lt;a href=&quot;https://www.opensourcepress.de/index.php?26&amp;amp;backPID=178&amp;amp;tt_products=198&quot;&gt;book about Z
shell&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;RCS was simple, but was not at all suitable for collaboration. I
thought CVS and Subversion were, alas I never really understood how
they worked. As in: why they worked, what was good practice, why you
just couldn't seem to run it locally (without client-server
architecture).&lt;/p&gt;

&lt;p&gt;I happened to just read the &lt;a href=&quot;http://subversion.apache.org/docs/release-notes/1.7.html&quot;&gt;release notes of the new subversion
1.7&lt;/a&gt;. And,
reading the notes, I realize it wasn't me not being attentive or being
plain stupid, it's just the interface as well as repository design
that was totally messed up. For example:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Subversion 1.7 features a new subcommand called svn patch which
can apply patch files in unidiff format (as produced by svn diff
and other diff tools) to a working copy.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I mean &amp;ndash; what?! This must be such a basic thing &amp;ndash;
receiving patches via a mailing list and trying to apply them, right?
But apparently, there was no need for that since 2000...?&lt;/p&gt;

&lt;p&gt;Or consider this great improvement of adding a &lt;code&gt;--diff&lt;/code&gt; switch:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;svn log can now print diffs&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Oh, right. Diffs. In an SCM. Right. Might be of some use.&lt;/p&gt;

&lt;p&gt;I'm glad I don't have to use plain SVN any more.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">pictures in pictures</title>
    <link href="http://blog.plenz.com/2011-10/pictures-in-pictures.html" />
    <updated>2011-10-06T22:07:00+02:00</updated>
    <id>http://blog.plenz.com/2011-10/pictures-in-pictures</id>
    <content type="html">&lt;p&gt;While browsing I saw &lt;a href=&quot;http://i.imgur.com/M631m.jpg&quot;&gt;this one&lt;/a&gt; today:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/math_imgur.jpg&quot; alt=&quot;MATH - When you absolutely, positively want to piss someone off&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you look closely, someone calculates the check to be worth $536.49,
which is of course wrong. (It's $0.002.) So I set out with the GIMP to
draw a riposte:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/zero.jpg&quot; title=&quot;ZERO - e^{i\pi}+\sum_{n=1}^\infty \frac{1}{2^n} is just a clever way to write it&quot; /&gt;&lt;/p&gt;

&lt;p&gt;By the way, these are called &lt;a href=&quot;http://www.dailydemotivators.com/&quot;&gt;demotivator pictures&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">mail server switchover</title>
    <link href="http://blog.plenz.com/2011-10/mail-server-switchover.html" />
    <updated>2011-10-03T21:43:00+02:00</updated>
    <id>http://blog.plenz.com/2011-10/mail-server-switchover</id>
    <content type="html">&lt;p&gt;Today I migrated the last big part of my old server: the mail system.
Since I and other people depend on this server for their day-to-day
mailing, I had to switch over without losing a single e-mail. This is
how I did it:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step one:&lt;/strong&gt; Port the configuration, make the environment run on the
new server. Copy also user metadata like passwords and make sure the
overall structure is working (incoming SMTP works, POP3 access, etc.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step two:&lt;/strong&gt; Copy over all mails from the old server. The mails will be
synced later on again, so this can happen some minutes in advance. (I
actually lost a few days doing this, because I discovered unused
mailboxes with 995,000 mails, &amp;gt;99% of them being spam. I had to ask
the owner first, though, whether I could delete them.)&lt;/p&gt;

&lt;p&gt;Now comes the time-critical path. It took me an overall
70 seconds to do steps three to five.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step three:&lt;/strong&gt; Stop the daemons that receive mail or give the user
access to it. For example: &lt;code&gt;for s in postfix courier*; do
/etc/init.d/$s stop; done&lt;/code&gt; &amp;ndash; connecting to the host will now
give a &quot;connection refused&quot; error message. MTAs trying to deliver mail
will usually try again ten minutes later. (So no mail gets lost.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step four:&lt;/strong&gt; Sync the emails again. There might have arrived new
messages, or users have deleted some of their inbox. I used this
command: &lt;code&gt;rsync -avhP --delete vmail@eris.feh.name: .&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step five:&lt;/strong&gt; Apply iptables rules to forward connections to the new
server. This is due to the fact that DNS information is slow to
spread. For a few days I don't care whether &lt;code&gt;mail.feh.name&lt;/code&gt; resolves
to 88.198.158.101 or to 176.9.247.89. Both will effectively talk to
the new server.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;iptables -t nat -A PREROUTING -p tcp -s ! 176.9.34.52 --dport 25 \
  -j DNAT --to-destination 176.9.34.52:25
iptables -t nat -A PREROUTING -p tcp -s ! 176.9.34.52 --dport 110 \
  -j DNAT --to-destination 176.9.34.52:110
iptables -t nat -A POSTROUTING -d 176.9.34.52 -j MASQUERADE
iptables -A FORWARD -p tcp -d 176.9.34.52 -j ACCEPT
iptables -A FORWARD -p tcp -s 176.9.34.52 -j ACCEPT
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So this establishes forwarding for SMTP and POP3. The old server will
simply act as a NATing gateway to the new server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step six:&lt;/strong&gt; Adjust the DNS. As said above, you can take your time for
this; but the information will eventually spread. To have an indicator of
how many connections still arrive at the old host, try &lt;code&gt;iptables -t
nat -L -vn&lt;/code&gt;, it'll print packet and byte counts for each rule in the
NAT table.&lt;/p&gt;

&lt;p&gt;Done! And just one minute of outage. *like*&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">git and the unix philosophy</title>
    <link href="http://blog.plenz.com/2011-10/git-and-the-unix-philosophy.html" />
    <updated>2011-10-03T18:56:00+02:00</updated>
    <id>http://blog.plenz.com/2011-10/git-and-the-unix-philosophy</id>
    <content type="html">&lt;p&gt;Good, but slightly older article: &lt;a href=&quot;http://teddziuba.com/2010/08/too-smart-for-git.html&quot;&gt;Too Smart for Git&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Git follows Linux's philosophy of refusing to protect you from yourself.
Much like Linux, Git will sit back and watch you fuck your shit right up,
and then laugh at you as you try to get your world back to a state where up
is up and down is down. As far as source control goes, not a lot of people
are used to this kind of free love.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;His conclusion holds true for many other programs also:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;The problem isn't that Git is to hard, it's that smart developers are
impatient and have exactly zero tolerance for unexpected behavior in their
tools.&lt;/p&gt;&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">dead code easter egg</title>
    <link href="http://blog.plenz.com/2011-10/dead-code-easter-egg.html" />
    <updated>2011-10-02T19:57:00+02:00</updated>
    <id>http://blog.plenz.com/2011-10/dead-code-easter-egg</id>
    <content type="html">&lt;p&gt;I was just researching on how the file format of the &lt;code&gt;xt_recent&lt;/code&gt; module works.
That's where I found this nice easter egg: &lt;a href=&quot;http://lxr.free-electrons.com/source/net/netfilter/xt_recent.c?a=powerpc#L499&quot;&gt;instead of writing down the size of
an IPv6
address plus one&lt;/a&gt;,
they simply used a dummy string &lt;code&gt;+b335:1d35:1e55:dead:c0de:1715:5afe:c0de&quot;&lt;/code&gt;, reading &quot;beesides less dead code it is safe code&quot;.
Hehe.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Sudan und die EAU</title>
    <link href="http://blog.plenz.com/2011-09/sudan-und-die-eau.html" />
    <updated>2011-09-29T03:35:00+02:00</updated>
    <id>http://blog.plenz.com/2011-09/sudan-und-die-eau</id>
    <content type="html">&lt;p&gt;Interessant. &lt;a href=&quot;http://www.sudantribune.com/Turn-down-Khartoum-request-for,40259&quot;&gt;Der Sudan hat um Mitgliedschaft in der East African Union
gebeten.&lt;/a&gt;
Interessant, weil der Sudan sich die letzten paar Jahrzehnte nicht im
geringsten darum gekümmert hat, jetzt aber nicht mal mehr eine direkte
Grenze mit dem nördlichsten Mitglied, Kenia, hat &amp;ndash; und weil der
Sudan damit dem abtrünnigen Südsudan &lt;em&gt;zuvorkommt&lt;/em&gt; &amp;ndash; die haben
nämlich noch nicht um eine Mitgliedschaft gebeten, obwohl sie
ein vornehmlich christliches Land sind, direkte Grenzen zu
EAU-Mitgliedern haben und den wirtschaftlichen Vorteil dringender
brauchen. Spannend.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">migrating domains</title>
    <link href="http://blog.plenz.com/2011-09/migrating-domains.html" />
    <updated>2011-09-27T21:23:00+02:00</updated>
    <id>http://blog.plenz.com/2011-09/migrating-domains</id>
    <content type="html">&lt;p&gt;Today, I migrated all my domains to the new server. While at it, I set
up a mirror of my blog repository at
&lt;a href=&quot;http://git.plenz.com/blog/&quot;&gt;http://git.plenz.com/blog/&lt;/a&gt;. You could
view the pure markdown files there, or see how I messed around with
Jekyll stuff.&lt;/p&gt;

&lt;p&gt;The sync is called from a &lt;code&gt;post-receive&lt;/code&gt; hook with the command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;env GIT_SSH=`pwd`/hooks/blogpush git push -f git@git.plenz.com:blog master
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;... where &lt;code&gt;blogpush&lt;/code&gt; is just a little wrapper to make SSH use the
public key that has access to the repository:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/sh
ssh -o ControlMaster=no -i /home/feh/blog.git/hooks/fehblog $@
&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">gitolite and interpolated paths</title>
    <link href="http://blog.plenz.com/2011-09/gitolite-and-interpolated-paths.html" />
    <updated>2011-09-25T23:04:00+02:00</updated>
    <id>http://blog.plenz.com/2011-09/gitolite-and-interpolated-paths</id>
    <content type="html">&lt;p&gt;The Git daemon supports a feature called &lt;em&gt;Interpolated Path&lt;/em&gt;. For
example, my Git daemon is called like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git-daemon --user=git --group=git \
    --listen=0.0.0.0 --reuseaddr \
    --interpolated-path=/var/git/repositories/%IP%D \
    /var/git/repositories
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;What it does is it translates the request for a git repository before
actually searching for it. When I do a &lt;code&gt;git clone
git://git.plenz.com/configs.git&lt;/code&gt; what actually happens is that the Git
daemon will deliver the repository at
&lt;code&gt;/var/git/repository/176.9.247.89/configs.git&lt;/code&gt;. That is especially
nice in environments where you share one git daemon for several
people/projects and have sufficient IP addresses.&lt;/p&gt;

&lt;p&gt;However, &lt;a href=&quot;https://github.com/sitaramc/gitolite&quot;&gt;Gitolite&lt;/a&gt; doesn't seem
to have a config option for this. Now what I did was patch Gitolite so
that it'll prepend the repository name with the IP of the network
interface the call came through.&lt;/p&gt;

&lt;p&gt;This information is available from the &lt;code&gt;SSH_CONNECTION&lt;/code&gt; environment variable.&lt;/p&gt;

&lt;p&gt;(The patch to &lt;code&gt;gl-compile-conf&lt;/code&gt; is needed so that Gitolite will create a
&lt;code&gt;projects.list&lt;/code&gt; per virtual host. That way, you can use different
configuration files for each CGit instance, according to your VHost.)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;diff --git a/src/gl-auth-command b/src/gl-auth-command
index 61b2f5a..a8d1976 100755
--- a/src/gl-auth-command
+++ b/src/gl-auth-command
@@ -124,6 +124,12 @@ unless ( $verb and ( $verb eq 'git-init' or $verb =~ $R_COMMANDS or $verb =~ $W_
     exit 0;
 }

+# prepend host's ip address
+# SSH_CONNECTION looks like this: 92.225.139.246 41714 176.9.34.52 22
+#                                 from-ip        port  to-ip       port
+my $connected_via = (split &quot; &quot; =&amp;gt; $ENV{&quot;SSH_CONNECTION&quot;})[2] // &quot;&quot;;
+$repo = $connected_via . &quot;/&quot; . $repo;
+
 # some final sanity checks
 die &quot;$repo ends with a slash; I don't like that\n&quot; if $repo =~ /\/$/;
 die &quot;$repo has two consecutive periods; I don't like that\n&quot; if $repo =~ /\.\./;
diff --git a/src/gl-compile-conf b/src/gl-compile-conf
index 2d4110f..6f8f0d7 100755
--- a/src/gl-compile-conf
+++ b/src/gl-compile-conf
@@ -577,6 +577,22 @@ unless ($GL_NO_DAEMON_NO_GITWEB) {
     }
     close $projlist_fh;
     rename &quot;$PROJECTS_LIST.$$&quot;, $PROJECTS_LIST;
+
+    # vhost stuff
+    my %vhost = ();
+    for my $proj (sort keys %projlist) {
+        my ($ip, $repo) = split '/' =&amp;gt; $proj =&amp;gt; 2;
+        $vhost{$ip} //= [];
+        push @{$vhost{$ip}} =&amp;gt; $repo;
+    }
+    for my $v (keys %vhost) {
+        my $v_file = &quot;$REPO_BASE/$v/projects.list&quot;;
+        my $v_fh = wrap_open( &quot;&amp;gt;&quot;, $v_file . &quot;.$$&quot;);
+        print $v_fh $_ . &quot;\n&quot; for @{$vhost{$v}};
+        close $v_fh;
+        rename $v_file . &quot;.$$&quot; =&amp;gt; $v_file;
+    }
 }

 # ----------------------------------------------------------------------------
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With this patch applied, I can &lt;code&gt;git push git.plenz.com:config.git&lt;/code&gt;
and it will end up pushing to &lt;code&gt;176.9.247.89/configs.git&lt;/code&gt;, fully transparent
to the user.&lt;/p&gt;

&lt;p&gt;N.B.: This strictly is a &quot;works for me&quot; solution. It's not very clean
&amp;ndash; but I don't plan on properly implementing a config setting. As
I said, it works for me. ;-)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">cgit and setuid</title>
    <link href="http://blog.plenz.com/2011-09/cgit-and-setuid.html" />
    <updated>2011-09-25T22:26:00+02:00</updated>
    <id>http://blog.plenz.com/2011-09/cgit-and-setuid</id>
    <content type="html">&lt;p&gt;I'm still in the process of setting up my new server. Today, I
migrated the Git repositories. I wanted a more secure setup, that is I
don't want my web server to be able to read the repositories. (It
spawns CGit, which has to read them somehow.)&lt;/p&gt;

&lt;p&gt;So I created all repositories below &lt;code&gt;/var/git/repositories&lt;/code&gt;, such that
they are only readable by the system user &quot;git&quot;.&lt;/p&gt;

&lt;p&gt;However, that presents a problem to the CGit CGI: It cannot access the
repositories any more. My first approach was: Just &lt;code&gt;chown git.git
/usr/lib/cgi-bin/cgit.cgi&lt;/code&gt; and set the setuid bit on it.&lt;/p&gt;

&lt;p&gt;But, alas, that will only make the CGit binary run with &lt;em&gt;effective&lt;/em&gt;
user ID &quot;git&quot;. What's needed to actually access the files is a &lt;em&gt;real&lt;/em&gt;
user ID &quot;git&quot;.&lt;/p&gt;

&lt;p&gt;The only way to set the real user ID is to call &lt;code&gt;setuid()&lt;/code&gt; with
effective root privileges. So I created a wrapper that&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;searches for git's user ID&lt;/li&gt;
&lt;li&gt;&lt;code&gt;setuid()&lt;/code&gt;s to that ID (real an effective)&lt;/li&gt;
&lt;li&gt;executes the actual CGit CGI&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;That's what I came up with:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; #include &amp;lt;unistd.h&amp;gt;
 #include &amp;lt;sys/types.h&amp;gt;
 #include &amp;lt;pwd.h&amp;gt;
 #include &amp;lt;string.h&amp;gt;

int main(int argc, char *argv[])
{
    struct passwd *p;
    uid_t git_uid = 0;

    while((p = getpwent()) != NULL) {
        if(strcmp(p-&amp;gt;pw_name, &quot;git&quot;))
            continue;
        /* got user &quot;git&quot; */
        git_uid = p-&amp;gt;pw_uid;
    }

    endpwent();

    if(!git_uid)
        return 1;

    setuid(git_uid);
    execv(&quot;/usr/lib/cgi-bin/cgit.cgi&quot;, argv);

    return 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Provide it with a Makefile... (beware, use &lt;em&gt;real&lt;/em&gt; tabs!)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;default:
        gcc -Wall -o cgit-as-git.cgi cgit-as-git.c

install:
        install -o root -g root -m 4755 cgit-as-git.cgi /usr/lib/cgi-bin
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;... and change the Lighttpd configuration accordingly:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$HTTP[&quot;host&quot;] == &quot;git.plenz.com&quot; {
    setenv.add-environment += ( &quot;CGIT_CONFIG&quot; =&amp;gt; &quot;/etc/cgit/plenz.com.conf&quot; )
    alias.url = (
        &quot;/cgit.css&quot; =&amp;gt; &quot;/usr/share/cgit/cgit.css&quot;,
        &quot;/cgit.png&quot; =&amp;gt; &quot;/usr/share/cgit/cgit.png&quot;,
        &quot;/cgit.cgi&quot; =&amp;gt; &quot;/usr/lib/cgi-bin/cgit-as-git.cgi&quot;,
        &quot;/&quot;         =&amp;gt; &quot;/usr/lib/cgi-bin/cgit-as-git.cgi&quot;,
    )
    cgi.assign = ( &quot;.cgi&quot; =&amp;gt; &quot;&quot; )
    url.rewrite-once = (
        &quot;^/cgit\.(css|png)&quot; =&amp;gt; &quot;$0&quot;,
        &quot;^/.+&quot; =&amp;gt; &quot;/cgit.cgi$0&quot; 
    )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Done! Lighttpd can now call CGit as if it was a &quot;usual&quot; binary, but it
will get wrapped and get the real and effective user ID of the
system's user &quot;git&quot;.&lt;/p&gt;

&lt;p&gt;N.B.: If you want to use the wrapper as well, you might want to change
the (hard coded) user name &quot;git&quot; and the binary (see &lt;code&gt;execv&lt;/code&gt; call).&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Domain-Verkaufs-Taktiken</title>
    <link href="http://blog.plenz.com/2011-09/domain-verkaufs-taktiken.html" />
    <updated>2011-09-24T13:48:00+02:00</updated>
    <id>http://blog.plenz.com/2011-09/domain-verkaufs-taktiken</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;http://guckes.net&quot;&gt;Sven&lt;/a&gt; wies mich gerade auf die Domain
&lt;a href=&quot;http://zsh24.de&quot;&gt;zsh24.de&lt;/a&gt; hin. Da gibt's diverse Links zu
Ebay-Angeboten des &lt;a href=&quot;http://zshbuch.org&quot;&gt;Zsh-Buchs&lt;/a&gt;, aber auch Links,
um alte, abgeknipste Dresdner Fahrkarten (deren Ebay-Angebotsname
&quot;Zsh&quot; enthält) zu kaufen.&lt;/p&gt;

&lt;p&gt;Teilweise kann man wirklich denken, das Blog sei &lt;em&gt;nicht&lt;/em&gt; automatisiert
erstellt: Im Artikel &lt;a href=&quot;http://www.zsh24.de/2011/09/08/tolle-zsh-bilder/&quot;&gt;Tolle Zsh
Bilder&lt;/a&gt; sind
automatisiert Bilder zusammengetragen &amp;ndash; wohlgemerkt &lt;em&gt;mit&lt;/em&gt;
entsprechender Verlinkung und Hinweisen, woher sie kommen! Also nicht
dumm.&lt;/p&gt;

&lt;p&gt;Wer macht sowas? &amp;ndash; Ein Domainregistrar, der statt
Platzhalterseiten noch ein bisschen durch Prämien verdienen will.
&amp;ndash; Mal schauen... das &lt;a href=&quot;http://www.zsh24.de/impressum/&quot;&gt;Impressum&lt;/a&gt;
sagt ja schon, wer verantwortlich ist. Also: tiefer graben.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;zsh24.de&lt;/code&gt; zeigt auf die IP &lt;code&gt;46.4.212.70&lt;/code&gt;, die im &lt;a href=&quot;http://wiki.hetzner.de/index.php/Rechenzentren_und_Anbindung&quot;&gt;neuen RZ
13&lt;/a&gt; von
&lt;a href=&quot;http://hetzner.de&quot;&gt;Hetzner&lt;/a&gt; steht. Typischerweise sind ja mehrere
Domains auf eine IP gemappt.&lt;/p&gt;

&lt;p&gt;Hier eine Auswahl der Domains, die auch auf &lt;code&gt;46.4.212.70&lt;/code&gt; zeigen:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;markenpositionierung.eu&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;organisation24.de&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;meisterbüro.eu&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rundumerneuerung.de&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;boot-fuehrerschein.de&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;genetiv.de&lt;/code&gt; (lol)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;regress.at&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Die Domains sind absichtlich nicht verlinkt, weil die Leute wohl noch
nicht so SEO-begabt sind (keine Verlinkung untereinander) und ich
ihnen da nicht noch extra Aufschwung geben will.&lt;/p&gt;

&lt;p&gt;Lustig auch zu sehen, wie simpel teilweise nach Schlagwörtern gesucht
wird, wie zum Beispiel &lt;a href=&quot;http://www.enthaltungen.de/2011/08/31/rt-piratenkoeln-zum-2-vorsitzenden-wurde-thomas_heg-mit-13-stimmen-1-enthaltungen-gewahlt-nimmt-die-wahl-an-piraten-kptk/&quot;&gt;hier auf
enthaltungen.de&lt;/a&gt;,
wo ein Tweet der kölner Piraten über ein Abstimmungsergebnis verwendet
wird.&lt;/p&gt;

&lt;p&gt;Was mich ja doch ein wenig schockt ist allerdings die ebenfalls auf
obige IP-Adresse zeigende Domain &lt;code&gt;tätervolk.de&lt;/code&gt; &amp;ndash; die Leute, die
solche Worte verwenden, kann man doch immer sehr schnell einordnen.
Und so kommt es auch, dass diese die &lt;em&gt;einzige&lt;/em&gt; Domain ist, auf der
jemand tatsächlich einen der automatisierten Posts &lt;em&gt;kommentiert&lt;/em&gt;! Ja:
&lt;em&gt;kommentiert&lt;/em&gt;! Und nicht nur ein Verwirrter, nein: In den Posts von
&quot;Stahlgewitter&quot;-Liedern (srsly!?!) gibt es einmal 22 und einmal 25
Kommentare. Ich werde das nicht verlinken hier.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://images.cheezburger.com/completestore/2011/2/23/fd226b4f-66d3-4e10-bc10-c8b9308ad483.jpg&quot;&gt;Y U SO STUPID?!&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">software design</title>
    <link href="http://blog.plenz.com/2011-09/software-design.html" />
    <updated>2011-09-21T01:26:00+02:00</updated>
    <id>http://blog.plenz.com/2011-09/software-design</id>
    <content type="html">&lt;p&gt;I'm in the process of setting up a new server. I struggled for some
minutes now with the follwing strange behaviour: Lighttpd is very
picky (and not at all verbose) about &lt;em&gt;when&lt;/em&gt; you use
&lt;code&gt;alias.url&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;As an actual example, look at these two blocks:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$HTTP[&quot;host&quot;] == &quot;HOST&quot; {
  alias.url += (&quot;/munin&quot; =&amp;gt; &quot;/var/www/munin&quot;)
}

$SERVER[&quot;socket&quot;] == &quot;:443&quot; {
  $HTTP[&quot;host&quot;] == &quot;HOST&quot; {
    alias.url += (&quot;/wiki&quot; =&amp;gt; &quot;/usr/share/dokuwiki&quot;,)
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now I, the innocent user, would expect the following to happen:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Munin is available via HTTP and HTTPS via &lt;code&gt;/munin&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The Wiki is available only via HTTPS at &lt;code&gt;/wiki&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;But, alas, nope. It's quite different. The wiki is available alright
if called &lt;em&gt;before&lt;/em&gt; the munin part, and vice versa. The other one will be a 404,
though. To make things work I actually have to &lt;em&gt;double&lt;/em&gt; the alias part for
munin &amp;ndash; once outside the part that matches for SSL and once inside.&lt;/p&gt;

&lt;p&gt;Oh, and don't confuse &lt;code&gt;==&lt;/code&gt; and &lt;code&gt;=~&lt;/code&gt; &amp;ndash; even
if both match, the exact match wins. (Meaning you cannot put the line
in a condition like &lt;code&gt;=~ &quot;:(443|80)&quot;&lt;/code&gt;.) So there's no real
cascading or so. Bad design in my opinion, but &lt;a href=&quot;http://redmine.lighttpd.net/issues/show/1427&quot;&gt;it
seems&lt;/a&gt; to be
&lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=445459&quot;&gt;intentional&lt;/a&gt;. WTF?&lt;/p&gt;

&lt;p&gt;Correct solution:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$HTTP[&quot;host&quot;] == &quot;HOST&quot; {
  alias.url += (&quot;/munin&quot; =&amp;gt; &quot;/var/www/munin&quot;)
}

$SERVER[&quot;socket&quot;] == &quot;:443&quot; {
  $HTTP[&quot;host&quot;] == &quot;HOST&quot; {
    alias.url += (&quot;/munin&quot; =&amp;gt; &quot;/var/www/munin&quot;)
  }
}

$SERVER[&quot;socket&quot;] == &quot;:443&quot; {
  $HTTP[&quot;host&quot;] == &quot;HOST&quot; {
    alias.url += (&quot;/wiki&quot; =&amp;gt; &quot;/usr/share/dokuwiki&quot;,)
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Holy crap. Explain that to someone unfamiliar with how difficult it is
to implement data structures in C. &amp;ndash; They'd just call you
a moron for not implementing a more intuitive aproach. &amp;ndash; Wait, I
do, too!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">&quot;Wir leben noch frei, aber nicht mehr lange&quot;</title>
    <link href="http://blog.plenz.com/2011-09/wir-leben-noch-frei-aber-nicht-mehr-lange.html" />
    <updated>2011-09-14T17:34:00+02:00</updated>
    <id>http://blog.plenz.com/2011-09/wir-leben-noch-frei-aber-nicht-mehr-lange</id>
    <content type="html">&lt;p&gt;Frank Rieger &lt;a href=&quot;https://www.faz.net/artikel/C31315/ueberwachung-wir-leben-noch-frei-aber-nicht-mehr-lange-30685243.html&quot;&gt;bringt es auf den Punkt&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Sich darauf zu verlassen, dass in Zeiten von Finanzmarktzusammenbrüchen,
aufbrechenden sozialen Verwerfungen und kommenden Ressourcenkrisen die
Mittel, die unter dem Banner der Terrorismusbekämpfung geschaffen wurden,
zurückhaltend und wohlüberlegt zum Einsatz gebracht werden, ist etwas für
naive Staatsgläubige, nicht für mündige Bürger.&lt;/p&gt;&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Na ein Glück!</title>
    <link href="http://blog.plenz.com/2011-09/na-ein-gl%C3%BCck.html" />
    <updated>2011-09-11T19:11:00+02:00</updated>
    <id>http://blog.plenz.com/2011-09/na-ein-glück</id>
    <content type="html">&lt;p&gt;Puh, na da habe ich ja ein Glück gehabt! Da gab's einen &lt;a href=&quot;http://www.taz.de/!77772/&quot;&gt;super fiesen
Terroranschlag in Berlin&lt;/a&gt;, der aber gerade
noch so vereitelt wurde. Zum Glück war ich die Woche im Urlaub! m(&lt;/p&gt;

&lt;p&gt;Zyniker könnten nun meinen, dass man schon vorher hätte wissen können,
dass &quot;etwas&quot; am Donnerstag passieren würde: Das Wochenende 10./11.
September inkl. Gedenktag eignet sich nicht, weil a) Sommerloch und b)
Wochenende, und wer will da (neuen) Terror haben. &amp;ndash;
Kommender Montag wäre auch schlecht weil a) &lt;em&gt;nach&lt;/em&gt; 9/11 und b)
zeitlich zu knapp vor den Wahlen, es sollte schon ein Wochenende
zwischen Terror und Wahl liegen, auch um das einsinken zu lassen.
&amp;ndash; Zynische Zyniker könnten nun allerdings einwenden, dass &quot;es&quot;
ja schon Mittwoch hätte passieren können. Hm.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Git User's Survey</title>
    <link href="http://blog.plenz.com/2011-09/git-users-survey.html" />
    <updated>2011-09-05T17:34:00+02:00</updated>
    <id>http://blog.plenz.com/2011-09/git-users-survey</id>
    <content type="html">&lt;p&gt;The &lt;a href=&quot;http://tinyurl.com/GitSurvey2011&quot;&gt;Git User's Survey&lt;/a&gt; is up from
now until the beginning of october. Take part!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Bookdump</title>
    <link href="http://blog.plenz.com/2011-09/bookdump.html" />
    <updated>2011-09-04T15:55:00+02:00</updated>
    <id>http://blog.plenz.com/2011-09/bookdump</id>
    <content type="html">&lt;p&gt;... was ich so im August gelesen habe, neben &lt;a href=&quot;http://blog.plenz.com/2011-08/suarez-daemon-und-freedom.html&quot;&gt;den beiden
Suarez-Romanen&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Robert Cialdini: Influence, The Psychology of Persuasion&lt;/strong&gt;,
empfohlen bei &lt;a href=&quot;http://alternativlos.org/8/&quot;&gt;Alternativlos 8&lt;/a&gt;, ein
Klassiker für Vermarkter. Viele interessante Prinzpien, die
u.a. Werbestrategien zugrunde liegen werden anhand guter Beispiele
erklärt. &amp;ndash;
&lt;strong&gt;Janne Teller: Nichts&lt;/strong&gt;, dessen deutsche Übersetzung erst jetzt, zehn
Jahre nach der dänischen Erstveröffentlichung, erschienen ist.
Zwar als Jugendroman gedacht, ist es auch für Ältere nett, auf
einfache, praktische Weise über den im Buch dargestellten Nihilismus
und dessen Gegner und Gegenargumente zu reflektieren. Zeitweise war
das Buch an &lt;a href=&quot;http://de.wikipedia.org/wiki/Nichts_(Roman)#Rezeption&quot;&gt;dänischen Schulen verboten&lt;/a&gt; &amp;ndash;
&lt;strong&gt;D. Johnson: Afrika vor dem großen Sprung&lt;/strong&gt;, Auf knapp über 100
Seiten gibt der Autor des
&lt;a href=&quot;http://blogs.taz.de/kongo-echo/&quot;&gt;Kongo-Echos&lt;/a&gt; seine Einschätzung zur
Zukunft Afrikas zum besten. Während ich manche seiner Voraussagen doch
sehr optimistisch finde, ergibt sich nach dem Lesen insgesamt ein
guter Überblick über aktuelle Probleme, aber vor allem auch Chancen
Afrikas. &amp;ndash;
&lt;strong&gt;Bret Easton Ellis: The Rules of Attraction&lt;/strong&gt;, lustig, wahr, um
Längen besser als der gleichnamige Film zum Buch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dave Eggers: Weit gegangen&lt;/strong&gt;, ist ein Buch über den Sudanesen &lt;em&gt;Achak
Deng&lt;/em&gt;, der seit seiner frühesten Kindheit zunächst innerhalb des
heutigen Südsudan, später in Äthiopien und im Norden Kenias auf der
Flucht war bzw. später in Flüchtlingslagern lebte. Knapp 800 Seiten
stark ist die Geschichte, die erzählt wird; und doch kann man das Buch
locker in zwei Tagen lesen, weil es so leicht und spannend zugleich
geschrieben ist. Leseempfehlung!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ayn Rand: Atlas Shrugged&lt;/strong&gt;, habe ich heute morgen fertig gelesen.
&lt;a href=&quot;http://www.amazon.de/dp/0451191145&quot;&gt;Meine Ausgabe&lt;/a&gt; ist knapp 1100
Seiten lang, allerdings bei 8-Punkt-Schrift, ohne nennenswerten Rand,
schlecht gedruckt und gebunden. Aber immerhin, sechs Euro... &amp;ndash;
Ich war auf das Buch aufmerksam geworden durch den ersten Teil der
Dokumentationsserie &lt;em&gt;All Watched Over by Machines of Loving Grace&lt;/em&gt;,
der im Wesentlichen Ayn Rand und die Implikationen ihrer Philosophie
beleuchtet. Ohne viel nachzudenken habe ich mir das Buch bei Amazon
geklickt, weil ich dachte, dass es bei dem Preis sicherlich nur eine
kleine Broschüre wäre... Falsch gedacht. &amp;ndash; Das Buch ist im
wahrsten Sinne atemberaubend. Kein Kapitel ist unnötig, es fällt
leicht, das Buch in einem Rutsch zu lesen. &lt;a href=&quot;http://en.wikipedia.org/wiki/Atlas_Shrugged#Reception&quot;&gt;Die Rezeption des
Buches&lt;/a&gt; spricht
für sich. Manche Leute würden den Inhalt als &quot;die absoulte Wahrheit&quot;
bezeichnen, Andere nur als &quot;Kapitalismus-Geschwafel&quot;. Egal was man
darüber denkt, das Buch polarisiert und regt zum Nachdenken an.
&amp;ndash; Das Buch stellt den Kampf zwischen einem unfair und
uneffizient implementierten Sozialismus vs.
Laissez-faire-Kapitalismus dar, oder einfacher gesagt, den Kampf zwischen
&lt;em&gt;Ich brauche&lt;/em&gt; vs. &lt;em&gt;Ich kann&lt;/em&gt;. Rand ist eine Verfechterin
rationaler Entscheidungen: dadurch werden die Gegenüberstellungen
verschiedener Gedankenschulen im Buch leider immer schwarz-weiß
dargestellt. Doch gibt es viele Elemente, die äußerst lehrreich sind:
Das ständige &lt;em&gt;I couldn't help it&lt;/em&gt; und &lt;em&gt;Who am I to blame?&lt;/em&gt; gibt es
genau so heute. Marode öffentliche Infrastruktur haben wir heutzutage
noch viel mehr als früher (unter dem Deckmantel der Privatisierung,
was aber in Rands Augen genau dem &lt;em&gt;Reiten, bis der Gaul tot ist&lt;/em&gt;
entspricht). Die &lt;em&gt;voluntary compliance&lt;/em&gt; als maskierter Zwang. &amp;ndash;
An einigen Stellen scheinen meiner Meinung nach deutlich Nietzschesche
Tendenzen durch: sowohl die Ideen, als auch die Form (vgl. John Galts
Radioansprache und Zarathustras Reden). NB: Viele Rand-Anhänger
behaupten, dass Rand schon zu Zeiten von &lt;em&gt;The Fountainhead&lt;/em&gt; komplett
mit der Philosophie Neitzsches gebrochen hatte. &amp;ndash;
Was auch immer dieses Buch nun für den Einzelnen bedeutet: Es ist
unbedingt lesenswert, nicht nur ob der Tatsache, dass es auch
wesentlich diejenigen beeinflusst hat, die uns beeinflussen (&lt;a href=&quot;http://en.wikipedia.org/wiki/Alan_Greenspan#Objectivism&quot;&gt;siehe
auch&lt;/a&gt;).&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">cryptome RSS feed suspended</title>
    <link href="http://blog.plenz.com/2011-09/cryptome-rss-feed-suspended.html" />
    <updated>2011-09-02T17:27:00+02:00</updated>
    <id>http://blog.plenz.com/2011-09/cryptome-rss-feed-suspended</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;http://cryptome.org/cryptome.xml&quot;&gt;Great&lt;/a&gt;. :-(&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;25 August 2011: Due to unceasing abuse by clouds (now the worst offenders),
bots, siphons, aggregators, search engines, and other data thieves the Cryptome
RSS feed has been suspended.&lt;/p&gt;&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">debugging a zsh completion function</title>
    <link href="http://blog.plenz.com/2011-09/debugging-a-zsh-completion-function.html" />
    <updated>2011-09-01T23:27:00+02:00</updated>
    <id>http://blog.plenz.com/2011-09/debugging-a-zsh-completion-function</id>
    <content type="html">&lt;p&gt;There's a Perl module &lt;code&gt;threads::shared&lt;/code&gt;. However, it won't show up as a
completion match to the &lt;code&gt;perldoc&lt;/code&gt; command. Why is that?, a colleague
asked me. Now, that obviously is a quirk, so let's debug it.&lt;/p&gt;

&lt;p&gt;We start at &lt;code&gt;/usr/share/zsh/functions/Completion/Unix/_perldoc&lt;/code&gt;, where
we find this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;_alternative \
    'modules:module: _perl_modules -tP' \
    'pods:base pod: _perl_basepods' \
    'files:module or .pod file:_files -g &quot;*.(pod|pm)(-.)&quot;' &amp;amp;&amp;amp;
    ret=0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So, go on to &lt;code&gt;_perl_modules&lt;/code&gt;: It searches for paths where Perl would
store modules and their documentation (line 85):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;inc=( $( $perl -e 'print &quot;@INC&quot;' ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then, they do some complicated globbing stuff on the directories (line
104), where a loop iterates over &lt;code&gt;$inc&lt;/code&gt; and stores each element in
&lt;code&gt;$libdir&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;new_pms=( $libdir/{[A-Z]*/***/,}*${~sufpat}~*blib* )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;There's the catch: This globbing expression will only recurse into
subdirectories that start with an &lt;em&gt;uppercase&lt;/em&gt; letter. Lowercase
modules on the highest level are okay, though. That's why &lt;code&gt;threads&lt;/code&gt;
appears (from &lt;code&gt;threads.pm&lt;/code&gt;), but &lt;code&gt;threads::shared&lt;/code&gt; doesn't (from
&lt;code&gt;threads/shared.pm&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;The search for all modules that are missed this way will translate to
the following Z-Shell command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ print -l ${^=$(perl -e 'print &quot;@INC&quot;')}/[a-z]*/***/*.pm(.N)
/usr/lib/perl/5.10/threads/shared.pm
/usr/share/perl/5.10/encoding/warnings.pm
/usr/share/perl/5.10/warnings/register.pm
&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">&quot;temporary password&quot;?</title>
    <link href="http://blog.plenz.com/2011-09/temporary-password.html" />
    <updated>2011-09-01T23:15:00+02:00</updated>
    <id>http://blog.plenz.com/2011-09/temporary-password</id>
    <content type="html">&lt;p&gt;Die halbe Netzgemeinde spricht über {Wiki,Open}Leaks und die
&quot;gekränkten Egos&quot;, &lt;em&gt;ex_wl_arch&lt;/em&gt; trollt großartig. Über die Datei mit
allen Cables wird heiß diskutiert und mit dem Finger gezeigt.&lt;/p&gt;

&lt;p&gt;Was ich mich aber doch frage: Warum berichten selbst (in meinen Augen
technisch versierte) Blogger von einem &quot;temporären Passwort&quot;? Dass
Assange die Datei irgendwo &quot;temporär&quot; abgelegt und vergessen hat ist
ja nur menschlich. &amp;ndash;
Aber wie man ein &quot;temporäres Passwort&quot; mit kryptographischen Tools,
die vermutlich Open Source sind, und auf Commodity-Hardware
realisiert: Das ist mir ein Rätsel.&lt;/p&gt;

&lt;p&gt;Mir fallen ein Dutzend symmetrische und asymmetrische Verfahren ein
&amp;ndash; aber keines, dass eine Zeitkomponente in nichtmanipulierbarer
Weise mit einbezieht.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; &quot;temporary password&quot;, &lt;a href=&quot;http://nigelparry.com/news/guardian-david-leigh-cablegate.shtml&quot;&gt;my
ass&lt;/a&gt;. GnuPG
und 7-Zip. Alles klar.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">tmux line continuation patch</title>
    <link href="http://blog.plenz.com/2011-08/tmux-line-continuation-patch.html" />
    <updated>2011-08-25T19:58:00+02:00</updated>
    <id>http://blog.plenz.com/2011-08/tmux-line-continuation-patch</id>
    <content type="html">&lt;p&gt;Yay! My &lt;a href=&quot;http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/tmux/cfg.c.diff?r1=1.12;r2=1.13&quot;&gt;patch to tmux&lt;/a&gt;
was &lt;a href=&quot;http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/tmux/cfg.c?only_with_tag=HEAD&quot;&gt;accepted yesterday&lt;/a&gt;. With it, tmux now supports &lt;code&gt;\&lt;/code&gt; as a line continuation character.
Thus, you can put statements like this in your config:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bind P run-shell \
  &quot;tmux set-b $(tmux sa - | curl -F 'sprunge=&amp;lt;-' http://sprunge.us) &amp;amp;&amp;amp; \
  tmux display-message 'sprunge: upload sucessful!'&quot;
&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">dist-upgrade gnah</title>
    <link href="http://blog.plenz.com/2011-08/dist-upgrade-gnah.html" />
    <updated>2011-08-24T09:07:00+02:00</updated>
    <id>http://blog.plenz.com/2011-08/dist-upgrade-gnah</id>
    <content type="html">&lt;p&gt;I'm not sure why, but AFAIR I've never done a &lt;code&gt;dist-upgrade&lt;/code&gt; that was
entirely successful. That is true to my Debian system at home as well
as to various other Ubuntu systems I've laid hands on.&lt;/p&gt;

&lt;p&gt;My Debian system was a mix of stable and testing packages, and somehow
&lt;code&gt;aptitude&lt;/code&gt; came to a point where it'd just not be able to resolve some
dependencies, meaning I could not install nor remove any new packages.
So I opted for a &lt;code&gt;dist-upgrade&lt;/code&gt; to Testing. Here's how it went, roughly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Everything installs fine, until &lt;code&gt;aptitude&lt;/code&gt; tries installing &lt;code&gt;libc&lt;/code&gt;,
where the installation process will go into a deadlock. Error
message and solution is posted
&lt;a href=&quot;http://www.facepunch.com/threads/1116926-Error-when-trying-to-dist-upgrade&quot;&gt;here&lt;/a&gt;
(yes, you have to manually patch a Perl module). &lt;code&gt;linux-base&lt;/code&gt; has
the same problem.&lt;/li&gt;
&lt;li&gt;System is left in a half-upgraded state, but &lt;code&gt;aptitude&lt;/code&gt; won't do any
further upgrading. &lt;code&gt;apt-get dist-upgrade&lt;/code&gt; continues, though.&lt;/li&gt;
&lt;li&gt;Reboot because of new kernel.&lt;/li&gt;
&lt;li&gt;Sound is all gone. &lt;code&gt;pcspkr&lt;/code&gt; module is appearently now called
&lt;code&gt;snd_pcsp&lt;/code&gt; and is thus loaded, strangely overriding all other sound
drivers. I blacklist it manually, reboot.&lt;/li&gt;
&lt;li&gt;Seems to work. Now install the new package I did all the upgrading
for... right. There's still some 500 upgrades left to do! Ok, now...&lt;/li&gt;
&lt;li&gt;Upgrade aborts with a problem: &lt;code&gt;libcaca0&lt;/code&gt; wants to overwrite
a file which is also present in &lt;code&gt;libcucul0&lt;/code&gt;. Purging &lt;code&gt;libcucul0&lt;/code&gt;
will reinstall &lt;code&gt;libcaca0&lt;/code&gt;, which in turn will fail. Turn to manual
override and uninstall all packages &lt;code&gt;libcaca*&lt;/code&gt; and &lt;code&gt;libcucul*&lt;/code&gt; using
&lt;code&gt;dpkg&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Upgrade runs through fine. I go to sleep.&lt;/li&gt;
&lt;li&gt;Today, I power up the computer. &lt;em&gt;Alt+Enter&lt;/em&gt; to start a
terminal &amp;ndash; duh, nothing happens. Start an &lt;code&gt;xterm&lt;/code&gt;. Inspect the
situation: &lt;code&gt;rxvt&lt;/code&gt; and &lt;code&gt;rxvt-unicode&lt;/code&gt; are missing. Well, thanks, so
here I go, &lt;code&gt;aptitude install rxvt&lt;/code&gt;. But guess what: &lt;code&gt;apt-get&lt;/code&gt;
uninstalled &lt;code&gt;aptitude&lt;/code&gt;! Yeah, great.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;apt-get install rxvt-unicode&lt;/code&gt;, finally a decent terminal. Fire up
mplayer. It's not installed any more. Like, what?!&lt;/li&gt;
&lt;li&gt;Install &lt;code&gt;mplayer&lt;/code&gt;, start it on a file. No sound. After various
tries, a pattern &lt;strike&gt;evolves&lt;/strike&gt;&lt;ins&gt;dissolves&lt;/ins&gt;:
Sometimes it just won't play (like muted), sometime's there's an
error message of various audio drivers. &lt;code&gt;aplay&lt;/code&gt; works just fine.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mplayer -ao alsa&lt;/code&gt; works. Put it into the config. Happy now with
music.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Now, what I ask myself: Manually patching a Perl module, manually
resolving dependencies and invoking &lt;code&gt;dpkg&lt;/code&gt;, being (momentarily)
deprived of the few programs I use on a daily basis ... how will this
packaging system ever be &lt;em&gt;remotely&lt;/em&gt; feasible for someone who's not an
expert of sorts and well-versed in debugging in a Unix wold?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Some crap program said it depended on DECnet
stuff. After a reboot, this caused the MAC addresses of &lt;em&gt;all&lt;/em&gt; my
interfaces (yes, both wireless and wired!) to be the same, i.e.:
&lt;strong&gt;aa:00:04:00:0a:04&lt;/strong&gt;. Solution is removing &lt;code&gt;libdnet*&lt;/code&gt;
and &lt;code&gt;dnet-common&lt;/code&gt;. &amp;ndash; You kidding me?!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Suarez: Daemon und Freedom</title>
    <link href="http://blog.plenz.com/2011-08/suarez-daemon-und-freedom.html" />
    <updated>2011-08-22T23:57:00+02:00</updated>
    <id>http://blog.plenz.com/2011-08/suarez-daemon-und-freedom</id>
    <content type="html">&lt;p&gt;Ich habe den besseren Teil des Wochenendes damit verbracht,
Daniel Suarez' &lt;strong&gt;Daemon&lt;/strong&gt; und dessen Nachfolger
&lt;strong&gt;Freedom&amp;trade;&lt;/strong&gt; zu lesen (auf deutsch
&lt;strong&gt;Darknet&lt;/strong&gt;). Aufmerksam geworden war ich auf die Bücher
über &lt;a href=&quot;http://www.faz.net/artikel/C30833/gespraech-mit-daniel-suarez-wir-werden-mit-system-erobert-30335671.html&quot;&gt;dieses Interview von Frank Rieger mit dem Autor&lt;/a&gt;
&amp;ndash; sehr, sehr lesenswert.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/daemon-freedom.jpg&quot; alt=&quot;Daemon and Freedom(TM) Cover&quot;
style=&quot;width: 100%&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Das Buch ist auf mehreren Ebenen faszinierend. Zunächst ist es kaum
aus der Hand zu legen; es ist leicht geschrieben, voller Spannung,
wechselnder Erzählperspektiven, verständlicher Dialoge, kleiner
Nebenbei-Geschichten. Dennoch ist Suarez kein großer Literat. Gerade
zum Ende der beiden Bücher kommen Wörter wie &lt;em&gt;perimeter&lt;/em&gt; und
&lt;em&gt;operative&lt;/em&gt; gefühlt auf jeder Seite mehrfach vor.&lt;/p&gt;

&lt;p&gt;Ich lese wenig bis gar kein Science Fiction. So wie &lt;em&gt;Matrix&lt;/em&gt;
oder &lt;em&gt;Password Swordfish&lt;/em&gt; zwar nette Filme waren &amp;ndash; jedem,
der sich ein bisschen mit Computern auskennt, graut es davor, zu
sehen, wie Computer dargestellt werden. &amp;ndash; Ganz anders in den
Romanen: Hier kommen auch Kenner auf ihre Kosten. Das fängt an bei
Kapiteln die &lt;em&gt;Pwned&lt;/em&gt; oder &lt;em&gt;Epic Failure&lt;/em&gt; heißen, und
geht bis hin zu Hackern, die wirklich hacken: Kein &quot;er tippte wild vor
sich hin&quot; um ein WLAN zu knacken &amp;ndash; der Protagonist sitzt in
seinem Auto mit Laptop, sieht ein WPA-Netzwerk, und snifft via einer
Deauth-Attacke die WPA-Handshakes, und wartet dreieinhalb Stunden
darauf, bis sein Rechner die Keys aus diesen errechnet hat. Wie man
halt ein WLAN knackt. Weitere Details, die den kenntnisrechen Leser
erfreuen werden, sind eine (ausgeschriebene!) SQL-Injection-Attacke,
ein SNMP-Buffer-Overflow in alten OpenBSD-Versionen sowie ein schlecht
konfigurierter Nameserver, der AXFR erlaubt. &amp;ndash; Kurz: Ein Autor,
der seine Hausaufgaben gemacht hat. So auch Frank Rieger in dem
Interview:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Vieles, was Sie beschreiben, ist wirklich technisch
möglich, es finden sich praktisch keine Fehler in Ihrem Buch.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Untergründig werden immer wieder gesellschaftliche Misstände, die wir
nur allzugern im täglichen Leben ausblenden, eingestreut. Das ist zum
einen die Fast-Allmacht der Hochfinanz und die ständig steigende
Effizienz von Produktionszyklen zu Lasten der Diversität und damit der
Robustheit. Ein nicht unwesentlicher Teil im ersten Band thematisiert
auch das (gerade in den USA besonders bedeutende) Thema der
Privatisierung von Gefängnissen: moderner, inländischer Sklaverei.
Nicht zuletzt wird häufig auf &lt;em&gt;Economic Hitmen&lt;/em&gt; und deren
Dienste zum Aufstieg der globalen Wirtschaftsmacht USA hingewiesen; im
Literatur-Anhang wird auch John Perkins' Buch &lt;em&gt;Confessions of an
Economic Hitman&lt;/em&gt; referenziert, dass ich mehrmals gelesen habe, und
das sehr zu empfehlen ist.&lt;/p&gt;

&lt;p&gt;Suarez dazu im Interview:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Aber es läuft etwas sehr schief, wenn die häufigste Quelle großen
Reichtums heute darauf beruht, dass man im Finanzsystem zockt,
Mittelschichtjobs vernichtet und keinerlei materiellen Wert erschafft.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Was das Buch so spannent macht, ist, dass die Technik, um eine wie
dort beschriebene Welt zu erschaffen, prinizpiell schon da ist. Das
ist aber auf den ersten Blick nicht ersichtlich. &lt;a href=&quot;http://homerstravels.com/2010/08/book-daniel-suarezs-daemon.html&quot;&gt;Diese
Review&lt;/a&gt; beispielsweise meint:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;The [logic decision] tree necessary to handle the daemon would be
astronomically complex and I don't think any one, no matter how many
resources they had, could put such a thing together.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Doch das ist ein Fehlschluss. In der Angangsphase &amp;ndash; man könnte
es auch Bootstrapping nennen &amp;ndash; waren sicherlich gewisse Elemente
im Entscheidungsbaum hart codiert (Auswahl des Polizisten z.B.). Aber
jeder, der einmal probiert hat, eine AI für ein Spiel zu
programmieren, weiß: Man wird nie alle Fälle abdecken. Und selbst für
die wenigen &quot;offensichtlichen&quot; Fälle ist die Logik schon unglaublich
komplex. &amp;ndash; Der Schlüssel des ganzen liegt natürlich im
Maschinellen Lernen und Crowdsourcing.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Suarez:&lt;/em&gt; In seiner ursprünglichen, noch nicht in die Crowd
ausgelagerten Verkörperung verfügte der Daemon über eine kurze Liste
von Zielen: erstens Unternehmensnetzwerke infizieren; zweitens
menschliche Gefolgsleute finden (unter Verwendung von
Konsumentendaten und sozialen Netzwerken); und drittens die
Aktivitäten der menschlichen Gefolgsleute nutzen, um Aufgaben
auszuführen.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Diese menschlichen Gefolgsleute aber sind es gerade, die den weiteren
Entscheidungsbaum (wenn man ihn denn so nennen will) nachhaltig
gestalten. Sie geben (als Gemeinde) die Ziele vor, die zu erreichen
sind, und &quot;upvoten&quot; die Gedankenströmungen und Menschen, denen sie
zustimmen. &amp;ndash; Und dass eine simples &quot;like&quot; oder &quot;don't like&quot; bei
genügend Ausgangsmaterial eine relativ eindeutige Signatur
hinterlässt, das kennen wir schon jetzt: Das ist &quot;Die folgenden
Kunden kauften auch...&quot; bei Amazon; die Lieder- und Videovorschläge in
diversen Multimedia-Plattformen; die richtigen und ausführlichen
Antworten bei StackOverflow ganz oben.&lt;/p&gt;

&lt;p&gt;Das Schlüsselkonzept hinter dem gesamten Darknet ist Aggregation. Auch
heute &lt;em&gt;haben&lt;/em&gt; wir all diese Daten schon, aber wir können sie
(zumindest als Privaterson) nur unzureichen aggregieren. Doch dass das
möglich ist, zeigt sich in Ansätzen: Da muss man nur mal einen Namen
bei Personensuchmaschinen eingeben, und schon erhält man die
veröffentlichten Artikel, MP3s, Blogposts, Facebook-Account,
Amazon-Wunschzettel, E-Mail-Adressen, ... &amp;ndash; Die Daten sind alle
da. Insofern erscheint die geradezu utopische (bzw. dystopische)
Aggregation, Filterung und Aufbereitung der Daten, wie sie in den
Romanen dargestellt wird, gar nicht mehr so unwahrscheinlich, wenn man
nur bedenkt, dass es ein System ist, an dem eher Zehntausende denn
Tausende Leute mitprogrammiert haben &amp;ndash; und dass eine Menge Geld
darein investiert wurde.&lt;/p&gt;

&lt;p&gt;Ein Manko hat die Erzählung allerdings: Sie ist viel zu sehr
Amerika-zentriert. Zwar wird ganz peripher Europa erwähnt, und einige
wenige Szenen spielen auch im Ausland. Doch prinzipiell sind es im
Wesentlichen die amerikanischen Dienste, und später die amerikanische
Bevölkerung, die sich mit dem Daemon auseinandersetzt.&lt;/p&gt;

&lt;p&gt;Alles in Allem liefern die Bücher eine Meneg Stoff zum Nachdenken, und
einige simple, aber äußerst wichtige Wahrheiten.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Suarez:&lt;/em&gt; Die Natur bestraft einzelne Fehlschläge, weil ein
gewisses Maß an Fehlschlägen unvermeidlich ist. Wir sollten daher in
erster Linie zu vermeiden versuchen, dass Fehlschläge sich
kaskadenförmig ausbreiten, und unsere Fähigkeit verbessern, uns von
solchen Fehlschlägen rasch zu erholen.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Dringende Leseempfehlung.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Englischunterricht</title>
    <link href="http://blog.plenz.com/2011-08/englischunterricht.html" />
    <updated>2011-08-12T21:09:00+02:00</updated>
    <id>http://blog.plenz.com/2011-08/englischunterricht</id>
    <content type="html">&lt;p&gt;Irgendwie kann ich das Bild hier zu 100% unterschreiben:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://28.media.tumblr.com/tumblr_lprx6sjX8D1qi18zqo1_500.jpg&quot;
alt=&quot;Englischunterricht erklärt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Ich habe halt immer &quot;heimlich&quot; eigene englische Bücher gelesen, und
das hat sich entsprechend auf meine Note ausgewirkt. Und Arthur
Millers Stücke finde ich immer noch nicht interessant.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">URL shortener</title>
    <link href="http://blog.plenz.com/2011-08/url-shortener.html" />
    <updated>2011-08-07T21:01:00+02:00</updated>
    <id>http://blog.plenz.com/2011-08/url-shortener</id>
    <content type="html">&lt;p&gt;The bit.ly service requires some sort of registration or an API
key for some time now. I used to use it in shell scripts to automate
shortening of links.&lt;/p&gt;

&lt;p&gt;Similar to the &lt;a href=&quot;http://blog.plenz.com/2011-07/sprunge-the-fine-pastebin-service.html&quot;&gt;sprunge pastebin service&lt;/a&gt;, there's come up a new,
easy-to-understand URL shortening service called &lt;a href=&quot;https://github.com/akrennmair/gnzkrz&quot;&gt;&lt;strong&gt;gnzkrz&lt;/strong&gt;&lt;/a&gt;
(short for German &quot;ganz kurz&quot;, &quot;very short&quot;). And with it's &lt;a href=&quot;https://github.com/akrennmair/gnzkrz/commit/e479171f94ea49f154c3d799ac086aa8638bb898&quot;&gt;latest
commit&lt;/a&gt;, it acquired a simple API. I use it as such:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/sh
URL=`xclip -o`
SHORT=`wget -qO- &quot;http://krzz.de/_api/save?url=$URL&quot;`
(echo -n $SHORT | xclip -i -display :0 -loops 0 ) &amp;amp;
/home/feh/bin/notify-wrapper &quot;krzz.de: switched URL in clipboard&quot; &quot;$SHORT&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now I simply bind a hotkey to call this program, and it will exchange
the URL from my X clipboard with a shortened version.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Kredibilität einer Telefonnummer</title>
    <link href="http://blog.plenz.com/2011-08/kredibilit%C3%A4t-einer-telefonnummer.html" />
    <updated>2011-08-05T20:15:00+02:00</updated>
    <id>http://blog.plenz.com/2011-08/kredibilität-einer-telefonnummer</id>
    <content type="html">&lt;p&gt;Eben habe ich einen Anruf von einer unbekannten Nummer erhalten, bin
rangegangen, Stille am anderen Ende &amp;ndash; dann wurde aufgelegt. So
wie's aussieht ist das &lt;a href=&quot;http://www.tellows.de/num/01771271371&quot;&gt;bei dieser Nummer
bekannt&lt;/a&gt; und es gibt sechs(!)
entsprechende Kommentare dazu.&lt;/p&gt;

&lt;p&gt;Die angepriesene Lösung besteht darin, sich bei einer
&quot;Vermittlungsorganisation&quot; anzumelden und deren Telefonnummer
anzugeben. Die berechnen jeden eingehenden Anruf saftig und fragen
erst nach, ob man denjenigen (im Zweifel Werber) sprechen möchte
&amp;ndash; soweit ich die AGB überblicken konnte, werden aber die
persönlichen angegebenen Daten nicht weiter veröffentlicht.&lt;/p&gt;

&lt;p&gt;Was es alles gibt.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">statically linking dwm against X11 and XCB</title>
    <link href="http://blog.plenz.com/2011-08/statically-linking-dwm-against-x11-and-xcb.html" />
    <updated>2011-08-05T01:55:00+02:00</updated>
    <id>http://blog.plenz.com/2011-08/statically-linking-dwm-against-x11-and-xcb</id>
    <content type="html">&lt;p&gt;Today, virtually all binaries used on linux systems are dynamically
linked to several libraries. While it is commonly accepted statically
linking applications is &lt;em&gt;bad&lt;/em&gt; &amp;ndash; most notably in terms of
security concerns: fixing a library's bug means you won't have to
recompile all applications that are using that special library,
they'll simply load the version available at run-time &amp;ndash; there
are in fact good reasons to use static linking. (And for those who
claim statically linked binaries occupy much disk space: yeah, sure.
As if a few megs compared to a few hundred kilobytes make that much a
difference today, plus you don't have the overhead of looking up and
loading the libs in the first place.)&lt;/p&gt;

&lt;p&gt;As I mentioned in &lt;a href=&quot;http://blog.plenz.com/2011-07/switching-screen-for-tmux.html&quot;&gt;my post about tmux&lt;/a&gt; already, there's a
huge advantage to static linking: you can compile bleeding edge
software with bleeding edge library functions and still use them on
reasonably outdated systems (think: Debian stable).&lt;/p&gt;

&lt;p&gt;One division of rapidly evolving software I could never successfully link
statically was window managers like &lt;a href=&quot;http://dwm.suckless.org/&quot;&gt;dwm&lt;/a&gt; or &lt;a href=&quot;http://awesome.naquadah.org/&quot;&gt;awesome&lt;/a&gt;.
However, especially considering the XCB development and adoption over
the past few years, to me it makes perfect sense. I'll just distribute
a copy of the window manager I use to different systems and have a
guarantee it'll work there, no matter the libxcb version (or if it's
available at all).&lt;/p&gt;

&lt;p&gt;Usually, however, it's not possible to just pass a &lt;code&gt;-static&lt;/code&gt; or
&lt;code&gt;-Wl,-Bstatic&lt;/code&gt; flag to the compiler (in my case, gcc). It'll fail to
find several symbols that are located in libraries that don't have to
be explicitly linked in. Such an error message might look like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/usr/lib/libXinerama.a(Xinerama.o): In function `find_display':
(.text+0x89): undefined reference to `XextCreateExtension'
/usr/lib/libXinerama.a(Xinerama.o): In function `XineramaQueryScreens':
(.text+0x255): undefined reference to `XMissingExtension'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To find the appropriate library, you &lt;a href=&quot;http://stackoverflow.com/questions/3932742/static-library-auto-discovery-and-linking&quot;&gt;may try to use pkg-config&lt;/a&gt;.
I use a different approach, however. I have a shell function defined
called &lt;code&gt;findsym&lt;/code&gt; (beware, Z-Shell specialties apply):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;findsym () {
  [[ -z $1 ]] &amp;amp;&amp;amp; return 1
  SYMBOL=$1
  LIBDIR=${2:-/usr/lib}
  for lib in $LIBDIR/*.a
  do
    nm $lib &amp;amp;&amp;gt; /dev/null | grep -q $SYMBOL &amp;amp;&amp;amp; \
      print &quot;symbol found in $lib\n -L$LIBDIR -l${${lib:t:r}#lib}&quot;
  done
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Thus, I can simply go looking for the missing &lt;code&gt;XMissingExtension&lt;/code&gt;
symbol like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ findsym XMissingExtension
symbol found in /usr/lib/libXext.a
 -L/usr/lib -lXext
symbol found in /usr/lib/libXi.a
 -L/usr/lib -lXi
symbol found in /usr/lib/libXinerama.a
 -L/usr/lib -lXinerama
symbol found in /usr/lib/libXrandr.a
 -L/usr/lib -lXrandr
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, I use the readme file, some common sense or symple try'n'error to
find out which library I'd best link in, too. In this case, it's
adding a simple &lt;code&gt;-lXext&lt;/code&gt; to the &lt;code&gt;LDFLAGS&lt;/code&gt; part.&lt;/p&gt;

&lt;p&gt;Thus, I come up with the following diff to dwm's &lt;code&gt;config.mk&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;--- a/config.mk
+++ b/config.mk
@@ -16,7 +16,7 @@ XINERAMAFLAGS = -DXINERAMA

 # includes and libs
 INCS = -I. -I/usr/include -I${X11INC}
-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS}
+LIBS = -L/usr/lib -L${X11LIB} -static -lX11 ${XINERAMALIBS} -lxcb -lXau -lXext -lXdmcp -lpthread -ldl

 # flags
 CPPFLAGS = -DVERSION=\&quot;${VERSION}\&quot; ${XINERAMAFLAGS}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;There's one important point here: libX11 will (to me, it seems,
inevitably) load another library, not sure why or which one. Thus, it
is vitally important to statically link in &lt;code&gt;libdl&lt;/code&gt;, the library that
dynamically loads another library. Otherwise, the follwing error
messages appear:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/usr/lib/libX11.a(CrGlCur.o): In function `open_library':
(.text+0x3b): undefined reference to `dlopen'
/usr/lib/libX11.a(CrGlCur.o): In function `fetch_symbol':
(.text+0x6b): undefined reference to `dlsym'
/usr/lib/libX11.a(CrGlCur.o): In function `fetch_symbol':
(.text+0x88): undefined reference to `dlsym'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With the above modification to &lt;code&gt;config.mk&lt;/code&gt;, dwm will compile and link
just fine:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ file dwm
dwm: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
statically linked, for GNU/Linux 2.6.18, not stripped
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can reduce the binary's size by a few hundred kilobytes by
manually calling &lt;code&gt;strip(1)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The binary works very well for me. I'll try to use it on different
systems over the next few weeks and see what happens. If that works
out well, I'll also try to get lucky with awesome and zathura, as
these (and the libraries needed) are not installed on many systems,
either.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Neuer Dönermann</title>
    <link href="http://blog.plenz.com/2011-08/neuer-d%C3%B6nermann.html" />
    <updated>2011-08-03T19:35:00+02:00</updated>
    <id>http://blog.plenz.com/2011-08/neuer-dönermann</id>
    <content type="html">&lt;p&gt;Der vergangene Monat war hart: Mein hauseigener Dönermann hatte
zugemacht, und die Hausverwaltung hatte wohl nicht so schnell einen
Nachmieter finden können. Den ganzen Juli lang musste ich überlegen,
ob ich nach links zum Araber, oder nach rechts zum Türken gehe,
jeweils mehrere Dutzend Meter. (Siehe auch das &lt;a href=&quot;http://en.wikipedia.org/wiki/Paradox_of_choice&quot;&gt;Paradox of
Choice&lt;/a&gt;, das sich auf so vieles projizieren lässt...)&lt;/p&gt;

&lt;p&gt;Diese Qual der Wahl ist jetzt aber glücklicherweise vorbei. Denn es
hat ein neuer Dönermann unten aufgemacht. Es gibt keine Spielautomaten
mehr, dafür mehr Stühle. Da, wo vorher die Bar war &amp;ndash; es gibt
jetzt nicht mal mehr Bier &amp;ndash;, steht jetzt ein großer, flacher
Ofen, und es wird herrlich leckeres und backfrisches &lt;a href=&quot;http://www.kochbar.de/rezept/35786/Ramadan-Pide-Ramazan-Pidesi.html&quot;&gt;Ramazan
Pidesi&lt;/a&gt; verkauft.&lt;/p&gt;

&lt;p&gt;Das ist nun mittlerweile der dritte Dönermann seit Januar diesen
Jahres. Entweder rentiert sich das nicht wirklich, oder das Angebot
ist einfach zu groß um sich eine dauerhafte Position zu sichern.
Vielleicht lässt sich mit nur wenige Monate bestehenden Firmen aber
auch einfach besser Geld waschen. Wer weiß?&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Unendlicher Spaß</title>
    <link href="http://blog.plenz.com/2011-07/unendlicher-spa%C3%9F.html" />
    <updated>2011-07-29T12:21:00+02:00</updated>
    <id>http://blog.plenz.com/2011-07/unendlicher-spaß</id>
    <content type="html">&lt;p&gt;Ziemlich genau einen Monat habe ich gebraucht, um die über 1500 Seiten
vom &lt;strong&gt;Unendlichen Spaß&lt;/strong&gt; von DFW durchzuarbeiten. Im Jahr 2009
erschienen ja zwei deutsche Übersetzungen von &quot;Meilensteinen der
modernen Literaturgeschichte&quot;: Bolaños &lt;strong&gt;2666&lt;/strong&gt; und eben DFWs
Unendlicher Spaß. 2666 hatte ich schon letztes Jahr gelesen &amp;ndash;
und nun, da ich mein &lt;a href=&quot;http://gitbu.ch&quot;&gt;großes Projekt&lt;/a&gt;
abgeschlossen hatte, konnte ich mich endlich an den Spaß wagen.&lt;/p&gt;

&lt;p&gt;Der Roman ist grandios. Liest man den Klappentext, denkt man, einige
Leute wären auf der Suche nach einem Film, der einem so viel und
langanhaltend Spaß bereitet, dass man daran stirbt. Allerdings geht
es darum eigentlich gar nicht. Oder schon, teilweise.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/unendlicher_spass.jpg&quot; alt=&quot;Cover 'Unendlicher Spaß'&quot;
style=&quot;float:left; margin: 0 .5em .5em 0; border: 1px solid #c0c0c0;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Das Buch beginnt unvermittelt, geht unvermittelt weiter, und endet
auch irgendwie unvermittelt. So richtig gibt es keine Handlung, aber
das spielt auch eigentlich gar keine Rolle, ob es nun eine wirkliche
Handlung gibt.&lt;/p&gt;

&lt;p&gt;Das ganze Buch ist, analog zu den &quot;Aprèsgarde&quot;-Filmen James Orin
Incandenzas, dem verstorbenen Vater eines der Protagonisten,
&lt;em&gt;antikonfluentieller&lt;/em&gt; Natur, zerfasert. (Siehe dafür auch ab S. 92
sowie Fußnote 24.) Die dutzende von Handlungssträngen finden teilweise
ein ganz wenig, manchmal auch nur als Teil von Erinnerungen,
Halluzinationen oder Träumen zusammen, oder häufig halt auch gar nicht
bzw. nur durch Ähnlichkeit der Situationen oder Dialoge.&lt;/p&gt;

&lt;p&gt;Insgesamt besticht das Buch durch die diversen textlichen
Stilelemente, grandiose Sätze, faszinierenden Detailreichtum &amp;ndash;
der meist nichts wesentliches zur Geschichte beiträgt, aber gerade
deshalb so faszinierend ist &amp;ndash; und nicht zuletzt durch äußerst
eindrückliche Beschreibungen von Sucht und Depression und der damit
einhergehenden Verzweiflung.&lt;/p&gt;

&lt;p&gt;Zur Lesetechnik: Die fast 400 Fußnoten sind wesentlich für das
Verständnis des Buches. Die Paperback-Ausgabe hat leider keine
Lesezeichen, so dass ich dringend empfehle, das Buch mit zwei
Lesezeichen zu lesen. Dafür eignet sich z.B. auch gut &lt;a href=&quot;http://sampottsinc.com/ij/&quot;&gt;dieses Diagramm
aller handelnden Personen und ihrer Verbindung zueinander&lt;/a&gt;
&amp;ndash; einfach ausdrucken und an der richtigen Stelle in den
Fußnotenapparat legen.&lt;/p&gt;

&lt;p&gt;Nach dem Lesen des Buches würde ich unbedingt noch einmal die ersten
beiden Kapitel lesen, was eine sehr aufschlussreiche Erfahrung ist.
Auch &lt;a href=&quot;http://dfan.org/jest.txt&quot;&gt;weitere Fragestellungen&lt;/a&gt; oder eine &lt;a href=&quot;http://www.aaronsw.com/weblog/ijend&quot;&gt;Interpretation des
Endes&lt;/a&gt; können dann hilfreich sein.&lt;/p&gt;

&lt;p&gt;Eine Sache, die mich noch immer verwirrt: Manche Kapitel haben einen
kleinen Kreis über dem Titel, dessen eines Viertel auch auf der Seite,
auf der die Anmerkungen beginnen, wiederholt wird. &lt;a href=&quot;http://russillosm.com/ij.html&quot;&gt;Hier&lt;/a&gt; gibt
es eine Auflistung der Kapitel mit entsprechender Markierung. &amp;ndash;
Was bedeutet der Kreis?&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">switching screen for tmux</title>
    <link href="http://blog.plenz.com/2011-07/switching-screen-for-tmux.html" />
    <updated>2011-07-21T21:35:00+02:00</updated>
    <id>http://blog.plenz.com/2011-07/switching-screen-for-tmux</id>
    <content type="html">&lt;p&gt;I had invited &lt;a href=&quot;http://www.linuxtag.org/2011/de/presse/newsarchiv/entry/article/featured-nicholas-marriott-tmux.html&quot;&gt;Nicholas Marriott&lt;/a&gt; to LinuxTag 2011 in Berlin to
give a talk on &lt;code&gt;tmux&lt;/code&gt;. I was conviced I should drop screen for tmux,
but ... Yesterday would be the day I first installed the program, and
by now I'm actively using it.&lt;/p&gt;

&lt;p&gt;It was not without pressure, though. I had volunteered to give a talk on
tmux at work, and today was the date. See the &lt;a href=&quot;http://userpage.fu-berlin.de/~plenz/tmux.pdf&quot;&gt;quick'n'dirty slides
here&lt;/a&gt; (in German).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;tmux&lt;/code&gt; needs a fairly recent &lt;code&gt;libevent&lt;/code&gt;. So if you want to run a recent
tmux version (1.5) on a Debian stable system, you should consider
linking it statically like so:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ./configure --enable-static
$ sed -i '/^LIBS =/s/$/ -lresolv/' Makefile
$ make CC='gcc -static'
$ cp tmux ~/bin
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;sed&lt;/code&gt; call is needed to make the static linking work, otherwise
&lt;code&gt;gcc&lt;/code&gt; will fail to find the symbol &lt;code&gt;__b64_ntop&lt;/code&gt;, which is part of
&lt;code&gt;glibc&lt;/code&gt;'s &lt;code&gt;libresolv&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;First action to be taken is to make Ctrl-A the prefix. I mean,
seriously, why would you use Ctrl-B? It's for &quot;previous page&quot; or
&lt;a href=&quot;https://github.com/Feh/configs/blob/0d74e6114254b0d145589b98926e8600d6397629/.zsh/zshrc#L1220&quot;&gt;previous argument&lt;/a&gt;!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;unbind C-b
set -g prefix C-a
bind a send-prefix
bind C-a last-window
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Next is the status bar. The syntax is pretty self-explanatory.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;set -g status-bg yellow
set -g status-fg black
set -g status-interval 5

set -g status-left &quot;#[fg=red]#S %H:%M &quot;
set -g status-right &quot;#H: #(cut -d' ' -f1-3 /proc/loadavg)&quot;

set -w -g window-status-current-bg red
set -w -g window-status-current-fg yellow
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Also, cycling through the windows becomes easier. The &lt;code&gt;-r&lt;/code&gt; switch to
&lt;code&gt;bind&lt;/code&gt; allows half a second time (set via &lt;code&gt;repeat-time&lt;/code&gt;) to perform
the next keystroke without pressing the prefix again. So
&lt;code&gt;&amp;lt;prefix&amp;gt;&amp;lt;space&amp;gt;&amp;lt;space&amp;gt;&amp;lt;space&amp;gt;&lt;/code&gt; will move you three windows ahead:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# repeated space/backspace toggles windows forward/backwards
bind -r Space next-window
bind -r C-Space next-window
bind -r C-h previous-window
bind -r C-? previous-window
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This feature is very handy for resizing or switching panes repeatedly.
(Read more about sessions/windows/panes in the docs...)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Having multiple panes in one window is easy enough. Splitting panes,
however, is sort of counter-intuitive: A horizontal split (&lt;code&gt;split-window
-h&lt;/code&gt;) will divide the current pane into two panes that are horizontally
next to each other &amp;ndash; i.e., a &lt;em&gt;horizontal&lt;/em&gt; split will introduce a
&lt;em&gt;vertical&lt;/em&gt; split line between to panes. &lt;a href=&quot;http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multiplexer/&quot;&gt;This resource&lt;/a&gt; has
a nice idea to make splitting more idiomatic:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bind | split-window -h
bind - split-window -v
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For a great feature, check out &lt;code&gt;link-window&lt;/code&gt;. If you do name your
sessions and windows in a predictable way so that you can match them
via &lt;code&gt;fnmatch(3)&lt;/code&gt;, you'll be able to do cool things like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bind M link-window -s comm:mutt*
bind I link-window -s comm:irssi*
bind K unlink-window
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So with Prefix-M you'll quickly bring up the mutt instance of your
communication's session, and will detach that single window with
Prefix-K again. That's especially handy for things like Mail and IRC
client, music player, Todo Lists ...&lt;/p&gt;

&lt;p&gt;Side note: Sadly, it's not possible without some tricks to link a
&lt;em&gt;window&lt;/em&gt; from another session to a &lt;em&gt;pane&lt;/em&gt; (sub-window) in the current
session. (Think a ten-line-high IRC client at the bottom of your
current window.) The &lt;a href=&quot;http://tmux.svn.sourceforge.net/viewvc/tmux/trunk/FAQ&quot;&gt;FAQ&lt;/a&gt; says &quot;[fixing this] is a big todo item
but quite invasive&quot;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Sprunge, the fine pastebin service</title>
    <link href="http://blog.plenz.com/2011-07/sprunge-the-fine-pastebin-service.html" />
    <updated>2011-07-20T23:55:00+02:00</updated>
    <id>http://blog.plenz.com/2011-07/sprunge-the-fine-pastebin-service</id>
    <content type="html">&lt;p&gt;I have never understood why automatically pasting to a pastebin
service should be so hard as in &quot;I need a &lt;a href=&quot;http://wgetpaste.zlin.dk/&quot;&gt;huge script&lt;/a&gt; to
do the job!&quot;.&lt;/p&gt;

&lt;p&gt;Luckily, once in a while there are &lt;a href=&quot;http://github.com/rupa/&quot;&gt;smart people&lt;/a&gt; that build good
and simple applications. &lt;a href=&quot;http://sprunge.us/&quot;&gt;Enter &lt;em&gt;sprunge&lt;/em&gt;, the first truly sane
pastebin service&lt;/a&gt;. Need to know how it works? You'll find the
man page on their website (no, really). &amp;ndash; No listing of pastes. No
annotation, comments, amendments. No foobar. Paste away!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sprunge &amp;lt; ~/bin/sprunge 
 http://sprunge.us/OcPR

$ wget -qO- http://sprunge.us/OcPR
#!/bin/sh
exec curl -F 'sprunge=&amp;lt;-' http://sprunge.us
&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Represent directory structures in LaTeX</title>
    <link href="http://blog.plenz.com/2011-07/represent-directory-structures-in-latex.html" />
    <updated>2011-07-18T12:13:00+02:00</updated>
    <id>http://blog.plenz.com/2011-07/represent-directory-structures-in-latex</id>
    <content type="html">&lt;p&gt;When writing the &lt;a href=&quot;http://gitbu.ch/&quot;&gt;git book&lt;/a&gt; we faced a problem: when
dealing with an example repository, how do you describe a directory
structure?&lt;/p&gt;

&lt;p&gt;Simply &quot;writing&quot; about it is the cheap apporach, although pretty
stupid: most readers (including me) would skip over the paragraph.
Later, they'd be confused when we'd refer to a specific property of
the repository layout.&lt;/p&gt;

&lt;p&gt;The intermediate approach was to simply paste the output of the &lt;code&gt;tree&lt;/code&gt;
unix command. That was hard to &quot;parse&quot; though, and didn't look well.&lt;/p&gt;

&lt;p&gt;It is clear that a graphic representation of the directory structure
is optimal. But: how? The easiest way would be to install some
graphical application that can represent tree-structures, such as
Nautilus. There are no upsides to this, but two minor downsides: it
looks crappy, and it requires you to install some hundred megabytes of
gnome-wtf-libs.&lt;/p&gt;

&lt;p&gt;The major downside is this: If you want to re-do the screenshot,
you'll need the same directory structure, the same setup, GNOME
styles, same selection to grab, ... there is no easy way to automate
this.&lt;/p&gt;

&lt;p&gt;Not wanting to settle for the cheap way, what were the goals our
solution had to meet?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;can be understood at one glance (important)&lt;/li&gt;
&lt;li&gt;can be automated and tracked in git (important)&lt;/li&gt;
&lt;li&gt;does not eat up much space on the page&lt;/li&gt;
&lt;li&gt;doesn't depend on colors&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;An alternative that came to my mind was to use &lt;a href=&quot;http://www.graphviz.org/&quot;&gt;GraphViz's&lt;/a&gt;
&lt;code&gt;neato&lt;/code&gt; tool. I wrote a Perl script to convert a directory structure
to a diagram. The code's too cruel to be released to the world. You
can imagine what it looks like by invoking:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;neato -Txlib &amp;lt;&amp;lt;EOF
graph G {
  n1 [shape=folder width=1 style=filled label=&quot;baz&quot; pos=&quot;0.00,0.00!&quot;];
  n2 [shape=box height=.2 width=1 labelloc=t label=&quot;file&quot; pos=&quot;0.00,-0.60!&quot;];
  n3 [shape=folder width=1 style=filled label=&quot;foo&quot; pos=&quot;0.00,-1.20!&quot;];
  n4 [shape=folder width=1 style=filled label=&quot;bar&quot; pos=&quot;1.20,-1.20!&quot;];
  n3 -- n4;
  n1 -- n2 -- n3;
}
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;However, this output did not meet above criteria #3&amp;amp;4. It looked even
cheaper than simple &lt;code&gt;tree&lt;/code&gt; output.&lt;/p&gt;

&lt;p&gt;The solution we settled for was &lt;a href=&quot;http://www.ctan.org/tex-archive/macros/generic/dirtree&quot;&gt;dirtree.sty&lt;/a&gt;. It works like this:
You download the &lt;code&gt;dirtree.sty&lt;/code&gt; and &lt;code&gt;dirtree.tex&lt;/code&gt; file, place them
within your project and add a &lt;code&gt;\usepackage{dirtree}&lt;/code&gt;. In theory, you
can then include a &lt;code&gt;\dirtree{}&lt;/code&gt; declaration (see the docs for
details).&lt;/p&gt;

&lt;p&gt;For example, this code (note the percent sign on line #1)...&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\dirtree{ %
.1 .git/.
.2 HEAD.
.2 config.
.2 hooks/.
.2 index.
.2 info/.
.2 logs/.
.3 HEAD.
.3 refs/.
.2 objects/.
.3 info/.
.3 pack/.
.2 refs/.
.3 heads/.
.3 remotes/.
.3 tags/.
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;will produce the following graphic:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/dirtree.sty-example.png&quot; style=&quot;width: 150px;&quot; alt=&quot;dirtree.sty example&quot; /&gt;&lt;/p&gt;

&lt;p&gt;However, since it's not part of the LaTeX standard distribution, you
cannot be sure about it's stability. It may use &quot;dangerous&quot; LaTeX
constructs, etc... certainly nothing you want to include &quot;as-is&quot; in a
book that'll eventually be printed. Also, the book will go through a
conversion process to be distributed as an Ebook. You wouldn't want
such a little LaTeX hack to be a show-stopper &amp;ndash; or, worse yet,
discover document corruption just after you got some thousand fresh
copies from the printing press.&lt;/p&gt;

&lt;p&gt;EPS/PDF files are stable, however. So what we did was this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Put the &lt;code&gt;\dirtree{}&lt;/code&gt; statements into separate files, including some
&lt;code&gt;\begin{document}&lt;/code&gt; stuff so that it will compile to a PDF file
containing just the diagram.&lt;/li&gt;
&lt;li&gt;Remove any whitespace. We use &lt;a href=&quot;http://pdfcrop.sourceforge.net/&quot;&gt;pdfcrop&lt;/a&gt; for that.&lt;/li&gt;
&lt;li&gt;Convert to EPS.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;In terms of Makefile statements, &lt;a href=&quot;http://haenel.co&quot;&gt;Valentin&lt;/a&gt; came up with
this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;files=objektmodell-programm-crop\
    svn-stdlayout-crop\
    svn-nonstdlayout-crop\
    svn-branches-crop\
    git-branches-crop\
    git-dir-crop

pdfs=$(addsuffix .pdf, $(files))
epss=$(addsuffix .eps, $(files))

all: $(pdfs) $(epss)

clean:
    -rm -v *.pdf *.eps *.aux *.log

%.pdf : %.tex
    pdflatex $&amp;lt;

%-crop.pdf : %.pdf
    pdfcrop $&amp;lt;

%-crop.eps : %-crop.pdf
    pdftops -eps $&amp;lt; $@
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now it's as simple as &lt;code&gt;make -C dir-listings &amp;amp;&amp;amp; git add dir-listings&lt;/code&gt;
(with an appropriate &lt;code&gt;.gitignore&lt;/code&gt; file) to record changes to diagrams
and recompile the PDF and EPS files. If you don't plan to keep the
compiled files in your repository, you can also add a dependency for
the subdirectory to your main Makefile.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">I failed the social web, again</title>
    <link href="http://blog.plenz.com/2011-07/i-failed-the-social-web-again.html" />
    <updated>2011-07-12T12:59:00+02:00</updated>
    <id>http://blog.plenz.com/2011-07/i-failed-the-social-web-again</id>
    <content type="html">&lt;p&gt;For some days now, &lt;a href=&quot;http://plus.google.com/&quot;&gt;G+&lt;/a&gt; has opened its doors to beta testers.
All the people &lt;a href=&quot;http://i.imgur.com/KChTH.gif&quot;&gt;want invitations&lt;/a&gt;, and Reddit realized for
a long time already that &lt;a href=&quot;http://i.imgur.com/6abzK.jpg&quot;&gt;Facebook will be the new MySpace&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now, last tuesday or so I saw G+ at a friend's, who sent me an
invitation. Friday, I pondered the question of whether or not to sign
up for G+ &amp;ndash; literally for hours. (I have to admit, though, that
while lying on my bed and considering the arguments, I fell asleep for
a short period.)&lt;/p&gt;

&lt;p&gt;I had seen some of the freshly-made Google profiles of the avant-garde
&amp;ndash; that is, technophile persons whose blogs I enjoy from time to
time &amp;ndash; and was rather impressed of the quality content they
posted. So I decided to give it a try.&lt;/p&gt;

&lt;p&gt;Now this was a major step! G+ would be the first Google product I
would use that requires registration. So I went through the process
and was eager to try out G+. However, as I had heard already, getting
an invite doesn't mean you can use it right away, it might take a day
or two.&lt;/p&gt;

&lt;p&gt;To make a long story short: While waiting for this timespan to elapse,
I browsed through various circles. And what I saw struck me as a
Facebook for grown ups: People I don't know talking about stuff I
don't care about, in a way that might be appropriate in a bar
atmosphere, but not to be archived publicly until ... forever or
something.&lt;/p&gt;

&lt;p&gt;A day later I got a second invite, and I could continue to the G+
thing. However, the site that came up told me my browser was not
supported (it's FF 3.5). So, it seems I'm not avant-garde enough to
use G+.&lt;/p&gt;

&lt;p&gt;I just deleted my freshly created Google account. I mean, come on,
it's sunny outside and there's a pile of unread books waiting!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Southern Sudan's Secession</title>
    <link href="http://blog.plenz.com/2011-07/southern-sudans-secession.html" />
    <updated>2011-07-07T19:35:00+02:00</updated>
    <id>http://blog.plenz.com/2011-07/southern-sudans-secession</id>
    <content type="html">&lt;p&gt;I am closely following the secession of Southern Sudan. It is a very
intriguing situation &amp;ndash; the birth of a new state.&lt;/p&gt;

&lt;p&gt;Information is scarce about this topic. The &lt;a href=&quot;http://www.sudantribune.com/index.php&quot;&gt;Sudan Tribune&lt;/a&gt;
provides some insights, but most quality coverage is done by
Al&amp;nbsp;Jazeera &lt;a href=&quot;http://english.aljazeera.net/InDepth/spotlight/southernsudanindependence/&quot;&gt;here&lt;/a&gt;. Some facts to consider
(quoted from &lt;a href=&quot;http://english.aljazeera.net/indepth/spotlight/southernsudanindependence/2011/06/2011630102213823618.html&quot;&gt;here&lt;/a&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The political system is dominated by one party [the SPLM]&lt;/li&gt;
&lt;li&gt;Other opposition parties are extremely weak&lt;/li&gt;
&lt;li&gt;Parliamentary elections in April 2010 were marred by widespread
reports of intimidation and fraud&lt;/li&gt;
&lt;li&gt;Juba [the Capitol-to-be] produces more than three-quarters of
Sudan's 500,000 barrels per day of oil&lt;/li&gt;
&lt;li&gt;98 per cent of government revenue comes from the petroleum sector&lt;/li&gt;
&lt;li&gt;Southern Sudan has just 60 kilometres of paved roads, and
electricity is provided only intermittently by generators&lt;/li&gt;
&lt;li&gt;southern officials estimate that between 150,000 and 200,000 people
&amp;ndash; in a region of 20 million &amp;ndash; are on the army's payroll&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Eritrea, Libya and Iran have already stated they won't recognize
Southern Sudan as a state. Most western countries probably will, as
plans are persued to open embassies in Juba. (Juba has just been
getting a new international airport &amp;ndash; I wonder how much fuel
they keep on stock to operate it just with generator power?)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Organspende</title>
    <link href="http://blog.plenz.com/2011-07/organspende.html" />
    <updated>2011-07-02T16:36:00+02:00</updated>
    <id>http://blog.plenz.com/2011-07/organspende</id>
    <content type="html">&lt;p&gt;Nach der Sommerpause wird über eine &lt;a href=&quot;http://taz.de/1/politik/deutschland/artikel/1/die-pflicht-sich-zu-entscheiden/&quot;&gt;neue Fassung des
Transplantationsgesetzes&lt;/a&gt; diskutiert.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Zwar sind laut Umfragen bis zu 75 Prozent der Deutschen
prinzipiell zur Organspende bereit, aber nur 25 Prozent haben
tatsächlich einen Organspendeausweis. Würden die Menschen
gezwungen, sich zu erklären, so das Kalkül der Politik, dann
stiege auch die Zahl der verfügbaren Spenderorgane.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Es ist ein typisch-deutsches Phänomen, zu sagen: &quot;Ja, ich bin total
für X (aber nicht wirklich)&quot;: &quot;Ausländer ja, aber nicht hier&quot; &amp;ndash;
&quot;Schwule ja, aber bitte nicht in der Öffentlichkeit&quot; &amp;ndash; &quot;Öko-bla
ja, aber bitte kein teureres Benzin&quot;.&lt;/p&gt;

&lt;p&gt;Daher glaube ich, ein einfaches Kreuz bei &quot;Ja, ich will spenden&quot; wird
wesentlich mehr Menschen anlocken als der Gang zu einer Institution,
die Organspendeausweise verteilt (und das ständige Herumtragen
desselben). Ich habe seit 2006 einen Organspendeausweis und finde das
sehr wichtig. Ich würde ja auch im Falle des Falles gerne ein
Ersatzorgan haben.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Linkdump</title>
    <link href="http://blog.plenz.com/2011-07/linkdump.html" />
    <updated>2011-07-02T15:56:00+02:00</updated>
    <id>http://blog.plenz.com/2011-07/linkdump</id>
    <content type="html">&lt;p&gt;Al-Jazeera-Linkdump:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://english.aljazeera.net/news/africa/2011/06/201163018229379353.html&quot;&gt;Die USA setzen nun auch in Somalia Dronen ein&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://english.aljazeera.net/indepth/features/2011/06/2011622193147231653.html&quot;&gt;&quot;By 2030, 47 per cent of the world’s population will be living in areas of high water stress&quot;&lt;/a&gt; und viele weitere interessante Fakten über aufziehende Wasserkriege&lt;/li&gt;
&lt;li&gt;Gutes Feature mit div. Artikeln zum Thema &lt;a href=&quot;http://english.aljazeera.net/programmes/struggleoverthenile/&quot;&gt;Struggle over the Nile&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://english.aljazeera.net/news/africa/2011/07/20117154535570851.html&quot;&gt;Marokko hat eine neue Verfassung&lt;/a&gt;: Die Regierung erhält exekutive Befugnisse, aber der König ist immer noch &quot;heilig&quot;. Außerdem werden Berbersprachen (zB. der Tuareg) neben Arabisch offizielle Sprache.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://english.aljazeera.net/indepth/features/2011/04/201141014942125983.html&quot;&gt;Interessante, aber schon ältere Zusammenfassung, was für Aufstände die Revolutionen im arabischen Raum in Subsahara-Afrika getriggert haben&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://english.aljazeera.net/news/asia-pacific/2011/06/201162952034878959.html&quot;&gt;Der vom Internationalen Strafgerichtshof angeklagte Präsident des Sudan wird in China empfangen&lt;/a&gt; und bereitet erst mal den Weg, mehr Rohöl (das wohlgemerkt zum Großteil aus dem Süden des Sudan kommt!) nach China zu exportieren.&lt;/li&gt;
&lt;/ul&gt;

</content>
  </entry>
  
  <entry>
    <title type="html">Perl: use feature;</title>
    <link href="http://blog.plenz.com/2011-07/perl-use-feature.html" />
    <updated>2011-07-02T14:38:00+02:00</updated>
    <id>http://blog.plenz.com/2011-07/perl-use-feature</id>
    <content type="html">&lt;p&gt;With it's 5.10 version, Perl learned some pretty interesting new
features. Some of them modify the syntactic interpretation of Perl
code, so to stay backwards-compatible, you have to manually enable
them. To do this, add a line like&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;use feature qw(:5.10);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;to your other &lt;code&gt;use&lt;/code&gt; declarations. (For one-liners, add the &lt;code&gt;-E&lt;/code&gt;
command line switch.) The documentation is available via &lt;code&gt;perldoc
feature&lt;/code&gt; or &lt;a href=&quot;http://search.cpan.org/~jesse/perl-5.14.1/lib/feature.pm&quot;&gt;online&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There's one pretty trivial change that nonetheless has bothered me for
a long time already. Why is there no function in Perl to print out
some strings, and then finish with a newline? I mean, almost every
sane programming language has this, and it helps writing clean code a
lot (no fiddling with &lt;code&gt;\n&lt;/code&gt; and so on). &amp;ndash; Now, they backported
the &lt;code&gt;say&lt;/code&gt; function from Perl 6, which does just that: &lt;a href=&quot;http://search.cpan.org/~jesse/perl-5.14.1/pod/perlfunc.pod#say&quot;&gt;add an omplicit
newline&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The new concept of state variables is nothing I need for now; however,
the feature they strangely call &lt;code&gt;switch&lt;/code&gt; (although the actual keywords
are &lt;code&gt;given&lt;/code&gt;/&lt;code&gt;when&lt;/code&gt;) is pretty nice: It's pretty much like what you'd
expect with a typical C construct like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;switch(var) {
    case 1:
        /* do something */
        break;
    ...

    default:
        /* do default thing */
        break;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In Perl that's now:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;given($var) {
    when(condition1) {
        # do something
    }

    do_other_thing when condition2; # as one-liner

    default {
        # fallthrough case
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; The &lt;code&gt;statement when condition;&lt;/code&gt; one-liner doesn't work.
Don't know where I got that from.&lt;/p&gt;

&lt;p&gt;You can use simple strings (maps to &lt;code&gt;$_ eq &quot;string&quot;&lt;/code&gt;), regular
expressions (maps to &lt;code&gt;$_ =~ /regex/&lt;/code&gt;) or function references like
&lt;code&gt;\&amp;amp;myfunc&lt;/code&gt; (maps to &lt;code&gt;myfunc($_)&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;The best improvement, however, are so-called &lt;em&gt;named captures&lt;/em&gt;.
(You don't have to enable those specifically.)
It allows regexes to contain pairs of parentheses that you can assign
a name to later extract the match. That means: no stupid and
mind-boggling re-numbering of &lt;code&gt;$2&lt;/code&gt; to &lt;code&gt;$3&lt;/code&gt; etc., just because you
added a set of brackets around something you want to extract from a
string. Consider this example regex:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;my $re = qr/
    (?&amp;lt;user&amp;gt;[^\@\s]+)
    \@
    (?&amp;lt;domain&amp;gt;[^\s&quot;&amp;gt;]+)
    /x;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can now access the user-part of the e-mail address via &lt;code&gt;$+{user}&lt;/code&gt;,
not necessarily via &lt;code&gt;$1&lt;/code&gt;. The immediate gain is obvious: if you add
parentheses around the whole expression (to capture the whole e-mail
address) the user part is still available via &lt;code&gt;$+{user}&lt;/code&gt;. The numbered
variable would be &lt;code&gt;$2&lt;/code&gt; now, though.&lt;/p&gt;

&lt;p&gt;Another side-effect is that you can test several regexes in a row now, and
later extract matching parts from all of these &amp;ndash; of course only
if you use distinct capture names. Hash entries in &lt;code&gt;%+&lt;/code&gt; will only be
updated upon a match (and won't be cleared AFAIK, at least in the
lexical scope).&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Verregnetes Sommerwochenende</title>
    <link href="http://blog.plenz.com/2011-07/verregnetes-sommerwochenende.html" />
    <updated>2011-07-02T12:35:00+02:00</updated>
    <id>http://blog.plenz.com/2011-07/verregnetes-sommerwochenende</id>
    <content type="html">&lt;p&gt;Hier und heute, Anfang Juli: Komplett verregnetes Wochenende mit zwölf
Grad. &amp;ndash; Vor dem Hintergrund, dass Anfang kommender Woche die
ersten Klausuren anstehen ist das eigentlich total gutes
(Lern-)Wetter.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Nomic</title>
    <link href="http://blog.plenz.com/2011-06/nomic.html" />
    <updated>2011-06-24T14:51:00+02:00</updated>
    <id>http://blog.plenz.com/2011-06/nomic</id>
    <content type="html">&lt;p&gt;Ich habe den besseren Teil des Vormittags damit verbracht, über
&lt;a href=&quot;http://en.wikipedia.org/wiki/Nomic&quot;&gt;Nomic&lt;/a&gt; zu lesen. Darauf gekommen bin ich über &lt;a href=&quot;http://blog.koehntopp.de/archives/3082-Die-NOMIC-Spieler.html&quot;&gt;diesen
Blogartikel&lt;/a&gt;, der über Mittel und Wege reflektiert, eine
Online-Community &quot;gesund&quot; zu halten.&lt;/p&gt;

&lt;p&gt;Zurück geht das ganze auf ein Buch von &lt;a href=&quot;http://en.wikipedia.org/wiki/Peter_Suber&quot;&gt;Peter Suber&lt;/a&gt;, &lt;a href=&quot;http://www.earlham.edu/~peters/writing/psa/&quot;&gt;&quot;The
Paradox of Self-Amendment&quot;&lt;/a&gt;, untertitelt &quot;A Study of Law, Logic,
Omnipotence, and Change&quot;. Prinzipiell dreht sich alles um die folgende
Frage: Wenn man ein System von Regeln aufstellt, das eine Regel
beinhaltet, die die Abwandlung, das Hinzufügen und Entfernen von
Regeln erlaubt &amp;ndash; was passiert dann?&lt;/p&gt;

&lt;p&gt;Das kann man auf Regelwerke wie die Amerikanische Verfassung beziehen,
die ja auch Amendments, also Erweiterungen hat. Ganz konkret kann man
das ganze aber auch als Spiel formulieren &amp;ndash; und das wird in
Anlehnung an das griechische Wort für Gesetz &lt;em&gt;Nomic&lt;/em&gt; genannt.&lt;/p&gt;

&lt;p&gt;Das von Suber entwickelte &lt;a href=&quot;http://www.earlham.edu/~peters/writing/nomic.htm#initial&quot;&gt;Initial Ruleset&lt;/a&gt; gibt schon gute
Aufschlüsse darüber, wie das Spiel verlaufen wird. Wesentlich ist vor
allem der Unterschied zwischen &quot;immutable&quot; und &quot;mutable&quot; Rules &amp;ndash;
Gegenpart in unserer nationalen Politik wären beispielsweise
GG-Änderungen, oder andere Änderungen, die nur mit 2/3-Mehrheit zu
erreichen sind.&lt;/p&gt;

&lt;p&gt;Wie lange dauert so ein Spiel? &amp;ndash; die Regel 208 besagt, dass der
Spieler gewinnt, der zuerst 100 Punkte erreicht. Das wird vermutlich
eine der ersten Regeln sein, die abgeändert wird &amp;ndash; also ist in
der Regel überhaupt nicht abzusehen, wie schnell und in welche
Richtung sich ein Spiel entwickelt.&lt;/p&gt;

&lt;p&gt;Nomic wurde (und wird) auch viel über Mailing-Listen bzw.
Diskussionsforen gespielt. Und da zeigt sich dann, dass das Spiel mehr
als einen Nachmittag auffrisst: eher &lt;em&gt;Jahre&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Beispiel: &lt;a href=&quot;http://www.agoranomic.org/&quot;&gt;Agora&lt;/a&gt; läuft seit dem 30. Juni 1993. Bis jetzt. Und
immer noch weiter.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Agora is a relatively serious nomic; many of its players see it as
an experiment in philosophy, political science, and group
dynamics, rather than just a game; sometimes it acts more like a
country.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Wie komplex sich ein solches änderbares Regelsystem entwickeln kann,
ist sehr gut an &lt;a href=&quot;http://agora.qoid.us/current_flr.txt&quot;&gt;den aktuell in Agora geltenden Regeln&lt;/a&gt;
abzulesen. So wie ich das auf den ersten Blick sehe, gibt es dort
keine Unterscheidung zwischen &quot;mutable&quot; und &quot;immutable&quot; (die es zu
Anfang aber gegeben haben muss, siehe die History der Regeln). Statt
dessen hat jede Regel einen Power-Faktor &amp;ndash; geregelt durch 1688/6
&amp;ndash;, der entscheidet, wie mächtig sie ist. Regel 2140/1, &quot;Power
Controls Mutability&quot;, legt dann fest, dass &quot;niedere&quot; Regeln keine
&quot;wichtigen&quot; Regeln überschreiben dürfen.&lt;/p&gt;

&lt;p&gt;Massenhaft weitere Resourcen zu dem Spiel gibt es auf
&lt;a href=&quot;http://www.nomic.net/&quot;&gt;nomic.net&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Das Gitbuch ist da!</title>
    <link href="http://blog.plenz.com/2011-06/das-gitbuch-ist-da.html" />
    <updated>2011-06-23T19:43:00+02:00</updated>
    <id>http://blog.plenz.com/2011-06/das-gitbuch-ist-da</id>
    <content type="html">&lt;p&gt;Gestern frisch aus der Druckerei, jetzt hier: Heute sind meine
Belegexemplare des &lt;a href=&quot;http://gitbu.ch/&quot; title=&quot;Homepage des Git-Buches&quot;&gt;Git-Buches&lt;/a&gt; angekommen! Damit ist es jetzt
auch im Handel verfügbar.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/gitbuch_ist_da.jpg&quot; alt=&quot;Foto des Git-Buches&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Es ist ein wirklich tolles Gefühl, ein so großes Projekt abgeschlossen
zu haben und das Ergebnis in den Händen zu halten. &amp;ndash; Jetzt erst
mal abwarten, wie so die Rückmeldungen ausfallen. ;-)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Urlaub fürs Gehirn</title>
    <link href="http://blog.plenz.com/2011-06/urlaub-f%C3%BCrs-gehirn.html" />
    <updated>2011-06-21T20:02:00+02:00</updated>
    <id>http://blog.plenz.com/2011-06/urlaub-fürs-gehirn</id>
    <content type="html">&lt;p&gt;Habe eben das neue KIZ-Album gehört. Im Vergleich zum vorherigen ist
es immerhin mal wieder hörbar, aber leider mit vielen nervigen Hooks.
Gut gefällt mir der 8-Minuten-&quot;Wir-featuren-Alle&quot;-Track. Beste Line
des Albums: &quot;Wie watt hier Dubstep-Remix Alta, dit ist doch Polka!&quot;
&amp;ndash; So true.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Bookdump</title>
    <link href="http://blog.plenz.com/2011-06/bookdump.html" />
    <updated>2011-06-13T18:30:00+02:00</updated>
    <id>http://blog.plenz.com/2011-06/bookdump</id>
    <content type="html">&lt;p&gt;Ich hatte mir ja vorgenommen, zu dokumentieren, welche Bücher ich
lese, und was ich dazu denke &amp;ndash; ganz schön ehrgeizig! Nun fällt
es mir aber schwer, alle Bücher, die ich in den vergangenen drei
Monaten gelesen habe, einzeln zu beschreiben. Daher hier ein
&quot;Bookdump&quot; der Bücher, deren Titel ich zumindest noch erinnere (denn
das ist meist ein gutes Zeichen!).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;le Carré: Out Kind of Traitor&lt;/strong&gt;, ganz nett, kommt aber
m.E. nicht an die früheren Bücher (z.B. &quot;A perfect Spy&quot;) heran; dafür
interessant modernes Setting &amp;ndash;
&lt;strong&gt;Lenin: Was tun?&lt;/strong&gt; &amp;ndash;
&lt;strong&gt;Alaa al-Aswani: Der Jakubijân-Bau&lt;/strong&gt; &amp;ndash;
&lt;strong&gt;Anonymous: Traktat über die drei Betrüger&lt;/strong&gt;, für
Interessierte der Religionskritik ein &quot;Grundlagendokument&quot; &amp;ndash;
&lt;strong&gt;Enzensberger: Versuch über den radikalen Verlierer&lt;/strong&gt;,
leider nur ein Versuch, ruhig überraschen lassen ohne den Klappentext
zu lesen! &amp;ndash;
&lt;strong&gt;Schätzing: Limit&lt;/strong&gt;, schwach, nachdem mir sein Erstling
eigentlich gut gefallen hatte.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Schneller lesen, besser verstehen&lt;/strong&gt; &amp;ndash; In der U3
auf dem Weg zur FU Berlin sowie dort in der Mensa kann man kaum der
grell-orangen Werbung entkommen, die einem den Kurs zum Besseren Lesen
verkaufen wollen. Da mich das Thema interessiert, habe ich mir für
einen Zehner das Buch zum Kurs gekauft. Leider (oder zum Glück!) lag
ich in den Einstufungsselbsttests noch über dem, was das Buch als Ziel
versprach. Es war allerdings interessant zu reflektieren, wie Menschen
eigentlich lesen. Gerade für Viel-Leser an der Uni sicherlich ein
Gewinn, wenn man denn die Zeit investiert...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chomsky: Hopes and Prospects&lt;/strong&gt; &amp;ndash;
&lt;strong&gt;Chomsky &amp;amp; Pappé: Gaza in Crisis&lt;/strong&gt; &amp;ndash;
Die beiden neusten Chomsky'schen Essaysammlungen sind nach alter
Manier langweilig und iteriert. (Was der Notwendig- und Richtigkeit der
Darstellung natürlich keinen Abbruch tut! &amp;ndash; Chomsky ist nunmal
offensichtlich nicht an mitreißenden Formulierungen interessiert. Er
ist Dokumentar, kein Literat.) Was allerdings in meinen Augen neu ist,
ist die Aktualität, mit der Chomsky über gerade mal wenige Monate
zurückliegende Ereignisse reflektiert. Auch findet er einmal
ausführliche und klare Worte zum Thema Israel/Gaza, was im
Wesentlichen dem entspricht, was sein Protégée Norman G. Finkelstein
bisher dazu veröffentlicht hat; die Zusammenarbeit mit Pappé
bereichert das Buch außerdem ungemein. Leseempfehlung, unbedingte!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Schmidt-Salomon: Jenseits von Gut und Böse&lt;/strong&gt; &amp;ndash;
Ich hatte Schmidt-Salomon bei einer Podiumsdiskussion in der Urania
vor einigen Wochen gesehen, in der er einige der Thesen seines Buches
debattierte. Während sich die beiden Diskutierenden sehr an
Kleinigkeiten aufhängten, hat das Buch bei mir einen sehr
&quot;vollendeten&quot; Eindruck hinterlassen: Eine
wissenschaftlich-atheistische Weltsicht, untermauert und motiviert
durch Empirie und Logik.
Am interessantesten fand ich übrigens das Nachwort zur fünften
Auflage, wo Schmidt-Salomon das &lt;a href=&quot;http://de.wikipedia.org/wiki/Emergenz&quot;&gt;Emergenzprinzip&lt;/a&gt; diskutiert.
&amp;ndash; Nachdem ich diesen Versuch von Prechts, mit &quot;Wer bin ich, und
wenn ja wie viele?&quot; Philosophie massentauglich zu vermarkten, eher
nicht so gelungen fand, erscheint mit dieser offensichtlich von
Nietzsche beeinflusste Titel (und nicht nur der Titel) als gelungen.
In gewissem Maße ist es auch eine Anleitung zum Glücklich-sein.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">ending the silence</title>
    <link href="http://blog.plenz.com/2011-06/ending-the-silence.html" />
    <updated>2011-06-13T18:14:00+02:00</updated>
    <id>http://blog.plenz.com/2011-06/ending-the-silence</id>
    <content type="html">&lt;p&gt;It has been a little more than three months since I last posted
something here in my blog. Considering that the first post ever in
this blog was from 1st of January this year, this pretty much looked
like a &quot;tried to blog, but gave it up again&quot; thing.&lt;/p&gt;

&lt;p&gt;I was really busy, however, and was simply not able to write a single
post. What really ate up all my time was my latest pet project,
writing a &lt;a href=&quot;http://gitbu.ch/&quot;&gt;German book about Git&lt;/a&gt;. Valentin (my co-author)
and I worked really hard throughout the past few weeks &amp;ndash; only
got up once in a while to get something to eat and stock up on Club
Mate. The book is being published at &lt;a href=&quot;https://www.opensourcepress.de/&quot;&gt;Open Source Press&lt;/a&gt; and will
be available from the end of June. Go buy it!&lt;/p&gt;

&lt;p&gt;Now, with a lot of free time on my hands, I can finally get back to my
studies (yes, really). Also, I will devote more time to this blog. :-)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Ägypten und der Nil</title>
    <link href="http://blog.plenz.com/2011-03/%C3%84gypten-und-der-nil.html" />
    <updated>2011-03-08T03:51:00+01:00</updated>
    <id>http://blog.plenz.com/2011-03/Ägypten-und-der-nil</id>
    <content type="html">&lt;p&gt;Der Nil zieht sich &lt;a href=&quot;http://maps.google.com/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=nile,+egypt&amp;amp;aq=&amp;amp;sll=-36.380828,174.663555&amp;amp;sspn=19.273861,46.274414&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Nile,+Egypt&amp;amp;ll=26.804461,31.904297&amp;amp;spn=11.087303,23.137207&amp;amp;t=p&amp;amp;z=6&quot;&gt;wie ein grünes Band&lt;/a&gt; durch Ägypten. Fraglos
profitiert Ägypten von allen acht am Nil anliegenden Ländern momentan am
meisten vom Nil, nicht zuletzt ob des gigantisch ausgedehnten
Nil-Deltas. Diese Acht Länder haben sich Ende der Neunziger zu der
&lt;a href=&quot;http://en.wikipedia.org/wiki/Nile_Basin_Initiative&quot;&gt;Nil Basin Initiative&lt;/a&gt; zusammengeschlossen, doch die Stimmung ist
alles andere als gut:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Representatives of upstream countries [Rwanda, Uganda, Kenya and
others] said they were &quot;tired of first getting permission from
Egypt before using river Nile water for any development project
like irrigation&quot;, as required by a treaty signed during the
colonial era between Egypt and Britain in 1929.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Fefe &lt;a href=&quot;http://blog.fefe.de/?ts=b38bdc53&quot;&gt;verlinkt&lt;/a&gt; auf ein &lt;a href=&quot;http://de.rian.ru/opinion/20110305/258499136.html&quot;&gt;interessantes Interview&lt;/a&gt;, der auf
die Tatsache hinweist, dass Ägypten in den kommenden Jahren unter
massiver Wasserknappheit leiden wird. Das geht auf eine
&lt;a href=&quot;http://www.newvision.co.ug/D/8/12/747927&quot;&gt;Vertragsunterzeichnung Burundis letzte Woche&lt;/a&gt; zurück:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Burundi has now joined Uganda, Rwanda, Tanzania, Ethiopia and
Kenya in agreeing to the deal, which seeks to strip Egypt of its
long-held rights to the Nile.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Wie krass sich die Situation daher für Ägypten (und besonders die
großen Städte am Nil-Delta) zuspitzen wird, kann man daran erkennen,
wie sehr sich die Ägypter &lt;a href=&quot;http://www.newvision.co.ug/D/8/12/747927&quot;&gt;momentan am Nilwasser bedienen&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Egypt’s 80 million inhabitants draw about 90 percent of their
water needs from the Nile. Cairo maintains that, even by the
favourable terms of current agreements, its water needs cannot be
met by the Nile alone after 2017.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Es gibt so gut wie keine Ägypter, die &lt;a href=&quot;http://en.wikipedia.org/wiki/Geography_of_Egypt&quot;&gt;nicht auf den Nil angewiesen
sind&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;[T]he Nile Valley and Nile Delta are the most important regions,
being the country's only cultivable regions and supporting about
99% of the population ...&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Wenn dieser Vertrag von den Ländern stromaufwärts ratifiziert wird,
dann könnte das gut die Grundlage des ersten ernsthaften und in aller
Öffentlichkeit ausgetragenen Wasserkrieges werden. &amp;ndash;
Im Gegensatz zu Gaza und der West Bank, wo &lt;a href=&quot;http://www.chomsky.info/articles/20040223.htm&quot;&gt;die Intention Israels, den
Palästinensern die Wasserzufuhr abzuschneiden&lt;/a&gt;, häufig
vernachlässigt wird.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">git: find absolute path to tracked file</title>
    <link href="http://blog.plenz.com/2011-03/git-find-absolute-path-to-tracked-file.html" />
    <updated>2011-03-08T03:22:00+01:00</updated>
    <id>http://blog.plenz.com/2011-03/git-find-absolute-path-to-tracked-file</id>
    <content type="html">&lt;p&gt;If you need to name a blob by name, you can't trust Git to honor the
current working directory. If you are in a subdir, &lt;code&gt;git show
HEAD^:file&lt;/code&gt; won't work unless you prepend the subdirectory name.&lt;/p&gt;

&lt;p&gt;But there's a sort of &lt;code&gt;basename&lt;/code&gt; for absolute paths within a Git repo:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git ls-tree --name-only --full-name HEAD file
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This honors &lt;code&gt;$PWD&lt;/code&gt; and thus returns a pathname that's unique across
the repository. You can build a simple &quot;diff to previous version&quot;
script with this now:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/sh

test ! -z &quot;$1&quot; || exit 1
temp=${1%.*}.HEAD^1.$$.${1#*.}
fullpath=`git ls-tree --name-only --full-name HEAD^ $1`

test ! -z &quot;$1&quot; || exit 2

echo &quot;extracting '$fullpath' from HEAD^...&quot;
git show HEAD^:$fullpath &amp;gt; $temp
vim -fd $1 $temp
echo &quot;cleaning up...&quot;
rm $temp
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This can act as a simplified &lt;code&gt;mergetool&lt;/code&gt; when you just want to
&lt;em&gt;review&lt;/em&gt; changes made to some file.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Revolution und Wahlen in Subsahara-Afrika?</title>
    <link href="http://blog.plenz.com/2011-03/revolution-und-wahlen-in-subsahara-afrika.html" />
    <updated>2011-03-02T10:52:00+01:00</updated>
    <id>http://blog.plenz.com/2011-03/revolution-und-wahlen-in-subsahara-afrika</id>
    <content type="html">&lt;p&gt;Al Jazeera hat einen &lt;a href=&quot;http://english.aljazeera.net/indepth/features/2011/02/201122164254698620.html&quot;&gt;interessanten Artikel&lt;/a&gt;, der die Tunesische
bzw. Ägyptische Revolution und die Bedeutung für den &lt;em&gt;afrikanischen&lt;/em&gt;
Kontinent beleuchtet &amp;ndash; im Gegensatz zum Großteil der Medien, die
nur über die Implikationen für die Islamische Welt und Israel
berichten.&lt;/p&gt;

&lt;p&gt;Denn 2011 ist quasi das &quot;Mega-Wahljahr&quot; für den afrikanischen
Kontinent, denn:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Elections are scheduled in more than 20 countries across the
continent, including Zimbabwe and Nigeria.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Eine wichtige Erkenntnis ist natürlich die folgende:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&quot;I think it's important to keep in mind that African youth are far
more plugged in than most people realise. The spread in mobile
phones has made it possible for people to connect to applications
like Facebook or Twitter on their telephones,&quot; says Nanjala [a
political analyst at the University of Oxford]...&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Während das in den nordafrikanischen Staaten anscheinend wirklich der
Fall ist, konnte ich dieses Phänomen in Tansania bzw. den umliegenden
Ländern nicht beobachten; dort ist zwar eine Teils sehr gute
Mobilfunkinfrastruktur vorhanden &amp;ndash; die Telefone aber sind in den
seltensten Fällen Smartphones, und die Provider bieten meist keinen
Internetzugang an.&lt;/p&gt;

&lt;p&gt;Nanjala hat einen weiteren guten Punkt, der gerade auch im deutschen
Sprachraum häufig falsch verstanden wird (siehe &quot;Twitter- und
Facebook-Revolution&quot;):&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&quot;At the same time, I think most analysts are overstating the
influence of social media on the protests.&quot;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Wesentlich ist nicht Facebook, sondern die Kommunikation. Was für die
Jugendlichen vor ein paar Jahren noch Foren, und vor ein paar mehr
Jahren noch E-Mail und Newsgruppen &amp;ndash; das sind heute Facebook und
Twitter. Es ist also vielmehr eine &quot;Vernetzungsrevolution&quot;, ganz
unabhängig von der verwendeten Plattform. Man nutzt nunmal, was man
hat.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&quot;There are lots of Africans too who are young, unemployed, who see
very few prospects for their future in countries ruled by the same
old political elite that have ruled for 25 or 30 or 35 years,&quot; says
CSM [Chrstian Science Monitor] Africa bureau chief Scott Baldauf.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Diese Situation ist natürlich vor allem in den von Landflucht schwer
destabilisierten Hauptstädten der Länder prävalent. Die Frage ist nur:
Wird sich die Revolution auch &quot;entzünden&quot;, oder bleibt es bei einigen
wenigen Protestlern?&lt;/p&gt;

&lt;p&gt;Und da spricht Baldauf einen sehr wichtigen Punkt an, den man nicht
vernachlässigen darf:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&quot;All the same dry wood of bad governance is stacked in many African
countries, waiting for a match to set it alight,&quot; says Baldauf. &quot;But
it takes leadership. It takes civil society organisation,&quot; something
the CSM Africa bureau chief fears countries south of the Sahara do
not have at the same levels as their North African neighbours.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;So eine Revolution passiert nicht einfach so. Auch wenn das alles sehr
spontan aussieht auf den Bildern und in den Berichten &amp;ndash; dahinter
steckt eine unglaubliche Menge an Organisation, die mit einer
gleichsam starken Willensstärke (meist geprägt durch Hass statt
Resignation) ausgeführt wird.&lt;/p&gt;

&lt;p&gt;Apropos: Im Osten Libyens scheint diese Selbstorganisation ziemlich
gut zu funktionieren. Wie das so nach einer Revolution aussieht, kann
man bei &lt;a href=&quot;http://www.zeit.de/politik/ausland/2011-02/fs-libyen-28-02-2&quot;&gt;dieser Fotostrecke der Zeit&lt;/a&gt; sehen, die meisten der Fotos
sind aus &lt;a href=&quot;http://en.wikipedia.org/wiki/Bengasi&quot;&gt;Bengasi&lt;/a&gt;, einer Hafenstadt im Osten Libyens, in der ca.
ein Zehntel der libyschen Bevölkerung lebt.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">git: forget recorded resolution</title>
    <link href="http://blog.plenz.com/2011-03/git-forget-recorded-resolution.html" />
    <updated>2011-03-01T05:24:00+01:00</updated>
    <id>http://blog.plenz.com/2011-03/git-forget-recorded-resolution</id>
    <content type="html">&lt;p&gt;Git's &lt;a href=&quot;http://www.kernel.org/pub/software/scm/git/docs/git-rerere.html&quot;&gt;rerere&lt;/a&gt; is immensely useful. However, if you erroneously
record a &lt;em&gt;wrong&lt;/em&gt; conflict resolution, it's not entirely clear how to
delete it again. The preimage file is stored under
&lt;code&gt;$GIT_DIR/rr-cache/some-sha1-sum/preimage&lt;/code&gt;, which is not a convenient
place to look for that one wrong resolution if you have hundreds of
them. ;-)&lt;/p&gt;

&lt;p&gt;However, &lt;code&gt;v1.6.6-9-gdea4562&lt;/code&gt; introduced rerere's &lt;code&gt;forget&lt;/code&gt; subcommand,
which was not documented until recently (&lt;code&gt;v1.7.1.1-2-g2c64034&lt;/code&gt;). So
when rerere replays a wrong resolution onto your file, simply use &lt;code&gt;git
rerere forget path/to/file&lt;/code&gt; to forget the wrong resolution.&lt;/p&gt;

&lt;p&gt;To (temporarily) replace the resolved version with the originial
version containing conflict markers, use &lt;code&gt;git checkout -m --
path/to/file&lt;/code&gt;. You can then issue a &lt;code&gt;git rerere&lt;/code&gt; to replay the
resolution again.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">vi mode in GNU readline</title>
    <link href="http://blog.plenz.com/2011-02/vi-mode-in-gnu-readline.html" />
    <updated>2011-02-28T11:56:00+01:00</updated>
    <id>http://blog.plenz.com/2011-02/vi-mode-in-gnu-readline</id>
    <content type="html">&lt;p&gt;I am stuck in a course about computer algebra systems. We are using
&lt;a href=&quot;http://www.singular.uni-kl.de/&quot;&gt;Singular&lt;/a&gt;. I searched for some minutes how to switch on the vi mode on
the Singular command line, but apparently, there is none.&lt;/p&gt;

&lt;p&gt;However, since Singular uses the GNU readline libs, you can simply &lt;a href=&quot;http://tiswww.case.edu/php/chet/readline/readline.html#SEC22&quot;&gt;switch to
vi mode&lt;/a&gt; with Ctrl-Meta-j. &amp;ndash; How convenient is that. I wonder if
there's a possibility to configure readline to switch to vi mode by default.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">criss-cross subtree merges</title>
    <link href="http://blog.plenz.com/2011-02/criss-cross-subtree-merges.html" />
    <updated>2011-02-19T19:55:00+01:00</updated>
    <id>http://blog.plenz.com/2011-02/criss-cross-subtree-merges</id>
    <content type="html">&lt;p&gt;Note to self: It is bad to rely on Git's magic of finding out whether
you can fast-forward when doing a merge. The more clever way is to
explicitly state what you want to do with aliases:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;nfm = merge --no-ff     # no-ff-merge
ffm = merge --ff-only   #    ff-merge
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I stumbled upon this today when I played around with subtree merges.
Strangely, the results with the &lt;em&gt;strategy&lt;/em&gt; &lt;code&gt;subtree&lt;/code&gt; were not the same
as with &lt;code&gt;recursive&lt;/code&gt;'s &lt;code&gt;subtree=path&lt;/code&gt; option:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git merge -s recursive doc
$ git merge -Xsubtree=Documentation doc
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Turns out that &amp;ndash; in the special case I had created &amp;ndash; Git
could fast-forward the branch although it was a subtree merge,
effectively ignoring any strategy option. Duh. I had already read,
understood and tried all the tests related to merging before I had
figured &lt;em&gt;that&lt;/em&gt; out.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Zathura</title>
    <link href="http://blog.plenz.com/2011-02/zathura.html" />
    <updated>2011-02-15T18:38:00+01:00</updated>
    <id>http://blog.plenz.com/2011-02/zathura</id>
    <content type="html">&lt;p&gt;I like small, clean software, that focuses on keyboard usability.
&lt;a href=&quot;http://pwmt.org/&quot;&gt;PWMT&lt;/a&gt;, &quot;programs with movie titles&quot;, has a nice and fast(!) PDF
viewer called Zathura. The user interface looks just like Vimperator
(or Vimprobable, for that matter). I like!&lt;/p&gt;

&lt;p&gt;The config file syntax is not documented. (Only on the web site, which
is not available at the moment.) So you'll have to change the colors
within &lt;a href=&quot;git://pwmt.org/zathura.git&quot;&gt;the code&lt;/a&gt; itself. &lt;code&gt;libpoppler-glib-dev&lt;/code&gt; is required to
build Zathura.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">&quot;Blood in the Mobile&quot;</title>
    <link href="http://blog.plenz.com/2011-02/blood-in-the-mobile.html" />
    <updated>2011-02-13T20:07:00+01:00</updated>
    <id>http://blog.plenz.com/2011-02/blood-in-the-mobile</id>
    <content type="html">&lt;p&gt;Ich habe Freitag &lt;a href=&quot;http://videos.arte.tv/de/videos/blood_in_the_mobile-3688340.html&quot;&gt;bei Arte&lt;/a&gt; die deutsche Übersetzung eines
Dokumentarfilmes über Mineralienhandel im Kongo (DR), &lt;a href=&quot;http://bloodinthemobile.org/&quot;&gt;&quot;Blood In the
Mobile&quot;&lt;/a&gt; gesehen. Der Film beleuchtet den folgenden Sachverhalt:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Im Kongo werden diverse Mineralien, die wir u.a. für die Verwendung
in Mobiltelefonen benötigen, unter unmenschlichen Bedingungen
abgebaut.&lt;/li&gt;
&lt;li&gt;Der Bergbau im Ostkongo wird von Rebellentruppen und autonomen
Splittergruppen ehemaliger Militärs kontrolliert, die von den
illegal erhobenen Zöllen leben (man könnte es auch Schutzgelderpressung
nennen).&lt;/li&gt;
&lt;li&gt;Firmen wie Nokia wissen seit 2001, dass sie sog.
&quot;Konfliktmineralien&quot; in ihren Telefonen verbauen. Die Pressesprecher bei
Nokia können aber bei aller Beteuerung irgendwie nicht den Eindruck erwecken,
dass sie sich wirklich darum kümmern würden.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Der Film bietet diverse beeindruckende Bilder. So zum Beispiel am
Anfang die Korruptionsszene mit dem Wasserverkäufer, oder die
provisorischen Dörfer und Grenzposten (mit Plastikstühlen) nahe der
Minen. Die Szenen im eigentlichen Bergwerk sind bestürzend. In dem
Teil der Doku, der im Osten des Kongo spielt, sprechen die Leute sehr
viel Kiswahili.&lt;/p&gt;

&lt;p&gt;An dieser Stelle möchte ich gerne auf das &lt;a href=&quot;http://blogs.taz.de/kongo-echo/&quot;&gt;Kongo-Echo&lt;/a&gt;
hinweisen, das Blog des taz-Korrespondenten Dominic Johnson. Dort
schreibt er regelmäßig zu Themen, die vor allem den Ostkongo
betreffen. Unter anderem über &lt;a href=&quot;http://blogs.taz.de/kongo-echo/2010/11/01/pluenderung_als_kongo-kriegsverbrechen/&quot;&gt;folgendes&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Können Unternehmen, die Rohstoffe aus den Kriegsgebieten im Osten
der Demokratischen Republik Kongo, wegen Mitverantwortung für
Kriegsverbrechen dort haftbar gemacht werden?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Im September 2010 hatte der kongolesische Präsident Joseph Kabila ein
Bergbauverbot für den gesamten Ostkongo verhängt (Kongo-Echo dazu:
&lt;a href=&quot;http://blogs.taz.de/kongo-echo/2010/09/28/bergbauverbot_im_ostkongo_i/&quot;&gt;Teil 1&lt;/a&gt;, &lt;a href=&quot;http://blogs.taz.de/kongo-echo/2010/10/01/bergbauverbot_im_ostkongo_ii/&quot;&gt;Teil 2&lt;/a&gt;, &lt;a href=&quot;http://blogs.taz.de/kongo-echo/2010/10/06/bergbauverbot_im_ostkongo_iii_und_schluss/&quot;&gt;Teil 3&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Ich finde den Kongo faszinierend, und würde gerne einmal dahin reisen.
Allerdings kann ich das in absehbarer Zeit noch nicht verwirklichen
&amp;ndash; nicht, weil es zu gefährlich ist, sondern weil man im
Zweifelsfall sehr viel Geld braucht (sprich: hundert oder mehr Dollar
am Tag), um entsprechende Bestechungsgelder zu zahlen. Sonst kommt man
da als Weißer möglicherweise in sehr hässliche Situationen, je nachdem
wo und wie man dort lang reist. Ich habe mal einen  &lt;a href=&quot;http://amzn.com/1841622338&quot;&gt;sehr guten
Reiseführer über DR Congo und Congo-Brazzaville&lt;/a&gt; gelesen, den ich
nur jedem empfehlen kann, der dort hin reisen will.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">git tracking branch management</title>
    <link href="http://blog.plenz.com/2011-02/git-tracking-branch-management.html" />
    <updated>2011-02-10T16:33:00+01:00</updated>
    <id>http://blog.plenz.com/2011-02/git-tracking-branch-management</id>
    <content type="html">&lt;p&gt;There are different approaches 'round the net on how to deal with git
remote tracking branches in an effecient way. Some people have
written Ruby gems (&lt;em&gt;uggh&lt;/em&gt;) that introduce lots of not-so-intuitive git
subcommands to manage all kinds of tracking branches.&lt;/p&gt;

&lt;p&gt;In recent versions of Git however, I have no need for these scripts. I
can live with the following aliases:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;lu = log ..@{u}
ft = merge --ff-only @{u}
track = branch --set-upstream
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To track a branch, I enter &lt;code&gt;git track master origin/master&lt;/code&gt;, for
example. (By the way, if you create a new branch and want to push it
to a remote, use &lt;code&gt;push -u&lt;/code&gt; &amp;ndash; it will automatically set up your
current branch to track the remote branch you just created.)&lt;/p&gt;

&lt;p&gt;Then, my regular workflow looks like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git remote update     # fetch changes
$ git lu                # log ..upstream -- review changes
$ git ft                # ff tracking branch -- integrate
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The key here is using &lt;code&gt;@{u}&lt;/code&gt;, which is a short form of &lt;code&gt;@{upstream}&lt;/code&gt;,
a reference to the upstream branch (that is, the branch your &lt;code&gt;HEAD&lt;/code&gt; is
tracking). This special notation first appeared in Git 1.7.0.&lt;/p&gt;

&lt;p&gt;If you're not sure about the current status of your branches and what
they are tracking, simply use &lt;code&gt;git branch -vv&lt;/code&gt;. You'll find the
tracking information in brackets just before the commit description.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">&quot;Unser Browser ist schneller&quot;</title>
    <link href="http://blog.plenz.com/2011-02/unser-browser-ist-schneller.html" />
    <updated>2011-02-06T19:16:00+01:00</updated>
    <id>http://blog.plenz.com/2011-02/unser-browser-ist-schneller</id>
    <content type="html">&lt;p&gt;Lacher bei der Sonntagabendlektüre der taz: Der Geschäftsführer der
Mozilla-Foundation &lt;a href=&quot;http://www.taz.de/1/leben/taz-medienkongress-2011/artikel/1/wir-verbinden-freibier-mit-werten-1/&quot;&gt;auf die Frage, was das Besondere an Firefox
sei&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Unser Browser ist schneller, ...&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Das erinnert mich irgendwie an &lt;a href=&quot;http://www.die-witze-seite.de/witze/bauern-witz-nr-49&quot;&gt;diesen Witz&lt;/a&gt; -- man muss nur einen
viel langsameren Konkurrenten auftreiben, schon erscheint Firefox
schnell. Wobei... sogar der Internet-Explorer scheint mir heutezutage
ähnlich schnell zu sein.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Egypt's net censorship and DNS tunneling</title>
    <link href="http://blog.plenz.com/2011-02/egypts-net-censorship-and-dns-tunneling.html" />
    <updated>2011-02-03T18:19:00+01:00</updated>
    <id>http://blog.plenz.com/2011-02/egypts-net-censorship-and-dns-tunneling</id>
    <content type="html">&lt;p&gt;I got a call yesterday &amp;ndash; from Egypt. It was around noon local
time, i.e. shortly after Egypt's government &lt;a href=&quot;http://english.aljazeera.net/news/middleeast/2011/02/201122113055781707.html&quot;&gt;had restored regular
internet access&lt;/a&gt; (&lt;a href=&quot;http://bgpmon.net/blog/?p=480&quot;&gt;see also&lt;/a&gt;, &lt;a href=&quot;http://stat.ripe.net/egypt/&quot;&gt;more graphs&lt;/a&gt;). At the
time of the call, I didn't know that, though.&lt;/p&gt;

&lt;p&gt;The guy asked me whether I could help him set up &lt;a href=&quot;http://www.dnstunnel.de&quot;&gt;DNS tunneling&lt;/a&gt;.
Today, he called again and inquired how things were going. He told me
he wanted to have a backup internet connection if things would get
messy again.&lt;/p&gt;

&lt;p&gt;I think, however, that DNS tunneling wouldn't be able to bypass the
internet block. &lt;a href=&quot;http://www.pcmag.com/article2/0,2817,2376863,00.asp&quot;&gt;On the day of the shutdown&lt;/a&gt; (Jan 27th, shortly
before midnight UTC),&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&quot;Approximately 3,500 individual &lt;a href=&quot;http://en.wikipedia.org/wiki/Bgp&quot;&gt;BGP routes&lt;/a&gt; were withdrawn, leaving no
valid paths by which the rest of the world could continue to exchange
Internet traffic with Egypt's service providers, ... Virtually all
of Egypt's Internet addresses are now unreachable, worldwide.&quot;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;For a more technical analysis, see &lt;a href=&quot;http://bgpmon.net/blog/?p=450&quot;&gt;this BGPmon blog post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What this means is that Egypt was essentially split off the net. Thus,
even a DNS query from inside Egypt (which would be relayed to a server
in, say, Germany) could not be forwarded by the provider's DNS
servers. Neither could a DNS request from Germany reach a name server
located in Egypt. &lt;a href=&quot;http://countermeasures.trendmicro.eu/egypt-the-plague-of-darkness/&quot;&gt;This blog post&lt;/a&gt; claims that the providers
did shut down DNS access as well (which wouldn't matter much in that
situation, anyway).&lt;/p&gt;

&lt;p&gt;So, to evade this blockade (i.e., IP won't get routed) it takes more
than just trying to sneak data out using covert IP channels.&lt;/p&gt;

&lt;p&gt;There are other methods, of course. Protesters &lt;a href=&quot;http://english.aljazeera.net/news/middleeast/2011/02/201122113055781707.html&quot;&gt;set up a voice to
tweet converter&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&quot;Over the weekend we came up with the idea of a speak-to-tweet
service &amp;ndash; the ability for anyone to tweet using just a voice
connection,&quot; they said.&lt;/p&gt;

&lt;p&gt;Voice mail messages left at +16504194196; +390662207294 or
+97316199855 will instantly be converted into text messages,
referred to as tweets, and posted at Twitter with an identifying
&quot;hashtag&quot; of &lt;code&gt;#egypt&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;You could use other radio infrastructure as well to communicate with
other countries, which would then feed your data stream into the net.
That's not possible on a large scale and for the typical user,
however.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Firefox: Open in Browser</title>
    <link href="http://blog.plenz.com/2011-02/firefox-open-in-browser.html" />
    <updated>2011-02-01T23:49:00+01:00</updated>
    <id>http://blog.plenz.com/2011-02/firefox-open-in-browser</id>
    <content type="html">&lt;p&gt;It's been bothering me for years. There are a lot of file types that
are essentially plaintext, but are labeled differently to make the
browser's/mailer's decision easier which program is best to handle
this type of file. For example, &lt;code&gt;text/x-diff&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now, how hard could it be to include a little checkbox &quot;display in
browser&quot; in the file download dialog? I mean, it's &lt;em&gt;text&lt;/em&gt; after all.
But, apparently, &lt;a href=&quot;https://bugs.launchpad.net/firefox/+bug/25830&quot;&gt;it is quite hard&lt;/a&gt;. Yes, that's no display
failure, that thing has been suggested at the end of 1999 and the bug
report pushed back and forth since then. Stupid morons.&lt;/p&gt;

&lt;p&gt;However, there's a nice &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/open-in-browser/&quot;&gt;addon&lt;/a&gt; which does just this job.&lt;/p&gt;

&lt;p&gt;On a related note, since the last upgrade, opening context or dropdown
menus will take Firefox up to 30 seconds sometimes. No heavy CPU or
disk usage, the application just freezes.&lt;/p&gt;

&lt;p&gt;I hope I'll find some time during the next few weeks to migrate to
&lt;a href=&quot;http://www.uzbl.org/&quot;&gt;a&lt;/a&gt; &lt;a href=&quot;http://www.vimprobable.org/&quot;&gt;saner&lt;/a&gt; &lt;a href=&quot;http://surf.suckless.org/&quot;&gt;alternative&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Google: Fast search result retrieval</title>
    <link href="http://blog.plenz.com/2011-01/google-fast-search-result-retrieval.html" />
    <updated>2011-01-31T02:23:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/google-fast-search-result-retrieval</id>
    <content type="html">&lt;p&gt;This whole Google jQuery autosuggestion bothers the hell out of me. I
mean, why would you use several keystrokes and possibly the mouse to
find a page, continuously requesting suggestions in the background?&lt;/p&gt;

&lt;p&gt;Often I use Google to find a page I can pretty safely identify with
some simple keywords. For example, in an IRC conversation I want to
give someone a link to Al Jazeera's page about current events in
Egypt.&lt;/p&gt;

&lt;p&gt;Stupid way: 1. fire up browser, 2. enter search terms in address bar
(:tabopen in Vimperator), 3. wait for the kilobytes to trickle through
the line, 4. find your way around the page, 5. select link, 6. copy it
somehow, 7. switch back to IRC window, 8. paste URL. Estimated time
amount: ranging from anywhere between 10 seconds to 30 seconds.&lt;/p&gt;

&lt;p&gt;Clever way: write a shell script to extract &quot;I am feeling lucky&quot;
result.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/sh

test -z &quot;$1&quot; &amp;amp;&amp;amp; exit 1

URL=&quot;`curl -s -i -e 'http://www.google.com' -A 'Firefox 23' \
    -G -d hl=en -d btnI=lucky --data-urlencode q=\&quot;$1\&quot; \
    http://www.google.com/search | grep '^Location:' | \
    head -n 1 | cut -d' ' -f2 | tr -d '\r\n'`&quot;

echo -n &quot;$URL&quot; | (xclip -i -display :0 -loops 0 ) &amp;amp;
/home/feh/bin/notify-wrapper &quot;Google 1st result&quot; &quot;$URL&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(Footnote: You need a more or less sensible User-Agent string (&lt;code&gt;-A&lt;/code&gt;) as
well as a request on &lt;strong&gt;www&lt;/strong&gt;.google.com, otherwise you won't be served a
result.)&lt;/p&gt;

&lt;p&gt;Then, bind a key to open a prompt in which you'll enter your search
term. For awesome, this is:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;awful.key({ modkey }, &quot;g&quot;,
  function ()
    awful.prompt.run({ prompt = &quot;Google: &quot; },
      mypromptbox[mouse.screen].widget,
      function (s)
        awful.util.spawn(&quot;/home/feh/bin/glucky '&quot; .. s .. &quot;'&quot;)
      end,
      nil, nil)
  end
),
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;notify-wrapper&lt;/code&gt; script uses DBus's &lt;code&gt;notify-send&lt;/code&gt; to make a little
notification box appear as soon as the URL is retrieved (which is,
like, instantaneous).&lt;/p&gt;

&lt;p&gt;Clever way works like this now: 1. Press Mod1-g, 2. enter search term,
3. paste URL. Time you need to find a popular link: Time to type
search string + 1 second. Huge time saver.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Upgrading to Gitolite and CGit</title>
    <link href="http://blog.plenz.com/2011-01/upgrading-to-gitolite-and-cgit.html" />
    <updated>2011-01-31T00:42:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/upgrading-to-gitolite-and-cgit</id>
    <content type="html">&lt;p&gt;I finally found some time to update the git version used on my server.
It's running a 1.7.1 now, which is just &lt;em&gt;slightly&lt;/em&gt; better than the
previous 1.5 version. ;-)&lt;/p&gt;

&lt;p&gt;Debian package maintainers bother me again, though. The simply erase
the &lt;code&gt;git&lt;/code&gt; user and put a &lt;code&gt;gitdaemon&lt;/code&gt; user in it's place, without
asking for confirmation. Will probably happen with the next upgrade,
too...&lt;/p&gt;

&lt;p&gt;Now, having a recent git version enables me to set up &lt;a href=&quot;https://github.com/sitaramc/gitolite&quot;&gt;gitolite&lt;/a&gt;
instead of the old gitosis. Setup is easy, straight-forward and
described in many places.&lt;/p&gt;

&lt;p&gt;I used &lt;a href=&quot;http://idl0r.qasl.de/blog/index.php/2010/11/07/migrating-from-gitosis-to-gitolite&quot;&gt;this script&lt;/a&gt; to convert my existing &lt;code&gt;gitosis.conf&lt;/code&gt; to match
gitolite's syntax; I noticed a major hiccup though: &lt;a href=&quot;http://sitaramc.github.com/gitolite/doc/2-admin.html#gwd&quot;&gt;setting a
description automatically enables gitweb access&lt;/a&gt;. I had to read
the source to find this out, because I couldn't remember it from the
docs and it didn't once cross my mind that you could actually &lt;em&gt;want&lt;/em&gt;
the behaviour to be like that. &amp;ndash; As in, you could just describe
a project without wanting to make it public &amp;ndash; no?&lt;/p&gt;

&lt;p&gt;However, with gitolite, I can finally use &lt;a href=&quot;http://hjemli.net/git/cgit/&quot;&gt;CGit&lt;/a&gt; too (because only
gitolie produces a &lt;code&gt;repositories.list&lt;/code&gt; which is in the format that
CGit understands, ie. without description appended to the lines).&lt;/p&gt;

&lt;p&gt;So now the repository page is &lt;a href=&quot;http://git.plenz.com/&quot;&gt;all new and shiny&lt;/a&gt;. See, for
example, this &lt;a href=&quot;http://git.plenz.com/dwm/commit/&quot;&gt;side-by-side diff&lt;/a&gt;. Nice, and faster than Gitweb.&lt;/p&gt;

&lt;p&gt;Integrating CGit with Lighttpd was another two-hour
fiddle-try-fail-repeat session. I finally came up with this snippet:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$HTTP[&quot;host&quot;] =~ &quot;^git\.(plenz\.com|feh\.name)(:\d+)?$&quot; {
  alias.url = (
    &quot;/cgit.css&quot; =&amp;gt; &quot;/usr/share/cgit/cgit.css&quot;,
    &quot;/cgit.png&quot; =&amp;gt; &quot;/usr/share/cgit/cgit.png&quot;,
    &quot;/cgit.cgi&quot; =&amp;gt; &quot;/usr/lib/cgi-bin/cgit.cgi&quot;,
    &quot;/&quot;         =&amp;gt; &quot;/usr/lib/cgi-bin/cgit.cgi&quot;,
  )
  cgi.assign = ( &quot;.cgi&quot; =&amp;gt; &quot;&quot; )
  url.rewrite-once = (
    &quot;^/cgit\.(css|png)&quot; =&amp;gt; &quot;$0&quot;,
    &quot;^/.+&quot; =&amp;gt; &quot;/cgit.cgi$0&quot;
  )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It's important here that you noop-rewrite the CSS and PNG file to
make Lighty expand the alias. Also, rewriting to an absolute filepath
won't work; that's why the &lt;code&gt;cgit.cgi&lt;/code&gt; aliases have to appear twice.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Straßen im Sudan</title>
    <link href="http://blog.plenz.com/2011-01/stra%C3%9Fen-im-sudan.html" />
    <updated>2011-01-31T00:30:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/straßen-im-sudan</id>
    <content type="html">&lt;p&gt;Man kann sich nur schwer klarmachen, &lt;em&gt;wie&lt;/em&gt; verlassen und
unterentwickelt manche Landstriche in Afrika sind, vor allem abseits
der Küstenlinien.&lt;/p&gt;

&lt;p&gt;Angesichts der Abstimmung über die Abspaltung des Südsudan, die Anfang
Januar stattfand, sieht man das aber wieder sehr gut. Al Jazeera zieht
einen &lt;a href=&quot;http://english.aljazeera.net/news/africa/2011/01/201111513594958973.html&quot;&gt;anschaulichen Vergleich&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;UN helicopter crews will assist organisers in picking up ballot
papers from the remote countryside of a vast, underdeveloped region
which has just 40km (25 miles) of paved road for an area the size of
France and Belgium combined.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Heftig, heftig. Siehe auch &lt;a href=&quot;http://www.welt-in-zahlen.de/laendervergleich.phtml?indicator=123&quot;&gt;diese Auflistung von Ländern, sortiert
nach Straßendichte&lt;/a&gt;, auf der der Sudan auf Platz 168 von 175 liegt,
vor Mali, Niger, Tschad (genau so sehr Wüstenstaaten wie der Sudan)
und &amp;ndash; Grönland.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">add -p for new files</title>
    <link href="http://blog.plenz.com/2011-01/add--p-for-new-files.html" />
    <updated>2011-01-30T22:19:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/add--p-for-new-files</id>
    <content type="html">&lt;p&gt;If you have a file that's unknown to git (ie., it appears in the
&quot;untracked&quot; section of &lt;code&gt;git status&lt;/code&gt;), and you want to add only part of
the file to the index, git won't allow it: &lt;code&gt;No changes.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Instead, mark the file for adding, but without adding any actual line:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git add -N file
$ git add -p file
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;-N&lt;/code&gt; is short for &lt;code&gt;--intent-to-add&lt;/code&gt; and does just that: Create an
index entry with an empty content field.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Überhört: Hundedialoge</title>
    <link href="http://blog.plenz.com/2011-01/%C3%9Cberh%C3%B6rt-hundedialoge.html" />
    <updated>2011-01-28T12:08:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/Überhört-hundedialoge</id>
    <content type="html">&lt;p&gt;Eben im Park beim Joggen überhört: &quot;Die beschissene Welt wird ihre
Strafe noch bekommen...&quot; Normalerweise würde ich mich wundern, wenn
jemand so etwas vor sich hin murmelt. Allerdings war er mit seinem
Hund unterwegs. &amp;ndash; Ich glaube, die meisten Leute, die alleine mit
ihrem Hund gehen, denken so.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Bombenwetter</title>
    <link href="http://blog.plenz.com/2011-01/bombenwetter.html" />
    <updated>2011-01-28T12:04:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/bombenwetter</id>
    <content type="html">&lt;p&gt;Das &lt;a href=&quot;http://www.amazon.de/gp/product/B004FWPVWQ&quot;&gt;Neue Album von Pi&lt;/a&gt; ist draußen. Und es spricht mir aus dem Herzen:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Alle sind unzufrieden, doch ich find's eigentlich okay ... krempel' die
Ärmel hoch, hab genug vom Gemecker, geh raus &amp;ndash; Sonnebrille auf, es ist
Bombenwetter!&lt;/p&gt;&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Monrovia, Liberia</title>
    <link href="http://blog.plenz.com/2011-01/monrovia-liberia.html" />
    <updated>2011-01-28T11:03:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/monrovia-liberia</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;http://www.heise.de/tp/r4/artikel/34/34094/1.html&quot;&gt;Interessanter Artikel in der Telepolist&lt;/a&gt; über &lt;a href=&quot;http://de.wikipedia.org/wiki/Ausflaggung&quot;&gt;Ausflaggung&lt;/a&gt;
(&lt;a href=&quot;http://blog.fefe.de/?ts=b3bcf3a1&quot;&gt;via&lt;/a&gt;). Und wie immer: Wenn man genauer hinschaut, wird's
unappetitlich:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Das Schifffahrtsregister des Staates Liberia ist nicht etwa
in Afrika, sondern in Reston im US-Staat Virginia ansässig. Wer sein
Schiff nach Liberia ausflaggt, muss also nicht in die Bürgerkriegs-
und AIDS-Metropole Monrovia reisen, sondern kann ganz bequem über
das Internet in den USA gleich die zughörigen Briefkastenfirmen
mitbuchen. Von diesem Angebot machen auch deutsche Schiffsreeder bei
427 Schiffen Gebrauch - dass dadurch der Bürgerkrieg in
Liberia und Sierra Leone mit Genehmigung des deutschen
Verkehrsministeriums quersubventioniert wird, ist dabei nur eine
weitere Unappetitlichkeit im Flaggenstreit.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Nun, dass mit dem &quot;AIDS-verseuchte Metropole&quot; würde ich angesichts
einer geschätzten HIV-Infektionsrate von &lt;a href=&quot;https://www.cia.gov/library/publications/the-world-factbook/geos/li.html&quot;&gt;weniger als 2% in ganz
Liberia&lt;/a&gt; mal als gutgemeinte Übertreibung ansehen, da gibt's ja
Städte, die fünf- bis zehnmal so hohe Infektionsraten haben.&lt;/p&gt;

&lt;p&gt;Der zweite Bürgerkrieg ist 2003 zu Ende gegangen (das war einer dieser
Bürgerkriege, die den Filmen über Kindersoldaten Vorbild stehen). Aber
schön sind &lt;a href=&quot;http://www.nytimes.com/2009/05/21/opinion/21kristof.html&quot;&gt;die Zustände&lt;/a&gt; dort noch keinesfalls:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt; Of course, children are raped everywhere, but what is happening in
 Liberia is different. The war seems to have shattered norms and
 trained some men to think that when they want sex, they need simply
 to overpower a girl. Or at school, girls sometimes find that to get
 good grades, they must have sex with their teachers.&lt;/p&gt;

&lt;p&gt; “Rape is a scar that the war left behind,” said Dixon Jlateh, an
 officer in the national police unit dealing with sexual violence.
 “Sexual violence is a direct product of the war.”&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Aber solche kleine Unannehmlichkeiten kann man doch getrost ignorieren
&amp;ndash; so schlimm wird's nicht sein, und die Büros kann man ja in den
USA betreiben.&lt;/p&gt;

&lt;p&gt;Immer dieses beschissene Hintenrum.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">dec2bin for the poor</title>
    <link href="http://blog.plenz.com/2011-01/dec2bin-for-the-poor.html" />
    <updated>2011-01-26T21:18:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/dec2bin-for-the-poor</id>
    <content type="html">&lt;p&gt;Convert &lt;code&gt;0x53&lt;/code&gt; to binary, quick! &amp;ndash; Now you start to think: In
which language could you implement a &lt;code&gt;dec2bin&lt;/code&gt; function within a few
seconds? Or just do it with pen and paper, old school?&lt;/p&gt;

&lt;p&gt;But wait, there's poor man's &lt;code&gt;dec2bin&lt;/code&gt;!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ echo -n &quot;\x53&quot; | xxd -b
0000000: 01010011
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;;-)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Strip whitespace on rebase</title>
    <link href="http://blog.plenz.com/2011-01/strip-whitespace-on-rebase.html" />
    <updated>2011-01-25T17:12:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/strip-whitespace-on-rebase</id>
    <content type="html">&lt;p&gt;Normally, I &lt;a href=&quot;https://github.com/Feh/configs/blob/master/.gitstuff/myhooks/pre-commit&quot;&gt;use&lt;/a&gt; the following line in Git's &lt;em&gt;pre-commit&lt;/em&gt; hook:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git diff --cached --check || exit 1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This makes a &lt;code&gt;git commit&lt;/code&gt; abort if there are any whitespace-related
errors. However, if you have code that already has whitespace issues,
you can simply pass an option to &lt;code&gt;git rebase&lt;/code&gt; to automatically correct
them:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git rebase --whitespace=fix reference
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;N.B.: Rebase just passes this argument to the &lt;code&gt;git apply&lt;/code&gt; command.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Which files are accessed?</title>
    <link href="http://blog.plenz.com/2011-01/which-files-are-accessed.html" />
    <updated>2011-01-24T01:40:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/which-files-are-accessed</id>
    <content type="html">&lt;p&gt;Often, if you need to know which files are accessed during the startup
of an application, you are stuck searching for them in the manpage.
Also, probably not all of them are documented there.&lt;/p&gt;

&lt;p&gt;I use strace to find these files:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;strace -efile /usr/bin/program 2&amp;gt;&amp;amp;1 1&amp;gt;/dev/null | grep ^open | cut -d\&quot; -f2
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note that unless you place the &lt;code&gt;grep&lt;/code&gt; expression in between this will
give you all syscalls that involve files, i.e. also simple checks
whether a file exists or has a certain permission set.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Buch &amp;ndash; Wohlstand für viele</title>
    <link href="http://blog.plenz.com/2011-01/buch-wohlstand-f%C3%BCr-viele.html" />
    <updated>2011-01-22T17:56:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/buch-wohlstand-für-viele</id>
    <content type="html">&lt;p&gt;Ich versuche, von nun an jedes Buch, das ich gelesen habe (und lesenswert
finde) hier mehr oder weniger ausführlich zu besprechen.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.amazon.de/gp/product/3570551172&quot;&gt;&lt;img
style=&quot;float:left; margin: 0 .5em .5em 0; width:100px; border:0;&quot;
src=&quot;/img/jdsachs-wohlstand-fuer-viele.jpg&quot;
alt=&quot;Jeffrey D. Sachs: Wohlstand für viele&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Gerade eben bin ich mit dem Buch &lt;a href=&quot;http://www.amazon.de/gp/product/3570551172&quot;&gt;&quot;Wohlstand für viele&quot;&lt;/a&gt; von
&lt;a href=&quot;http://en.wikipedia.org/wiki/Jeffrey_D_Sachs&quot;&gt;Jeffrey D. Sachs&lt;/a&gt; fertig geworden. Das Buch könnte man wohl gut als
populärwissenschaftliche, breit aufgestellte Einführung in
Makroökonomie, Geographie und Umweltschutz bezeichnen. In jedem Fall
lesenswert!&lt;/p&gt;

&lt;p&gt;Sachs, der unter anderem vier Jahre Lang leider des UN-Projektes zur
Umsetzung der &lt;a href=&quot;http://de.wikipedia.org/wiki/Millennium-Entwicklungsziele&quot;&gt;Millenium-Entwicklungs-Ziele&lt;/a&gt; war, beschreibt anhand
vieler Beispiele im großen und kleinen, wie funktionierende
internationale Zusammenarbeit zu Themen wie Umweltschutz, Klimawandel
oder Entwicklungshilfe ausehen sollte.&lt;/p&gt;

&lt;p&gt;Viele der Phänomene und Probleme, die Sachs anspricht, kannte ich bzw.
habe sie schon selbst erlebt in Tansania. Zwei Sachen waren allerdings
fast völlig neu für mich:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sachs vertritt die These, dass wir die Weltbevölkerung
schnellstmöglich auf einem so niedrigen Niveau wie möglich
stabilisieren müssen &amp;ndash; bestenfalls bei acht Miliarden
Menschen. Das wird vor allem den von extremem Bevölkerungswachstum
geplagten Ländern (Subsahara-Afrika) helfen, aus mehreren Gründen:

&lt;ul&gt;
&lt;li&gt;Bei der Rate des aktuellen Bevölkerungswachstums muss (das
ohnehin weltweit gesehen unterdurchschnittlich fruchtbare)
Ackerland noch mehr Menschen ernähren; die Folge sind Übernutzung
(die zu Erosion und, wenn dies im großen Stil passiert, kurzzeitig
zu niedrigeren Erträgen und langfristig bis hin zu Verwüstung
führt) und Waldrodung, um neue Anbauflächen zu gewinnen.&lt;/li&gt;
&lt;li&gt;Die Befreiung aus der &quot;Armutsfalle&quot; kann nur dann erfolgen, wenn
einzelne Familien genug finanzielle Mittel haben, um ihren Kindern
eine vernünftige Ausbildung zu garantieren; das bedeutet, dass sie
statt auf Quantität auf Qualität setzen sollten, und lieber ihre
drei Kinder auf eine weiterführende Schule schicken sollten,
anstatt ihre acht Kinder nur auf Primärschulen und später aufs
Geld schicken zu können.&lt;/li&gt;
&lt;li&gt;Bei einer so rapide wachsenden Bevölkerung ist es bei
Infrastruktumaßnahmen schon fast vorprogrammiert, dass diese a) zu
klein dimensioniert oder, wenn auf das kommende
Bevolkerungswachstum eingestellt, b) nicht bezahlbar oder in
akzeptabler Zeit durchfürbar sind.&lt;/li&gt;
&lt;li&gt;Ein zurückgehender Jugendüberschuss wird der Stabilität der
gesamten Region zuträglich sein (siehe &lt;a href=&quot;http://en.wikipedia.org/wiki/Youth_bulge#Youth_bulge&quot;&gt;Youth Bulge&lt;/a&gt;, besonders
mit Augenmerk auf Darfur und die gesamte Region am Horn von Afrika).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Die oben schon erwähnten Millenium-Entwicklungs-Ziele. Von denen
hatte ich mal irgendwo gehört, aber sie nicht wirklich weiter
beachtet. Natürlich hält Sachs diese Ziele in seinem Buch sehr hoch,
und er erläutert auch gut die Motivationen, Probleme und bereits
erzielten Erfolge hinter einzelnen Teilprojekten.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Sachs erläutert außerdem einige Thesen, die nicht gerade neu, aber
auch nicht wirklich im Bewusstsein der Öffentlichkeit verankert sind:
Dass das Öl ausgeht, ist nicht das Problem, sondern, dass wir zu
langsam auf neue Energieträger migrieren; Ein Umschwung im Kampf gegen
den Klimawandel kann man beschleunigen, wenn man nur entsprechende
finanzielle Mittel für die Forschung bereitstellt; Entwicklungshilfe führt
nicht zu apathischer Empfängermentalität in Drittweltstaaten; Gut
geplante und entsprechend finanzierte Entwicklungshilfeprojekte lassen
sich durchaus in großem Stile (also z.B. landesweit, und nicht nur
regional stark begrenzt) erfolgreich durchführen; Erwirtschaftung von
Reichtum muss nicht auf Kosten Mittelloser (sprich: Ausbeutung)
basieren.&lt;/p&gt;

&lt;p&gt;Interessanterweise preist Sachs besonders Informationstechnologie als
Entwicklungskatalysator an. Das Internet auf der einen Seite, vor
allem aber unterstreicht er wiederholt die Nützlichkeit eines
funktionierenden Mobilfunknetzes, gerade in ländlichen Regionen.
(Siehe auch die &lt;a href=&quot;http://de.wikipedia.org/wiki/Grameen_Bank&quot;&gt;Grameen Bank&lt;/a&gt;, die &quot;Erfinder der Mikrokredite&quot;,
die das Projekt &lt;a href=&quot;http://www.villagephonedirect.org/contents/&quot;&gt;&quot;Village Phone&quot;&lt;/a&gt; initiiert haben.) &amp;ndash; Dass
Kommunikationstechnologie ein solcher Entwicklungskatalysator ist, war
mir zwar klar, allerdings hatte ich bisher nie das Gefühl, dass das
auf &quot;höheren Ebenen&quot; und von den (meist älteren) Leuten, die etwas zu
sagen haben, auch so gesehen wird.&lt;/p&gt;

&lt;p&gt;Das Buch ist leider wenig kritisch. Es wird nie adäquat auf die Rolle
von großen Lobbyorganisationen und Interessensverbänden eingegangen,
die die Politik häufig in Bahnen lenken, die nicht unbedingt vom
(kritischen) Volk gutgeheißen werden. Leider scheint doch vielfach das
Bild des &quot;Zahnlosen Papiertigers UN&quot; durch.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Bestellen bei Amazon</title>
    <link href="http://blog.plenz.com/2011-01/bestellen-bei-amazon.html" />
    <updated>2011-01-22T16:46:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/bestellen-bei-amazon</id>
    <content type="html">&lt;p&gt;Ich wollte eben Bücher bei Amazon bestellen. &lt;a href=&quot;http://www.amazon.de/Hopes-Prospects-Noam-Chomsky/dp/0141045302&quot;&gt;Hopes and Prospects&lt;/a&gt;
von Noam Chomsky erscheint aber im Taschenbuch erst in ein bis zwei
Wochen.&lt;/p&gt;

&lt;p&gt;Auf der Bestellseite hat mir Amazon dann mitgeteilt, dass alle Bücher
gemeinsam versandt werden (also auch die anderen erst ankommen werden,
wenn &lt;em&gt;Hopes and Prospects&lt;/em&gt; erschienen ist) &amp;ndash; und wenn ich das
getrennt versenden lassen würde, tät's mehr kosten.&lt;/p&gt;

&lt;p&gt;Da lass ich mich doch nicht lumpen &amp;ndash; ich habe einfach zwei
Einzelbestellungen aufgegeben. Komisches Konzept.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Religiöse Verfolgung von Nichtreligiösen</title>
    <link href="http://blog.plenz.com/2011-01/religi%C3%B6se-verfolgung-von-nichtreligi%C3%B6sen.html" />
    <updated>2011-01-17T20:21:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/religiöse-verfolgung-von-nichtreligiösen</id>
    <content type="html">&lt;p&gt;Ich beobachte schon seit geraumer Zeit die &lt;a href=&quot;http://www.giordano-bruno-stiftung.de/&quot;&gt;Giordano-Bruno-Stiftung&lt;/a&gt;.
Interessantes Detail aus dem Jahresrückblick:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Auch die von der gbs mitinitiierte Kampagne &quot;Asyl für Ex-Muslime&quot; konnte 2010
einen ersten Erfolg verbuchen: Siamak Zare, Gründungsmitglied des Zentralrats
der Ex-Muslime, erhielt 2010 den Flüchtlingsstatus, womit erstmals
behördlicherseits anerkannt wurde, dass auch religionsfreie Menschen religiös
verfolgt werden.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Der Sprecher der Stiftung, Michael Schmidt-Salomon, hat außerdem für die
Stiftung das lesenwerte &lt;a href=&quot;http://www.amazon.de/Manifest-evolution%C3%A4ren-Humanismus-zeitgem%C3%A4%C3%9Fe-Leitkultur/dp/3865690114&quot;&gt;Manifest des evolutionären Humanismus&lt;/a&gt; geschrieben.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">ACPI interface in /proc deprecated</title>
    <link href="http://blog.plenz.com/2011-01/acpi-interface-in-proc-deprecated.html" />
    <updated>2011-01-16T21:53:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/acpi-interface-in-proc-deprecated</id>
    <content type="html">&lt;p&gt;With a new kernel, &lt;code&gt;/proc/acpi/battery/*&lt;/code&gt; was suddenly missing. Turns
out it the interface is &lt;a href=&quot;http://cateee.net/lkddb/web-lkddb/ACPI_PROCFS_POWER.html&quot;&gt;is deprecated&lt;/a&gt; but can be turned on with a
config option at compile time. The same information is available in a
different form in the &lt;code&gt;/sys&lt;/code&gt; filesystem.&lt;/p&gt;

&lt;p&gt;I didn't see that coming; almost all programs I use to check the
battery state fail. It had been announced, &lt;a href=&quot;http://www.mail-archive.com/debian-kernel@lists.debian.org/msg45954.html&quot;&gt;actually&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;The correct way is for upstream to announce the change in
feature-removal-schedule.txt, which they did 2 years ago.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;That's roughly how the &lt;a href=&quot;http://en.wikiquote.org/wiki/The_Hitchhiker's_Guide_to_the_Galaxy#Chapter_3&quot;&gt;Vogon Hyperspace Planning Council&lt;/a&gt;
operates. Stubborn dev &lt;a href=&quot;http://www.mail-archive.com/debian-kernel@lists.debian.org/msg45943.html&quot;&gt;replies&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;If the tools are not able to use them, it is their bug. No bug in
the kernel.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;However, after &lt;a href=&quot;http://git.sysphere.org/vicious/commit/?id=7be560b7&quot;&gt;updating vicious&lt;/a&gt; and &lt;a href=&quot;https://github.com/Feh/configs/commit/6f8e064669cc42741fab22b1243b851c87a7564d&quot;&gt;adjusting some API
changes&lt;/a&gt;, everything works fine again.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Dubstep &amp;ndash; it's kinda like that</title>
    <link href="http://blog.plenz.com/2011-01/dubstep-its-kinda-like-that.html" />
    <updated>2011-01-16T21:11:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/dubstep-its-kinda-like-that</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;/img/dubstep_its_kinda_like_that.jpg&quot;
style=&quot;border:0;&quot;&gt;&lt;img
src=&quot;/img/dubstep_its_kinda_like_that.jpg&quot;
alt=&quot;Dubstep -- it's kinda like that&quot;
width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Petition für Offene WLANs</title>
    <link href="http://blog.plenz.com/2011-01/petition-f%C3%BCr-offene-wlans.html" />
    <updated>2011-01-16T20:31:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/petition-für-offene-wlans</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;https://epetitionen.bundestag.de/index.php?action=petition;sa=details;petition=15983&quot;&gt;Petition: Netzzugang &amp;ndash; Rechtsnorm für Zugang zu kabellosen Netzwerken&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Derzeit ist der Betreiber eines WLAN auf Grund der Rechtsprechung
verpflichtet, sein Netzwerk mit der verfügbaren Technik gegen Zugriffe
Dritter zu sichern. Obwohl dem Gesetzgeber bekannt ist, dass die
Verschlüsselungsmethoden erfolgreich angegriffen wurden, droht dem Besitzer
eines WLAN-Zugangspunkt ggf. Repressionen zivil- oder strafrechtlicher Natur,
wenn er auf eine Verschlüsselung verzichtet und sein WLAN im Sinne einer
sozial gerechten Gesellschaft teilt.&lt;/p&gt;&lt;/blockquote&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Using OpenWRT (again)</title>
    <link href="http://blog.plenz.com/2011-01/using-openwrt-again.html" />
    <updated>2011-01-14T21:38:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/using-openwrt-again</id>
    <content type="html">&lt;p&gt;The old and cheap wifi router we used in our flat got buggy; it had
some 20% packet loss at times, and the LAN clients were not able to
make connections to each other (only WAN connections were possible).&lt;/p&gt;

&lt;p&gt;So I dug up my old WRT54G, reset the factory settings, and used that
one as access point. This worked for about one week; today, when I
came home, the internet connection would not work any more.&lt;/p&gt;

&lt;p&gt;Ping statistics from the router (delivered to the web interface)
showed that the internet connection was established. However, the
router would not forward internet traffic from the LAN.&lt;/p&gt;

&lt;p&gt;An hour ago I installed &lt;a href=&quot;http://openwrt.org/&quot;&gt;OpenWRT&lt;/a&gt;. I had been using it some years
ago and was astonished that &quot;White Russian&quot; is still the stable
release. Anyhow, there's a web interface now which is pretty nice.
(With a link &quot;Review settings&quot;, where you'll get a shell script that
will get executed once you hit &quot;apply&quot; &amp;ndash; nice if you want to
find out the commands!)&lt;/p&gt;

&lt;p&gt;There was some manual work to do, I leave this for search engines in
case someone else has these issues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WPA2-PSK setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;WPA2 is &lt;em&gt;not natively supported&lt;/em&gt;. Although the nvram keys exist, the
wifi driver cannot use them properly. &lt;code&gt;iwconfig&lt;/code&gt; will display
&lt;code&gt;Encryption key:off&lt;/code&gt; regardless of what you configure.&lt;/p&gt;

&lt;p&gt;To make WPA2 work, install the &lt;code&gt;nas&lt;/code&gt; package (&lt;a href=&quot;http://wiki.openwrt.org/oldwiki/openwrtdocs/nas&quot;&gt;documentation&lt;/a&gt;). The
&lt;code&gt;/etc/init.d/S41wpa&lt;/code&gt; script actually manages WPA2 settings (and
retrieves the configuration keys from nvram):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# ipkg install nas
# /etc/init.d/S41wpa restart
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The relevant nvram keys for my wireless are:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;wl0_akm=psk psk2
wl0_crypto=tkip+aes
wl0_ssid=...
wl0_wpa_psk=...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;PubKey Authentication with DropBear&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Simple, once you know it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ scp ~/.ssh/id_dsa.pub root@192.168.1.1:/etc/dropbear/authorized_keys
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;NTP&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Keep up to date!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# nvram set ntp_server=time.fu-berlin.de
# nvram commit
# ipkg install ntpclient
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Interestingly, the signal strength and bandwidth throughput is better
with OpenWRT than using the LinkSys firmware. :-)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Automatic screenshot processing</title>
    <link href="http://blog.plenz.com/2011-01/automatic-screenshot-processing.html" />
    <updated>2011-01-11T21:31:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/automatic-screenshot-processing</id>
    <content type="html">&lt;p&gt;Cut out window borders and application bars from screenshots
automatically: note down some corner points (in Gimp), then use
ImageMagick:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;for f (*.png) { convert -crop 975x559+2+30 $f $f; }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Task done!&lt;/p&gt;

&lt;p&gt;NB: This command replaces file contents. So when not
sure about the numbers, append some extension to it and view the
results first. Or, simply kepp the images in a git controlled
directory. That way, a simple &lt;code&gt;git reset -- .&lt;/code&gt; will restore your
previous images if you added them in the first place.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Kamusi and jQuery</title>
    <link href="http://blog.plenz.com/2011-01/kamusi-and-jquery.html" />
    <updated>2011-01-10T23:10:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/kamusi-and-jquery</id>
    <content type="html">&lt;p&gt;So some years ago I was what what one would call a Web Designer, doing
CSS and XHTML 1.0 and that stuff. I got bored, however, and nowadays I
hate these websites that are so over-styled and have so much
JavaScript in there. I have been turning away from any web-related
stuff since the times writing valid XHTML 1.0 was still &quot;in&quot;.&lt;/p&gt;

&lt;p&gt;However... today I tried this whole &quot;Use JavaScript instead of regular
links and reloads&quot; stuff out. Friends of mine suggested using
&lt;a href=&quot;http://jquery.com/&quot; title=&quot;jQuery homepage&quot;&gt;jQuery&lt;/a&gt;, of which I grabbed the &quot;mini&quot; version. (There have been
some really clever code golfers at work to shrink the whole library
down to some 77K. In that format, it's barely human-readable, though.)&lt;/p&gt;

&lt;p&gt;jQuery is nice, because it doesn't have many JavaScript parts in it.
The &quot;usual&quot; stuff seems to work by simply combining elementary jQuery
functions, for which there's a &lt;a href=&quot;http://api.jquery.com/&quot;&gt;great API documentation&lt;/a&gt;, and
identifying HTML objects in a syntax similar to CSS.&lt;/p&gt;

&lt;p&gt;So without really understanding how and why it works, I created a
Web2.0-ish version of my &lt;a href=&quot;https://github.com/Feh/kamusi-cli/tree/cgi&quot;&gt;kamusi command line client&lt;/a&gt;. Kamusi is
the &lt;a href=&quot;http://en.wikipedia.org/wiki/Kiswahili&quot;&gt;Kiswahili&lt;/a&gt; word for
&lt;em&gt;dictionary&lt;/em&gt;, and the program I wrote is a text-based interface
written in Perl for the extensive database of words from
&lt;a href=&quot;http://kamusi.org/&quot;&gt;http://kamusi.org/&lt;/a&gt;. Their web search, however, is very slow and
irritating to use.&lt;/p&gt;

&lt;p&gt;My hack-away implementation of a cleaner, faster search using jQuery
and a custom CGI to retrieve the results can be found at
&lt;a href=&quot;http://k.plenz.com&quot;&gt;http://k.plenz.com&lt;/a&gt;. Some sample queries you might try: &lt;code&gt;-nia&lt;/code&gt;,
&lt;code&gt;bongo&lt;/code&gt; or &lt;code&gt;-pa&lt;/code&gt;. Source code is availabe &lt;a href=&quot;https://github.com/Feh/kamusi-cli/tree/cgi&quot;&gt;in the &quot;cgi&quot; branch on
Github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This jQuery stuff is hard to debug, actually. (JavaScript in general
is, IMO.) However, the syntax is pretty straight-forward. I do
realize now why so many of these Web2.0 pages use this fading and
scrolling-in stuff so much (and &lt;a href=&quot;http://jqueryui.com/demos/autocomplete/&quot;&gt;autosuggest&lt;/a&gt;, as well!). It's just
plain easy and provides a feel of using a &quot;dynamic application&quot;.&lt;/p&gt;

&lt;p&gt;I can understand now why these Web Designers are so proud of
themselves.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Wikileaks mass mirroring project</title>
    <link href="http://blog.plenz.com/2011-01/wikileaks-mass-mirroring-project.html" />
    <updated>2011-01-09T22:26:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/wikileaks-mass-mirroring-project</id>
    <content type="html">&lt;p&gt;Since a day after Wikieleaks called for &lt;a href=&quot;http://cablegate.wikileaks.org/Mass-mirroring-Wikileaks.html&quot;&gt;mass mirroring support&lt;/a&gt;
I've been hosting a Wikileaks mirror at &lt;a href=&quot;http://wikileaks.feh.name&quot;&gt;http://wikileaks.feh.name&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you're curious how to allow to upload files via &lt;a href=&quot;http://samba.anu.edu.au/rsync/&quot;&gt;rsync&lt;/a&gt;, but
just to a certain directory with no possibility to access other system
parts, take a look at &lt;code&gt;rrsync&lt;/code&gt;, which should ship with rsync. On a
Debian system, simply do:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# cp /usr/share/doc/rsync/scripts/rrsync.gz /usr/bin
# gunzip /usr/bin/rrsync.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, I have this line in &lt;code&gt;~wl/.ssh/authorized_keys&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;command=&quot;rrsync www&quot; ssh-rsa AAAAB3N[...]w== wwwsync@wikileaks.org
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So any rsync mirroring command issued will have a &lt;code&gt;$HOME/www/&lt;/code&gt;
prepended. Thus, the wikileaks upload script can only modify files
below a certain subdirectory. If you touch the file &lt;code&gt;rrsync.log&lt;/code&gt;, each
login will be logged as well.&lt;/p&gt;

&lt;p&gt;Now, there are &lt;a href=&quot;http://cablegate.wikileaks.org/Mirrors.html&quot;&gt;some 1400 sites&lt;/a&gt; mirroring the content now. How to
access a random mirror, then? The German &lt;em&gt;taz&lt;/em&gt; had a &lt;a href=&quot;http://bewegung.taz.de/aktionen/support-wikileaks/beschreibung&quot;&gt;call for
action&lt;/a&gt; page with a &lt;a href=&quot;http://www.taz.de/~thoralf/wikileaks.tar.bz2&quot;&gt;strange bash script&lt;/a&gt; which would always
link to the first mirror in the list.&lt;/p&gt;

&lt;p&gt;However, there are more clever approaches. &lt;a href=&quot;http://wikileaks.de&quot;&gt;http://wikileaks.de&lt;/a&gt;, for
example, uses &lt;a href=&quot;http://en.wikipedia.org/wiki/Round_robin_DNS&quot;&gt;round robin DNS&lt;/a&gt; to display the cablegate pages of a
randomly chosen host. However, there seem to be only five hosts
registered yet:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ( repeat 100 host wikileaks.de ) | cut -f3 | sort -n | uniq -c
    100 85.214.146.40
    100 87.230.26.252
    100 87.239.128.202
    100 88.198.21.150
    100 178.63.249.117
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I just registered my IP to show up there. &lt;a href=&quot;http://mirrors.wikileaks.de/&quot;&gt;You can,
too!&lt;/a&gt; (Be sure to click the &quot;commit
changes&quot; radio button when you receive the confirmation link!)&lt;/p&gt;

&lt;p&gt;Another possibility is to point your browser to
&lt;a href=&quot;http://r.whereiswikileaks.org/&quot;&gt;http://r.whereiswikileaks.org/&lt;/a&gt;, which emits a 302 HTTP header
(&quot;found&quot;) and adds a Location header to redirect you to a randomly
selected mirror:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ curl http://r.whereiswikileaks.org/ -s --head | grep Location:
Location: http://wikileaks.my-niap.org
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Some french guy made &lt;a href=&quot;http://wikileaks.siwhine.org/swn-stats/&quot;&gt;interesting pie charts&lt;/a&gt; about the
distribution of the 1400 mirrors. German mirrors are most common
(30% of all active), mirrors from the US, France, Germany and the
Netherlands combined make up more than three quarter of all active
mirrors. There are &lt;a href=&quot;http://labs.vis4.net/wikileaks/mirrors/&quot;&gt;other vizualizations&lt;/a&gt;, too.&lt;/p&gt;

&lt;p&gt;Finally, there's a site &lt;a href=&quot;http://wl.mattiasgeniar.be/&quot;&gt;grouping wikileaks mirrors by
netblock&lt;/a&gt;. Interestingly, more than 100 mirrors are within German
ISP Hetzner's netblock (whose position on Wikileaks hosting &lt;a href=&quot;http://www.netzpolitik.org/2010/keine-wikileaks-mirrors-bei-hetzner/&quot;&gt;had not
been clear entirely&lt;/a&gt; during the first few days).&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">X41 keyboard problem</title>
    <link href="http://blog.plenz.com/2011-01/x41-keyboard-problem.html" />
    <updated>2011-01-06T21:23:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/x41-keyboard-problem</id>
    <content type="html">&lt;p&gt;Today I fixed that annoying keyboard problem I &lt;a href=&quot;/2011-01/tuning-old-hardware-with-slow-hard-drive.html&quot;&gt;talked about
earlier&lt;/a&gt;. It was really simple: &lt;a href=&quot;http://www-307.ibm.com/pc/support/site.wss/MIGR-54595.html&quot;&gt;remove keyboard&lt;/a&gt;, clean
contacts, put it back in.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Heizung</title>
    <link href="http://blog.plenz.com/2011-01/heizung.html" />
    <updated>2011-01-06T00:46:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/heizung</id>
    <content type="html">&lt;p&gt;Die vergangenen Tage dachte ich, ich sei zu blöde, um meine Heizung zu
bedienen. Nun habe ich das Thermostat abgeschraubt und festgestellt,
dass der Stift nicht raus kommt (je weiter raus &amp;ndash; desto wärmer).&lt;/p&gt;

&lt;p&gt;So eine Temperatur wie gerade in meinem Zimmer wünscht sich jedes
Rechenzentrum.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update:&lt;/em&gt; Ich habe die Heizung gerade mit einer Flachzange und etwas
Olivenöl repariert.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Tuning old hardware with slow hard drive</title>
    <link href="http://blog.plenz.com/2011-01/tuning-old-hardware-with-slow-hard-drive.html" />
    <updated>2011-01-05T23:54:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/tuning-old-hardware-with-slow-hard-drive</id>
    <content type="html">&lt;p&gt;My main work machine is a pretty old &lt;a href=&quot;http://www.thinkwiki.org/wiki/Category:X41&quot;&gt;X41&lt;/a&gt; with a 40GB hard disk
and 512MB of RAM. It is more than five years old and is not without
problems. (In recent months, I have to try several before switching it
on successfully &amp;ndash; in most cases, it just beeps twice and
displays &quot;Keyboard error, &amp;lt;F1&amp;gt; to configure&quot; and the keyboard
doesn't work.)&lt;/p&gt;

&lt;p&gt;However, there's a thing which annoys me a lot: bad performance.
I use a &lt;a href=&quot;http://awesome.naquadah.org/&quot; title=&quot;awesome window manager&quot;&gt;resource-friendly window manager&lt;/a&gt; with some &lt;code&gt;urxvt&lt;/code&gt;s
running. Apart from the memory-hog Firefox, I very seldom use any
graphical application (ie. any program using the GTK or Qt libraries).&lt;/p&gt;

&lt;p&gt;For some weeks now I've been trying &lt;a href=&quot;http://marc.info/?l=linux-kernel&amp;amp;m=128993691017646&quot;&gt;this cgroups hack&lt;/a&gt;, with
mixed results. In some cases, the performance is better, sometimes
it's not.&lt;/p&gt;

&lt;p&gt;How bad could the overall performance be, then? &amp;ndash; Unfortunately,
very bad. Which has, in part, to do with my slow hard disk. It does
uncached reading with 18MB/s in theory:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo hdparm -t /dev/sda
/dev/sda:
 Timing buffered disk reads:   56 MB in  3.08 seconds =  18.21 MB/sec
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In reality, it's rather some 16.5MB/s:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ dd if=/dev/zero of=./zero bs=1048576 count=256
256+0 records in
256+0 records out
268435456 bytes (268 MB) copied, 10.0246 s, 26.8 MB/s

$ time cat zero &amp;gt; /dev/null
cat zero &amp;gt; /dev/null  0.01s user 0.25s system 1% cpu 16.246 total
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, I have to live with this (SSD's are still very expensive!). The
main problem here is that the Kernel swaps out data that wasn't
accessed for a while (although, from a na&amp;iuml;ve perspective, there's
no ultimate need to do so since there's still free memory left).&lt;/p&gt;

&lt;p&gt;I actually notice that with two programs regularly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When I hadn't taken a look at Firefox for a few minutes, it might
take up to 10(!) seconds to redraw the window.&lt;/li&gt;
&lt;li&gt;When I hadn't opened an &lt;code&gt;urxvt&lt;/code&gt; for some time, opening a new one
might take up to 5 seconds; initializing the shell another two.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Now I always thought this was the Linux Kernel being stupid. However I
discovered a switch today. From the &lt;a href=&quot;http://www.kernel.org/doc/Documentation/sysctl/vm.txt&quot;&gt;sysctl.vm documentation&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;swappiness

This control is used to define how aggressive the kernel will swap
memory pages.  Higher values will increase agressiveness, lower values
decrease the amount of swap.

The default value is 60.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Debian (like all other distros) seem to keep this default value. After
reading up on &lt;a href=&quot;http://www.pythian.com/news/1913/&quot;&gt;some&lt;/a&gt; &lt;a href=&quot;http://kerneltrap.org/node/3000&quot;&gt;articles&lt;/a&gt; I set &lt;code&gt;vm.swappiness=0&lt;/code&gt; in
&lt;code&gt;/etc/sysctl.conf&lt;/code&gt;. (You can do this interactively with &lt;code&gt;sysctl -w
vm.swappiness=0&lt;/code&gt; also. Interestingly, &lt;a href=&quot;https://help.ubuntu.com/community/SwapFaq#What%20is%20swappiness%20and%20how%20do%20I%20change%20it?&quot;&gt;Ubuntu recommends a value of
10&lt;/a&gt; for desktop systems.)&lt;/p&gt;

&lt;p&gt;For the past day or so, I have been monitoring the output of &lt;code&gt;vmstat
1&lt;/code&gt; every now and then (especially the swap in/out parameters &lt;code&gt;si&lt;/code&gt; and
&lt;code&gt;so&lt;/code&gt;). But even after the first hour one thing is evident: the
&lt;em&gt;interactive&lt;/em&gt; system performance is much, &lt;em&gt;much&lt;/em&gt; better. It feels like
a machine upgrade.&lt;/p&gt;

&lt;p&gt;Terminals open instantly (because the initialization parts of their
binary doesn't get swapped out, for example). Switching to Firefox is
instant. Switching tabs is fast. The system feels a lot more
responsive.&lt;/p&gt;

&lt;p&gt;Where's the drawback, then? If you could magically tune your system's
performance, why wouldn't you want do that?&lt;/p&gt;

&lt;p&gt;A case where this setup will give you a headache is when you actually
&lt;em&gt;do&lt;/em&gt; run out of memory. I easily accomplished that by opening Gimp on
a huge (blank) file. Now, working with Gimp is easy now; switching to
Firefox takes ages (heavy swapping). So there a not-so-agressive
swapping policy would be better if you switch between several
memory-hogging applications a lot.&lt;/p&gt;

&lt;p&gt;(Side note: When there's a lot of free memory left &amp;ndash; for example
after closing Gimp &amp;ndash; the kernel step by step swaps in certain
blocks again, a few every second so as to not disturb system
performance. I saw this going on for several minutes on a otherwise
completely idle system.)&lt;/p&gt;

&lt;p&gt;Conclusion: For the usage pattern I'm accustomed to, setting
&lt;code&gt;vm.swappiness=0&lt;/code&gt; actually is a huge performance improvement. But your
mileage may vary.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">First post with posting tool</title>
    <link href="http://blog.plenz.com/2011-01/first-post-with-posting-tool.html" />
    <updated>2011-01-04T01:29:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/first-post-with-posting-tool</id>
    <content type="html">&lt;p&gt;This is my first post with a &lt;a href=&quot;http://www.plenz.com/tmp/code/sh/blogpost&quot; title=&quot;Source code of the script&quot;&gt;custom shell script&lt;/a&gt;. It
automatically adds a YAML header on top of new posts, starts an editor
on it and later converts the title to a nice filename.&lt;/p&gt;

&lt;p&gt;Eventually, the script adds and commits the new post to the git repo
and pushes the result. &quot;Recovering&quot; is supported &amp;ndash; sort of. ;-)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Excision Shambhala 2009 Mix</title>
    <link href="http://blog.plenz.com/2011-01/excision-shambhala-2009.html" />
    <updated>2011-01-03T23:05:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/excision-shambhala-2009</id>
    <content type="html">&lt;object height=&quot;225&quot; width=&quot;100%&quot;&gt; &lt;param name=&quot;movie&quot; value=&quot;http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Fplaylists%2F461827&amp;amp;show_comments=false&amp;amp;auto_play=false&amp;amp;show_playcount=true&amp;amp;show_artwork=false&amp;amp;color=66ff00&quot;&gt;&lt;/param&gt; &lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt; &lt;embed allowscriptaccess=&quot;always&quot; height=&quot;125&quot; src=&quot;http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Fplaylists%2F461827&amp;amp;show_comments=false&amp;amp;auto_play=false&amp;amp;show_playcount=true&amp;amp;show_artwork=false&amp;amp;color=66ff00&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;100%&quot;&gt;&lt;/embed&gt; &lt;/object&gt;


&lt;p&gt;   &lt;span&gt;&lt;a href=&quot;http://soundcloud.com/excision/sets/excision-shambhala-2009-mix&quot;&gt;Excision Shambhala 2009 Mix&lt;/a&gt; by &lt;a href=&quot;http://soundcloud.com/excision&quot;&gt;Excision&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Blog software</title>
    <link href="http://blog.plenz.com/2011-01/blog-software.html" />
    <updated>2011-01-03T18:41:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/blog-software</id>
    <content type="html">&lt;p&gt;Which blog software to take? &amp;ndash; Not a simple question to answer.&lt;/p&gt;

&lt;p&gt;I had my mind on &lt;a href=&quot;http://ikiwiki.info/&quot; title=&quot;The Ikiwiki Homepage&quot;&gt;Ikiwiki&lt;/a&gt;
for quite some time. I haven't got it working, though. After several
tries, I gave up. (The problem had in part something to do with an
outdated git version, which I cannot upgrade on the server without
going through quite some hassle.)&lt;/p&gt;

&lt;p&gt;I decided to use &lt;a href=&quot;https://github.com/mojombo/jekyll&quot;&gt;Jekyll&lt;/a&gt; now. As
with other &quot;static site generators&quot;, the documentation is pretty
rudimentary (and largely not very helpful). After some hours of
fiddling around, I finally found a way to integrate tags and a tag
cloud.
&lt;a href=&quot;http://ilkka.github.com/2010/11/21/jekyll-tag-cloud.html&quot;&gt;This blog post&lt;/a&gt;
has been very helpful, although I had to patch the file. Strangely,
also, Jekyll refused to load &lt;em&gt;any&lt;/em&gt; plugins when calling it like&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/var/lib/gems/1.8/bin/jekyll --no-auto &amp;lt;source&amp;gt; &amp;lt;destination&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To fix this, I set up git's &lt;code&gt;post-receive&lt;/code&gt; hook to &lt;code&gt;cd&lt;/code&gt; to that
directory first, and then call Jekyll with &lt;code&gt;.&lt;/code&gt; as source paramter.&lt;/p&gt;

&lt;p&gt;Time for a quick listing of pros and cons:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;pro&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write posts in &lt;code&gt;vim&lt;/code&gt; with Markdown syntax&lt;/li&gt;
&lt;li&gt;Store every modification in a git repo&lt;/li&gt;
&lt;li&gt;Publish with a simple &lt;code&gt;git push&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;strong&gt;contra&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Written in ruby (I'd have liked Perl much better)&lt;/li&gt;
&lt;li&gt;Lots of ruby/gem/rake/whatever stuff&lt;/li&gt;
&lt;li&gt;No extensive Documentation or User's Guide available&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The template mechanisms seem managable, though. As for security and
speed, the pages are generated &lt;em&gt;once&lt;/em&gt; (even for pagination stuff) and
are copied as simple static HTML pages to the web server. This is
nice.&lt;/p&gt;

&lt;p&gt;In the weeks to come I might publish the git repo of this blog where
&lt;a href=&quot;http://git.plenz.com/&quot;&gt;my other git repos are at&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title type="html">Starting a blog</title>
    <link href="http://blog.plenz.com/2011-01/first-post.html" />
    <updated>2011-01-01T23:42:00+01:00</updated>
    <id>http://blog.plenz.com/2011-01/first-post</id>
    <content type="html">&lt;p&gt;2011 is here. I will try to maintain a blog again. The last time I
gave up because I had nothing to write any more (I thought). I
discover, though, that a lot of people like to read what I write.&lt;/p&gt;

&lt;p&gt;So I have a blog again. I'll post random stuff here. Might just be
about UNIX tools; philosophy; math stuff; books I read; links I like.
English or German, -- maybe other languages in the future.&lt;/p&gt;

&lt;p&gt;Stay tuned. :-)&lt;/p&gt;
</content>
  </entry>
  
</feed>

