Daniel hat mir am Rande seines Vortrages in Bonn kürzlich ein Exemplar von Entschwörungstheorie. Niemand regiert die Welt überlassen. Ich hatte seinerzeit schon die selbstverlegte Variante gelesen, die ich zwar inhaltlich gut aber stilistisch ein wenig konfus und unredigiert fand. Das ist jetzt deutlich besser geworden, weshalb ich jedem nur empfehlen kann, es auch zu lesen.
Filed under Daniel Kulla, Verschwörungstheorie & no comments & no trackbacks
A note to myself: the next time left click is not working with Compiz Fusion I will just enable the screenshot plugin. This will fix it.
Filed under Compiz Fusion & no comments & no trackbacks
Ich bin der festen Überzeugung, dass einen Sendung mit der Maus über Konkurrenzverhältnisse in der Ökonomie mehr helfen würde als jede verschwendete Therapeuten-Stunde, wenn das Kind schon in den Brunnen gefallen ist, der Patient also bereits Wahnvorstellungen über die Nokia-Verschwörung entwickelt hat.
Von Anfang an: die Standorte konkurrieren auf verschiedenen Eben untereinander. Hamburg und Berlin streiten sich darum, wer die Lufthansa bekommt, Wiesbaden und Berlin darum, wer die Damen und Herren des BKA umsorgen darf und Bochum und Cluj eben um Nokia.
Bei der Entscheidung für diesen oder jenen Standort entscheiden die berühmten Standortfaktoren: Niedrige Lohnkosten können nicht schaden, tendenziell ist die Akzeptanz von Privateigentum von Vorteil, marodierende Banden helfen meist nicht, es sei denn sie helfen bei der Beseitigung von Bürgerrechtlern und Gewerkschaftern, Gewerkschafter sind zugleich aber auch nicht unbedingt ein Problem, das Modell Wolfsburg zeigt ja, wie man damit umzugehen vermag und Subventionen für interessierte Standortnutzer sind auch nicht das schlechteste.
Neben den sonstigen administrativen Aufgaben gehört für jeden Politiker ganz zentral zum Berufsbild, dem Standort zu dienen und seine Nutzer zu vermehren. Das ist der nordrhein-westfälischen Landesregierung mit Nokia bisher gelungen, nun aber wurde sie überboten.
Dass sie überboten wurden bringt nun lustige Artefakte zu Tage: Christa Toben – sie ist Wirtschaftsministerin – fiel über Nacht auf, dass Nokia die den Subventionsbescheiden zugrunde liegenden Beschäftigungszahlen nicht eingehalten hatte. Was nur bedeutet, dass ein Unternehmen wie Nokia solange Subventionsbestimmungen missachten kann, wie es die Standortwahl unangetastet lässt.
Struck gibt nun sein Handy zurück. Glaubt man der Berichterstattung über die Durchdringung der Politik mit modernen Technologien, so ist das ein Opfer, das ihn traumatisch schädigen wird. Das ganze Landwirtschaftsministerium soll mobile Endgeräte anderer Hersteller verwenden. Eine Entscheidung die die Firmenzentrale in Espoo erschüttern wird.
Interessanter aber wäre zu überlegen, warum heute noch irgendjemand glaubt in Deutschland auch nur irgendwie erfolgreich reine Industrieproduktion etablieren zu können. Warum einem also nichts besseres einfiel, als nach dem Wegfall von Kohle und Stahl im Ruhrgebiet auf die nächste Branche zu setzen, die planbar nur ein paar Jahre dort bleiben kann. Denn genau das wird für jene, die jetzt ihren Arbeitsplatz verlieren, zum Problem. Nur mit “eiskalten Managern” und fieser “Profitorientierung” hat das nichts zu tun.
Filed under Deutschland, Nokia, Politik, Standort & no comments & no trackbacks
Without words.
$ php -r 'var_dump(strpos("foo 11 bar", 11));'
int(4)
$ php --version
PHP 5.2.4-dev with Suhosin-Patch 0.9.6.2 (cli) (built: Oct 1 2007 14:16:42)
$ php -r 'var_dump(strpos("foo 11 bar", 11));'
bool(false)
$ php --version
PHP 5.2.5-pl1-gentoo with Suhosin-Patch 0.9.6.2 (cli) (built: Jan 9 2008 04:53:10)
Filed under PHP & nine comments & no trackbacks
As I previously mentioned we made some effort to better check exceptions. The target is not only ensuring that a various exception is thrown but also that this exception is really the one which is expected. The result was a patch for PHPUnit to test for the exception message (which is already in) and the exception code. As Sebastian mentioned in the PHPUnit 3.2.9 release announcement, the latter is now included too. Therefore a few new options are available.
Example will fail:
<?php
public function testException()
{
$this->setExpectedException('Exception', 'Exception message', 100);
throw new Exception('Invalid message', 10);
}
Example will pass:
<?php
public function testException()
{
$this->setExpectedException('Exception', 'Exception message', 100);
throw new Exception('Exception message', 100);
}
Specifying exception tests with the annotations syntax:
<?php
/**
* @expectedException Exception error message 100
*/
public function testException()
{
throw new Exception('error message', 100);
}
Another attractive new feature is the option to use namespaces as a test organization separators. Until now, the PEAR scheme was used for PHPUnit test (_ becomes the directory separator, .php is auto-attached). This means a test was called My_ObjectTest and was supposed to be located in My/ObjectTest.php. Thanks to a really simple patch the test location stays the same, while the class name might be changed to My::ObjectTest. Happy namespacing.
Filed under PHP, PHPUnit, Unit testing & five comments & no trackbacks
The current discussion about whether or not to use Smarty nowadays misses the point as it may simply depend on the environment. In a small development team, up to five people or so, you could just use the template-alike PHP syntax as all parts of the application are written by the same people with more or less equally shared responsibilities. This is what I would call a “single hands” process. Everything is done by everyone (that’s a bit oversimplified as in such environments intuitive structures emerging but let’s take it for now). This kind oft environment can often be found in startups and the like. This is were the process is really hands-on, the development process is often relatively agile as everyone is the others neighbour and there is often no explicit design stage. This is were you just ask your mate “hey, what’s the name of this template variable”. Such an environment has a lot of advantages but for sure a lot of disadvantages, often in terms of quality.
In other environments where responsibilities are much finer grained and balanced, a template engine might become a structural element of the development process as it represents a responsibility split between collegues. A template language is in fact an API for the user interaction/frontend developer. An API is a small subset of the factual possibilities, and this is where a template language might represents organisation prinicples. We as software developers define our API to encapsulate richer functionality and provide access to a well-thought (yeah, hopefully) subset of modification paths we want to allow on purpose. Just because the other guy does not need to know about the ugly internals. A good template language is a small subset of the language environment and exposes only functions which are really needed for view generation.
Beneath that, a template engine can structure the adoption of a pattern. Think about the MVC pattern, which is nowadays halfway common in web development environments. A template language in an MVC-alike environment enforces the usage of the view as “just a view”. While you would need to establish rules and procedures which subset of PHP is allowed correct for templating, a template engine establishs this rules and procedures implicitly. The other side of “do not try to solve social problems technically” is “do not try to solve technical problems socially”.
Filed under Architecture, Development, PHP, Smarty, Software, Software design & three comments & no trackbacks
Lately I was in need of a good documentation solution. Not just plain simple API documentation but more or less a tool which helps me to author technical manuals. There are a few approaches: the traditional solution with LaTeX and a number of converters (HTML, PDF, etc.), the more modern approach is DocBook which focuses on documentation not on typography and formatting as LaTeX does. Dita looked really promising too but the state of the toolchain explains fairly well why this is no option at all. One could say that there is just no state. The last option when nothing else fits is using a random Wiki technology or a simple text formatting tool like Textile or Markdown. I wanted to avoid that as I like to have a documentation toolkit with specific documentation semantics, not just a text formatter.
Back to DocBook: DocBook is first of all a huge grammar which scared me. The good thing is however, that most of the time you just need a rudimentary subset of it.
Until version 5.0 only DTDs were officially supported. I had have a hard time struggeling with DTDs in the past so I really wanted to avoid such trouble again. Additionally DTDs are painful to extend so having basic functionality like the XInclude extension is no fun.
Using 5.0 is also really brave from a toolchain perspective: xmllint from libxml2 insists on having a DTD even though modern format description grammars like Relax NG or XML Schema do not require them. I really like xmllint for – nobody would have guessed that – linting XML trees and resolving XML includes but it striked when not having a DTD. Finally the Sun MSV looked promising enough and worked out well, except that it is not willing to return with an exit code > 0 on failure. Also MSV is not capable of xincludes so I’m now having a three-step conversion of my DocBook 5 files: first of all sticking together the files via xincludes with xmllint (no validation, so no errors occur). Than validating the DocBook against a Relax NG scheme which is capable of Xincludes and finally running an XSLT transformation with good old xsltproc. PHPs DOMDocument theoretically provides relaxNGValidate() which could solve the problem as well but sadly there is no row/column information provided where the validation actually failed. Just knowing there is an error but not knowing where is somewhat useless for a validation tool.
After having solved the toolchain problem with the Sun Java Tool DocBook 5.0 was the way to go. No DTDs, specific semantics for technical documentation, even specific semantics for object documentation (like the ooclass- and ooexception-element).
While digging into DocBook 5.0 I found out that this version makes DocBook itself more XMLish, which is nice. A number of XML standards are now supported as is: the old “id” attribute for naming element references is now an xml:id-attribute from the XLink, there are default schemas for XInclude and MathML is incorporated. So far I’m happy with that.
Filed under DocBook, Documentation, LaTeX, OOP, PHP & 14 comments & no trackbacks
portage-mod_jabber is a small elog module for Gentoo’s portage which provides Jabber notification for portage. It basically allows to receive notifications via jabber when elog events occur. A few days ago #204125 was opened in the Gentoo bugtracker, which is obviously the wrong place to request features for software which is provided externally. But anyway, I took the idea of allowing the user to specify which Jabber resource to use and added the feature. Another facility in this context which might be helpful is to use hostname as a variable for the current hostname in the resource. So if you deploy a number of systems you can just specifiy “/systems/%hostname%” as the resource and the hostname will be replaced automatically. If you want to use this feature just edit /etc/make.conf and change PORTAGE_ELOG_JABBERFROM to something like user@host.com/resource:password. From now on, the version 0.0.3 is available here.
Hanno, would you mind bumping it?
Filed under Gentoo, Jabber, Portage, Software & three comments & no trackbacks
Of course, there are a lot of personal targets everyone will have for the next year. Stop smoking is typical, not mine, even I’m smoking. But for those working in the IT industry especially as a developer, David Coallier has a few useful hints how to improve your work by improving yourself. It is really a must-read.
Filed under Development, Management, Work & no comments & no trackbacks