22. Mai 2009
21. Mai 2009
Erfahrungsbericht Custom Skate “X-Tech Marathon”
Abdruck
Der Abdruck zum Skate wurde von inlinezentrum.de auf der Messe zum Köln Marathon genommen. Dazu wurde nach Mafia-Art der Fuß in einem Behälter eingegossen und nach Aushärten durch Teilen der Negativ-Form befreit. Durch Ausgießen der Form entstand der Abdruck vom Fuß. Der Skate hat kein echtes Fußbett, dafür kann man in der Form eine komfortable Position wählen, die dann später so auch im Skate vorhanden ist. Der Fuß wird ausserdem fotografiert und ein Abbild der Druckverteilung beim Auftreten wird genommen.
Lieferung
Viel zu lang, letztlich durch den Produzenten verursacht. inlinezentrum.de zeigte sich sehr kulant. In anderen Fällen war die Lieferzeit tatsächlich nur 6 Wochen.
Passform
Größe ist genau richtig, der Schuh hat an allen Stellen eine perfekte Breite, so dass es nicht drückt, ich aber auch nicht schwimme. Ich habe an beiden Füßen aussen ein Überbein (nicht vom Skaten), diese Problemstelle wurde perfekt ausgearbeitet.
Im hinteren Bereich umfasst der Schuh die Ferse sehr eng, was absolut verhindert, dass man nach oben schlupfen kann. Unabdingbar für einen guten Skate.
Im Knöchelbereich gab es zunächst große Probleme, nach den ersten Trainingseinheiten musste ich den Skate nach 1 Stunde dringend ausziehen, um ernsthafte Druckstellen auf dem Knöchel zu vermeiden. Durch ein wenig herumprobieren mit verschiedenen Einlegesohlen merkte ich, dass mit einer Einlegesohle im Fersenbereich (2-3mm) die Passform im Knöchelbereich deutlich besser ist. Ich habe mir eine entsprechende Sportschuhsohle besorgt und zu einem entsprechenden Fersenkeil zurecht geschnitten. Die Sohle habe ich mit doppelseitigem Klebeband eingeklebt. Fortan keine Probleme mehr im Knöchelbereich und auch die Ferse wird trotz des höheren Stands noch umschlossen ohne zu drücken. Ich habe den Eindruck, dass X-Tech den Skate im hinteren Bereich 2mm zu hoch gebaut hat.
Die Sohle im Fersenbereich:
Befestigung
Zum Einsteigen muss der Skate ganz geöffnet werden, damit der Fuß nach hinten in den Schuh geschoben werden kann. Daher muss eigentlich nicht viel nachbefestigt werden. Geschnürt werden muss nur locker, da drei Schnallen zur Verfügung stehen, mit denen der Schuh perfekt nachgezogen werden kann.
Materialqualität
Ich habe die Variante weiss mit matt-schwarz abgesetzt gewählt. Von dem schwarzen Material an den Stoßkanten vorne und seitlich hatte ich mir mehr Robustheit erhofft. Es wirkt fasst wie Filz und scheuert entsprechend schnell weg. Hier würde ich mir ein Kevlar-artiges Material oder ein gutes Leder wünschen. Ich habe zum Schutz schon mit Gewebeband nachgearbeitet.
Zum Innenmaterial kann ich noch nichts sagen. Es ist Geruchsneutral und weist bisher keinerlei Gebrauchsspuren auf. Ich fahre den Skate mit einer dünnen Socke.
Das filzige schwarze Material taugt als Stoßkante nicht. Gewebeband to the rescue!
Der Skate hat hinten 4 und vorne 5 Gewinde zur Schienenbefestigung, was reichlich Variationsmöglichkeiten bietet.
Nachformen
Am Innenfuß hatte ich nach einigen Wochen eine leichte Druckstelle. Das gleiche Problem hatte ich bei meinem Bont Custom vorher auch. Ich habe hier den Schuh folgendermaßen verformt:
- Problemstelle am Fuß mit einem Filzstift reichlich anmalen und dann Barfuß in den Skate steigen und in Skateposition hinstellen. So wird die Problemstelle markiert
- Schuh komplett in Alufolie eingeschlagen und nur die zu erhitzende Stelle (Durchmesser 2-3 cm) frei gelassen
- Mit einer Heißluftpistole 10 Min. aus 10-15cm Entfernung erhitzt
- Aussen einen Holzring mit einem Stück Holz oben drauf aufgesetzt und mit einer Schraubzwinge fixiert. Die Schraubzwinge habe ich so modifiziert, dass sie einen 1,5cm Durchmesser Rundkopf hat, den ich innen auf die Problemstelle aufgesetzt habe
- Schraubzwinge ordentlich fest ziehen und 20 Minuten auskühlen lassen
Der Schuh ließ sich so ohne weiteres Verformen. Im Gegensatz zu meinem Bont ZX4 (2004) Custom ist deutlich weniger Kraftaufwand nötig.
14. Mai 2009
GALORE nur noch digital
Die Print-Ausgabe der GALORE wird eingestellt. Leider hatten sich um den Kern, die guten Interviews, schon vor geraumer Zeit jede Menge überflüssige Begleitinformationen (Musik-Charts, Filmvorstellungen) angesammelt, die den Charakter des Hefts immer weiter in Richtung Boulevard-Beliebigkeit drängten. Dies gilt übrigens auch für die Optik des Hefts. Naja, in Zukunft sollen die Interviews offenbar online veröffentlich werden. (via sueddeutsche.de)
12. Mai 2009
An introduction to Domain Driven Design
My collegues asked me to write down some documentation on the basic concepts of domain driven design. Why not make a blog post out of it?
Domain Driven Design is all about the domain. The premise is, that what we call model, is the model of the real world process we are going to implement (the “domain”). DDD focuses on the domain of the problem, not on data, not on functions, not on control structures (although all of this stuff is used to implement them). Object technology fits pretty well into DDD as it allows us to narrow reality, as we can express behavior and state together (in an object).
A short glossary
Domain Layer
The layer in the application where the domain is expressed in terms of objects.
Domain Objects
All the objects in the domain layer
Entity
Entities are those domain objects that are equal by identity as they express a specific state of a specific entity in the system. Examples are a customer or a purchase.
Value Object
The opposite of entities in the domain layer. Objects that are equal because of equal values not because they are identical. A money object is a typical value object and so is an address.
Aggregate
An aggregate is an objects graph in the domain layer consisting of entity and value objects. A customer has a number of addresses and an order has a money value object.
Aggregate root
The top level object in an aggregate. In the customer example, the customer is the aggregate root and all the other objects are aggregations to the customer.
Repository
The repository acts like a Facade to the ORM components of a system. In DDD we focus only on the domain, we don’t care about ORM, we are ignorant against ORM. The repository allows us to be ignorant as it provides a simple, collection like interface to the user. Think of the repository as a factory to the persisted objects with a collection interface and being a facade to keep away all that sad details of ORM.
Ubiquitous Language
At the beginning everything is messy: you think that girl is stupid, she thinks you are a quirky nerd with strange hobbies and even more strange friends. A few dates later you both find an ubiquitous language which allows you to communicate efficiently. DDD encourages to find a set of terms to describe the system, that is modeled after the language of the domain. So the knowledge gathered in the development team about the domain is directly build into the systems core.
05. Mai 2009
03. Mai 2009
02. Mai 2009
Leaflet: PHP development in 2009
- Develop object-oriented code
- Avoid static cling
- Avoid global state
- Use dependency injection
- Use a framework if appropriate
- Refactor continuously
- Use a VCS, preferably a decentralized
- Have commit notifications configured
- Utilize continuous deployment
- Deploy with tools like capistrano
- Deploy phar files
- Test your code
- Use continuous integration to run tests, create and deploy artefacts
- Unit test your code with PHPUnit or SimpleTest
- Have database migration in place to ease schema changes, e.g. with dbdeploy
- Use build tools like phing or ant
- Have metrics configured and use them as a QA measure
- Have a code sniffer in place
- Acceptance tests with tools like Selenium
- Use rapid development tools like Zend Tool or cake
- A fresh checkout should be up and running in a few minutes
- Monitor your (production) systems
- Load monitoring with tools like Cacti
- Event reporting and monitoring with tools like Nagios (for the enterprise, there is nothing else)
- Use a bytecode cache
- Love your code
What do you think is the state of the art in 2009?
01. Mai 2009
links for 2009-05-01
-
Kickstarter is a funding platform for artists, designers, filmmakers, musicians, journalists, entrepreneurs, athletes, inventors, bloggers, philanthropists, explorers...
25. April 2009
23. April 2009
links for 2009-04-23
18. April 2009
13. April 2009
links for 2009-04-13
12. April 2009
10. April 2009
links for 2009-04-10
08. April 2009
links for 2009-04-08
-
Think Python is the manuscript of Python for Software Design, forthcoming from from Cambridge University Press. In support of Free Books, Cambridge has agreed to keep this manuscript available under the GNU Free Documentation License.
04. April 2009
Geschehen am 2009-04-04
- I just HAD TO link to this pic: http://tr.im/idTP #
- Enjoying Clara Belle’s first album. She’s the one with the ukulele from boingboing.tv/YouTube. http://tr.im/idVW #
- More Ukulele: William H. Macy plays and disses some well known colleagues. Fun! http://tr.im/idYx #
- This ukulele stuff on YouTube is what WireTap Pro/Studio were made for. #record #
- If you don’t have to cut or fade, Safari Stand and AudialHub (†) are an even easier to use team for getting YouTube stuff into iTunes. #
- It’s the first warm saturday in april. Felt 500.000 people are raiding the city to spend their earned (?) money. #
- H&M finally initiated the more useful one-waiting-line-system. Took them only a few years. #
Powered by Twitter Tools.
03. April 2009
Geschehen am 2009-04-03
- seems that I finally found out what excluded my tweets from my blog’s home page #
- I bought the @MacHeist 3 Bundle. 12 Top Mac apps worth $900+ for just $39 AND I just got Delicious Library 2 FREE! http://mhtweet.com/UT9Ftc #
- Quote @siegel: »Pure genius.« I agree. http://tr.im/iaOC #
Powered by Twitter Tools.
links for 2009-04-03
02. April 2009
Geschehen am 2009-04-02
- 1. Step: Installing Windows 2. Step: Downloading and installing Firefox 3 for Windows #
- lookint at a picture of a large green field and a blue sky #
- installing Windows, no joke #
- problems with converted Windows image, even our admin couldn’t solve. Trying to install »fresh« XP next. #hassle #annoyed #
- trying to convert an older parallels image into an VMWare image via VMware Converter. The wizard needs 12 not so simple steps. ARGH! #
- In the light of recent events, adding further strings to Twitterrific’s tweet filter. #
Powered by Twitter Tools.
01. April 2009
Geschehen am 2009-04-01
- Maybe I will believe it tomorrow #
- I don’t believe that! #
- Today I won’t believe anything! Even though … I don’t believe it. #
- Energy saver tip of the day: Hold back improbable news until tomorrow. #
Powered by Twitter Tools.
31. März 2009
Geschehen am 2009-03-31
- I can’t see @poolie. (new twitter mention-instead-of-reply test) #
Powered by Twitter Tools.
I can’t see @poolie. (new twit…
I can’t see @poolie. (new twitter mention-instead-of-reply test)
30. März 2009
I still like Mario Gomez and t…
I still like Mario Gomez and think, he’s a terrific striker. #soccer #germany
29. März 2009
Geschehen am 2009-03-29
- Twitpic fails. #
- Testing twitpic: [?] #
- Fringe, potato chips and Grimbergen #weekend #
- Test: Safari140 - Twitter extension for Safari http://tr.im/hVI4 #
- watched the match Liechtenstein vs. Germany for about 5 minutes. Totally boring. Back to Earl. Totally entertaining! #
Powered by Twitter Tools.
09. März 2009
Speaking at IPC Spring ’09
I’m giving a talk at International PHP Conference Spring Edition in May in Berlin. I will talk about Beatiful (PHP) code: code your mother domain experts can read, code that talks, code that reveals intention and what does it mean on the architecture side. So, a somewhat impractical and detached topic. I’m looking forward to see you in Berlin.
15. Februar 2009
Not having globals state doesn't mean you're doomed
A pretty popular myth about avoiding global state (singletons, multitons, registries, global variable, static variables/methods) is that it results in creating widely used objects more often than needed. The most common example in this case is a database connection. We try to avoid global state to let objects express their dependencies clearly: the object constructor should be as readable as “give me this, give me that and I will work”. Let’s talk about a situation where we instanciate a relatively complex set of domain objects including a service layer. For the example, we assume that we read an existing customer. We use the CustomerServiceLayer to retrieve the Customer, which uses the CustomerRepository to create the Customer object which needs a DatabaseConnection connection and passes a strategy (NameFormattingStrategy) to format the name of the customer to the Customer object and a CustomerDataMapper to allow the Customer object to save itself. Here are the constructor signatures of the involved components:
class Customer ...
public function __construct(
NameFormattingStrategy $nameFormattingStrategy
)
class CustomerRepository ...
public function __construct(
DatabaseConnection $connection,
CustomerDataMapper $dataMapper,
NameFormattingStrategy $nameFormattingStrategy
)
class CustomerServiceLayer ...
public function __construct(CustomerRepository $repository)
class CustomerDataMapper ...
public function __construct(DatabaseConnection $connection)
class DatabaseConnection ...
public function __construct(
string $host,
int $port,
string $username,
string $password,
string $database
)
So, all we do in the page controller, may it be a (page) controller or a plain PHP file is instanciating the service layer and its dependencies:
$databaseConnection = new DatabaseConnection(...);
$customerDataMapper = new CustomerDataMapper($databaseConnection);
$nameFormattingStrategy = new NameFormattingStrategy();
$customerRepository = new CustomerRepository(
$databaseConnection,
$customerDataMapper,
$nameFormattingStrategy
);
$serviceLayer = new CustomerServiceLayer($customerRepository);
$customer = $serviceLayer->getCustomerById((int)$_GET['customer_id]);
... pass it to the view, do nifty things ...
If other components, like the OrderRepository needs a database connection, just pass it to it. No need to let the order repository know how to get it. It is just there. In your unit test you can passed a mocked repository, a mocked database connection and a mocked data mapper depending on what particular part of the chain you are going to test. By the way: the heavy construction work could be easily passed to a number of factories just responsible for creating your objects. These factories are easily testable too as the only assertion made would be is the returned object correctly configured.
02. Februar 2009
A Tech Book a Day
When it comes to reading I’m coming from a different corner: I read a lot of philosophical books from philosophers like Adorno, Marcuse, Marx before I really started reading tech books. These books are hard to read, especially the works of the Frankfurt School are notorious for their specific language which is sometimes hard to decipher. Tech books are exactly the opposite: while there are entertaining technical writers with a good style a lot use a pretty common and dry vocabulary – which is a good thing. The thing is, you don’t really need to read tech books.
Novels, philosophical – and more general humanistic – works are much harder. They often transport semantics in metaphors you don’t get when just reading. You have to read a sentence more than once to get it. But when you read a book about Design Patterns, your favourite book on PHP or something similar non-algorithm related you can just scan the book for news, read and understand the code samples and go on, page per page. Scan through the page, take notes but just note what’s new to you. If it is a reference, mark the important parts with stickers. Ignore the rest, remember, don’t read, just scan.
Additionally technical books tend to have a foreword and a foreword for the second edition and a forward for the third edition and a lot of testimonials attesting how good this book is (hey, I already purchased it, don’t sell it to me again). So the real content starts at page 40. Excluding white pages the book that was 400 pages long might shrink to 300 pages. If you need 30 seconds per page that means you can read the book in two and a half hours. And 30 seconds per page a a pessimistic estimation. With this technique it is possible to read a technical book in a day without stress and totally relaxed in a week. That means you could read 52 tech books a year. I’m lame, I just read scanned around 20 last year.
30. Januar 2009
Brand New Toy
Mein neuer X-Tech Custom Skate ist da. Die Wartezeit hat sich gelohnt wie ich finde. Passform scheint gut, noch steht der Tacho aber bei Null. Hoffe er bewährt sich dann im Einsatz.
26. Januar 2009
Skatestrecke von Köln nach Bonn
Weil ich es gerade für jemanden in Google Maps aufgemalt habe. So skate ich von Köln nach Bonn:
18. Januar 2009
Flickr, flickr - New York Bilder komplett

Fertig. Habe gerade vier neue Photosets vom New Years Eve, den zauberhaften Villages, einer Tour durch Uptown und vom Bootfahren rund um Manhattan hochgeladen. Reicht jetzt. Urlaub ausreichend dokumentiert.
17. Januar 2009
Neue NYC Bilder - Central Park und Midtown
Ich habe einige neue Bilder von unserem New York Urlaub hochgeladen. Diesmal von unserer Tour durch den Central Park und Midtown, bis es uns schließlich in die New York Public Library verschlagen hat. Dort wollte Carrie Bradshaw im Sex and the City Movie zunächst heiraten …
Hier entlang. Mehr Bilder folgen.
09. Januar 2009
Using IMAP semantics to control web publishing
Every time a new comment or trackback arrives here I get a new mail. Of course I read mails over IMAP, as I utilize a number of different clients. It always felt a bit clumsy to click a link to decide what happens with the new comment: should it be approved or deleted? At the end I decide twice a time what happens with the comment. First I click the link for approval or deletion, second I decide what to do with the notification mail. Why not couple these options? Every unread comment mail represents a moderated comment, if I delete the mail, the comment is deleted, if I just mark the mail as read, it will be approved. The good thing is, we have IMAP so the blog comment moderation daemon would be just another IMAP client that watches a single mail directory. Wouldn’t that be cool? Maybe Garvin would like that for Serendipity.
NYC!
Ich versuche gar nicht zu beschreiben, wie abgefahren unser Silvesterurlaub in New York City war. Höhepunkte waren der Heliflug über Manhattan und New Year’s Eve am Times Square.
Wir haben im Hyatt Regency Hotel in Jersey City gewohnt, das direkt gegenüber vom World Trade Center am Hudson in Jersey City liegt. Das Hotel ist super, wir hatten einen tollen Blick auf Midtown und das Empire State Building aus dem Hotelzimmer und waren mit der U-Bahn in 5 Minuten am World Trade Center.
Gut gegessen haben wir in der Brasserie und im Roberto Passon.
Die Agentur USA.travel, bei der wir die Reise als Paket gebucht haben, können wir sehr empfehlen.
Bilder von Downtown und vom Heliflug schonmal bei Flickr - mehr folgt.
08. Januar 2009
Specialisterne
Menschen mit Autismus sind mit der für sie unkontrollierbaren Umgebung am Arbeitsplatz überfordert und können daher keinem Beruf nachgehen. Stimmt nicht, sagte sich Thorkil Sonne und stellt in seinem Unternehmen Specialisterne eine Arbeitsumgebung und Aufgaben zur Verfügung, die den Stärken von Autisten entsprechen: hohe Sorgfalt, unglaubliche Konzentrationsfähigkeit und Hochbegabung in einzelnen Gebieten. Durch angepasste Arbeitszeiten und Therapeuten wird ausserdem auf die Bedürfnisse der autistischen Mitarbeiter eingegangen.
Sonne und seine Mitarbeiter profitieren, da er lukrative Spezialaufträge aus der Mobilfunk- und IT-Branche annehmen kann.
Der Bericht gestern im Auslandsjournal hat mich beeindruckt. Eine geniale Geschäftsidee.
03. Januar 2009
Seven Things
I’ve got tagged by Brian DeShong and Manuel Pichler to write down seven facts about me. Quick and easy:
- Sung in a boys choir and had professional vocal training for almost ten years. We wore funny suits and it was quite cool
- Sung the alto solo of the Paul McCartney opera Liverpool Oratorio. You didn’t even know Paul McCartney wrote operas, right?
- Went to a Rudolf Steiner school for 13 years. This was not so cool as I’m not enough into mystery
- I’m together with a upcoming geologist. I’m trying to get her into the oil business against her will. We actually met on a dating portal but I have an excuse: I worked there at that time.
- I read most of the works of Theodor W. Adorno, the important ones from Karl Marx and it made me a better programmer. Not.
- I still think smoking is one of the coolist habits ever.
So here are my nominated victims:
- Johannes Steidl, my best friend, because I want to know if I guess right on what the facts are
- Lukas Smith for his efforts in bringing more structure in the PHP core development process
- Johannes Schlüter ‘cause I know he will hate it
- Karsten Gohm a new collegue of mine
- Marc Zacher, the guy who had an intimate affair with Bart
- Marc Jakubowski because of stuff like that
28. Dezember 2008
Ubuntu Linux on an Asus EeePC 901
I got an Asus EeePC for Christmas. As a long time Linux user the pre-installed Windows XP version had a very short life, something around ten minutes to check that the hardware is working. In general installing Linux is not very hard, actually the harder part was to build the install USB stick, as the EeePC has no disk drive. But first a few sentences about the EeePC.
The Good
The device is small and looks cute so the girl acceptance level is pretty high as my personal girl acceptance level test girl confirmed. It just feels right. The weight is alright, 1.1kg is fair enough. Three USB slots, one more than my Apple Mac Book, so good too. VGA out, fine, SD card slot, alright, not that I need it but … RaLink WiFi chip, Gigabit network, built-in web cam, Bluetooth, synaptics touch pad. That’s pretty good, sounds like a complete computer, doesn’t it? The display resolution is 1024×600 – good for such a small device.
The Bad
As as result of the overall size, the keyboard is of course small too. Also I’m now writing this entry on it, it takes some time to get used to it. The position of the pipe/less/greater-key is annoying as it can only be reached in combination with the fn modifier key. This is not very convenient for a programmer. The rest of the layout is more or less standard and it doesn’t take so long to not miss every key.
The Ugly
When I tried Bluetooth the first time, the device was not detected at all. Neither on Windows nor on Linux. But while changing other stuff I found out that the Bluetooth adapter was disabled in the BIOS. It is a nice feature to allow to hard disable some features in the BIOS but disabling anything by default seems not like the most clever idea. So please fix, Asus.
Sadly the EeePC suffers a heat problem. If you stress it a bit it gets really hot on the downside (like the Mac Books). So don’t put it on your naked thigh.
Choosing the Right Distribution
I have the model with two solid state discs which makes a total of 12GB disk space. Not very much but enough for my use cases (and I always wanted to have a SSD based device). I decided to go with Ubuntu:http://ubuntu.com also I normally prefer Gentoo because of the size. Source base distributions like Gentoo don’t differentiate between the actual packages and the header files so a complete Gentoo installations takes a lot more disk space than any binary distribution. Additionally, it was Christmas evening and I wanted something quick. While Gentoo is flexible, it is not quick to install.
Although I chose Ubuntu, I would roughly guess that Fedora or SuSE would work fine too, please leave a comment if you have an experience to share.
I chose Ubuntu mainline, not Eeebuntu because I want to have the latest and greatest Ubuntu and I can configure my panel myself.
Preparing the Installation
Before you read on further make sure you understand that this is not about a dual boot installation. I completely removed the Windows system, so please make sure this is what you want too.
First of all we need a boot medium. There is an SD card slot and a number of USB ports, so the alternatives are USB disk drive, SD card, USB stick. I chose the latter but the rest should work too. Creating an USB boot stick requires a bit of manual work: download the Ubuntu Intrepid Ibex (8.10) ISO image for 32bit computers (Atom CPU) then:
- Format the stick with FAT32:
mkfs.vfat /dev/sdX1 - Add an MBR to the stick:
cat /usr/share/syslinux/mbr.bin > /dev/sdX - Install syslinux:
syslinux -s /dev/sdX1 - Mount the ISO image:
mount -o loop <iso> /mnt/iso - Mount the USB stick:
mount /dev/sdX1 /mnt/stick - Copy the contents of the image to the stick:
cp /mnt/iso/.* /mnt/stick - Fix the dists directory:
mv /mnt/stick/dists/intrepid /mnt/stick/dists/stable - Rename isolinux directory to syslinux:
mv /mnt/stick/syslinux /mnt/stick/isolinux - Rename isolinux.cfg to syslinux.cfg:
mv /mnt/stick/isolinux/syslinux.cfg /mnt/stick/isolinux/isolinux.cfg
Installing Ubuntu from the Stick
Now the USB boot stick is ready. Just plug it in, type F1 to select the boot menu, choose the stick as the boot medium, boot from it and install Ubuntu as usual. Everything is detected and configured correctly including the synaptics touch pad, web cam and screen. The only missing components are the WiFi adapter and the specials keys. The keys generate ACPI events so it should not be hard to get them running. However, I don’t use specials keys so I don’t care.
The WiFi adapter is a RaLink RT2860 and RaLink provides a driver for it. You could download and manually compile this driver but I found it more convenient to have specific package for it.
Installing the Right Kernel
The linux-eeepc-lean kernel from array.org works really well and includes support for the RaLink WiFI adapter. Just follow the setup instructions to install it. Then boot the new kernel and, if everything works fine, edit /boot/grub/menu.lst to use the eeepc lean kernel as the default kernel. The Ubuntu installation is now done, enjoy!
25. Dezember 2008
Happy Christmas
Dieses Jahr feiern wir bei uns zu Hause in Köln und freuen uns über den Besuch unserer Familie aus Bremen. Pünktlich zu Silvester geht es dann in den Urlaub nach New York, wo wir uns auf ein aufregendes Jahr 2009 einstimmen wollen, das sicher die ein oder andere Veränderung mit sich bringen wird.
Frohe Weihnachten Euch allen und ein gutes neues Jahr.
14. Oktober 2008
SSH configuration parameters
Having a number of hosts following the same naming scheme is good, defining them is repetitive and boring. Maybe we could patch SSH to achieve something like this. Take a look at an example for ssh-config:
Host myhost%02d
User lars
Hostname myhost$1.example.com
ssh myhost02 would be expanded and as a result would resolve to myhost02.example.com.
04. Oktober 2008
Köln Marathon: KinderSkate am Tanzbrunnen
Mit unserem Skateverein SSC “Kölner Rollmöpse” haben wir die Skate-Wettbewerbe für Kinder und Jugendliche im Rahmen des Köln Marathon 2008 unterstützt. Es hat viel Spaß gemacht, bei dem unerwartet herrlichen Wetter den Kleinen beim Flitzen zuzusehen.
Morgen skaten wir dann selbst über die Marathondistanz, das letzte Rennen in dieser Saison.
24. September 2008
Antipattern: chaining stateless protocol requests
As we all know, HTTP is a stateless protocol. We do all sort of hacks to add state, like ext/session in PHP. While such hacks work great for a lot of use cases, we should remind ourselves that they are hacks. There is a phenomenon of state creep: coupling unrelated HTTP requests. Think of a page that references a thumbnail in an <img/>-tag and the picture is generated as needed: it would be possible to generate that image in the context of the request that embeds that image. So the template calls a helper to generate the thumbnail and the thumbnail is generated in the file system.
While this works well for a single host, your personal weblog about cooking and cats, it won’t work for something serious. When you start load balancing between two webserver nodes you are set on fire as you can’t guarantee that the image is present on the correct node (beside you are generating the image n times where n is the number of nodes). The solution is not that hard: pregenerate all the images with a queuing system and display “This image is currently not available”-placeholders as long as they are not ready or – in case of little image uploads – generate them when uploading the image. The other option is to generate them on the fly when they are requested. If you do the latter, do it in the context of the request that tries to receive the image, not in the embedding context (the page that embeds the image). Generating on the fly means that you deliver your files through PHP or something similar: this is fine as long as you have an HTTP accelerator in place.
One of the systems that does it in the way described above is Drupal. I’ve implement MogileFS for image storage and retrieval for Drupal and let me say, it was not a pleasure.
On a side note: HTTP 1.1 allows resources to be fetched in parallel, which makes generating images in the wrong context even worse from a user experience point of view, as the page will not show up until each thumbnail is generated.
19. September 2008
8 Hints out of Testing-Turmoil
- Have a continuous integration solution in place. Really. If you don’t, you just burn money by writing tests. I would go so far and say, if you don’t have continuous integration, you should stop writing unit tests and do click testing. Let your CI system generate API docs, high level docs, code coverage report, testdox and every statical analysis info you generate.
- The definition of “tests pass” is “tests pass on the continous integration system”. “Works for me” has neither a place in the bugtracker nor everywhere else.
- If you can’t test it, the architecture is most likely wrong (exceptions are sessions and caching related code which is generally hard to test). Testability should be your main concern when writing code. What’s the use of fast or wonderful looking code, if you can’t repeatable prove it is working?
- Prefer method calls over annotations. A typo in
setExpectedExceptionwill trigger a transparent error, while a typo inexpectedExceptionwill lead to Obscure Test, and most likely a Mistery Guest. - Run the whole test harness twice. This will hellp to identify setup/teardown bugs. Create a random test suite to identify the hard to track mistakes.
- Run your testsuite really often. We run it with 15 seconds delay every minute and I’m pretty happy with it.
- Use good test names that describe the behavior of the unit. The behavior is not the unit you test itself, that’s what I see in the code, it is something like “calling register changes the status of the user to foobar” so the good test name would be “testRegisterChangesTheStatus …”.
- Aim for 100% code coverage. 95% is nothing to be proud about, I can guarantee, the missing 5% will be the hardest part.
13. September 2008
Recovering a software RAID
The scenario: my RAID crashed because I’ve messed around with the partition table of one of the disks in there. This results in a RAID array not being able to assemble itself because the superblock of the messed up device is invalid. The trick is pretty easy: just recreate the whole RAID with mdadm. The existing metadata will not be overwritten, the current information is just replicated. I used to have a simple RAID1, but I’ve now recreated it as an incomplete RAID5 (--level=5, --raid-devices=2) as the missing disk is soon to be bought.
$ mdadm --create /dev/md0 --level=5 --raid-devices=2 /dev/<original> /dev/<crashed>
If you like to stick with a RAID1, and not doing the migration to RAID5 along the way, just use --level=1 instead. I’m not really sure if the order of the disks matter and I’m not brave enough to find it out.
Tomorrow I’m going to buy the next disk for the RAID to make sure the redundancy level is alright. Generally I’m pretty amazed that this kind of setup is so robust. Even me messing around with it can’t bring it down.
07. September 2008
Deutschlandtour Finale in Bremen
Kurz notiert: am Wochenende in Bremen gewesen. Nasses Finale der Deutschlandtour gesehen. Zu wenig Zuschauer an der Strecke, typisch Bremen. Auf dem Bild ist unter anderem der Gesamtsieger Linus Gerdemann zu sehen. Mehr Bilder.
Ausserdem Familie, Freunde und neue Erdenbürger gesehen.
03. August 2008
Testing PHP 5.3 alpha1
Finally Johannes Schlüter baked a first alpha-tarball for PHP 5.3. The new version contains a huge amount of new features, like closures, namespaces and late static binding. Such a huge amount requires thorough testing: if you are using a PHP application you would like to see fully working with our brand new version or you are developing a PHP application, this is your chance to make sure everything will go smoothly. If you are a web hosting provider, do your performance benchmarks now!
If you are, accidentally, using the Gentoo Linux distribution, I have something for you: in my personal PHP overlay you can find an ebuild for PHP 5.3.0_alpha1. A few warnings: currently, ext/fileinfo does not compile because of #45636 and of course I did not test all possible USE-flag combinations. If you experience problems with it, just leave a comment here.
02. August 2008
Specific env vars for Gentoo packages
Since Gentoo Portage introduced the package specific configuration in /etc/portage there was one thing I always missed: specifying environment variables per package. Some environment variables you might want to specify per package are CFLAGS, CXXFLAGS and FEATURES. Especially when you do debugging, some packages should not be stripped, which is the perfect use case for the FEATURES environment variable. While specifying USE-flags and keywords per package, the rest is not that easy. Christian Hoffmann dropped me a link to this mail: the tip there works fine. I’ve played around with it and implemented it slightly differently: first, I would like to be informed which environment files are read and second I changed the resolution order so that the specific configuration inherits from the more generic. So this is what my /etc/portage/bashrc looks like now:
[geshi lang=bash]
for conf in ${PN} ${PN}-${PV} ${PN}-${PV}-${PR}; do
env=/etc/portage/env/${CATEGORY}/${conf}.env
if [[ -f ${env} ]]; then
einfo "Reading specific environment from ${env}"
. ${env}
fi
done
[/geshi]
For dev-lang/php-5.2.6-r3 I can use three different files to customize the build environment: /etc/portage/env/dev-lang/php.env would apply for all PHP ebuilds, /etc/portage/env/dev-lang/php-5.2.6.env for all revision of the ebuild for 5.2.6 and /etc/portage/env/dev-lang/php-5.2.6-r2.env for the exact ebuild. My /etc/portage/env/dev-lang/php.env file now looks like this to disable stripping the binaries after emerging them and keeping the working directory for better backtraces:
[geshi lang=bash]
FEATURES="${FEATURES} nostrip keepwork"
[/geshi]
30. Juli 2008
Antipattern: the verbose constructor
Constructors are often used to shortcut dependency injection and parameter passing on instantiation. This is a valid practice and often leads to shorter code. Consider the following example (a simple value object, often used to not mess around with floats and to keep currency and amount together):
class Money
{
protected $_amount;
protected $_currency;
protected $_divisor;
public function __construct(
$amount = null, $currency = null, $divisor = null)
{
if ($amount !== null)
$this->setAmount($amount);
if ($current !== null)
$this->setCurrency($currency);
if ($divisor !== null)
$this->setDivisor($divisor);
}
... setter and getter ...
}
Now consider instantiating this object. Instead of creating a new instance of “Money” and calling three setter, everything can be done compactly in the constructor.
bc . $money = new Money(13200, ‘EUR’, 100);
So for the money object this works pretty well. The code is easy to read, but wait, the first argument can be grasped easily, the second too, but the third? It is not too obvious that it is a divisor is passed. An alternative would be changing the constructor to accept an array. This is a replacement for true named arguments, as e.g. Python supports. Solar uses that a lot, as well as the Zend Framework.
$money = new Money(
array(
'amount' => 13200,
'currency' => 'EUR',
'divisor' => 100
)
);
Much better readable but does your IDE code completion works? And what happens if you pass “amoµnt”, because your fingers are as clumsy as mine? Exactly, the parameter will be silently ignored.
But look at this:
$money = new Money();
$money->setAmount(13200);
$money->setCurrency('EUR');
$money->setDivisor(100);
It is at least equally short, readable, your IDE works and if you have problems with the dimensions of your keys on your keyboard (they are too small, it has nothing to do with your fingers) you will be warned. But we could even have an even shorter example while maintaining the readability. With fluent interfaces we would get the following:
$money = new Money();
$money->setAmount(13200)->setCurrency('EUR')->setDivisor(100);
Wonderful! If you want, you can add a newline between each object operator and you would have the same amount of lines but less dense code (sad that we don’t have fluent constructors, isn’t it?). Sometimes setters are so elegant.
So until know one thing should be clear: it is not just about easily writing the code, but about the next guy understanding it too. Because you never write code for yourself. Never. But let’s investigate some real live example. I work with a framework that allows me to define really nifty business logic by just sticking together a bunch of fields and every field having a bunch of validators and filters attached.
class User extends Model
{
protected function _define(Definition $definition)
{
$definition->addField(new StringField('username', true, null, true));
}
protected function _getStorageClass()
{
return 'UserStorage';
}
}
All the time I write such a definition, I need to look into the code to check the order of the parameters. I can remember the first parameter, but the rest is too similar. To explain it: the second parameter specifies whether the field is required, the third expects a default parameter and the fourth indicates whether the value can be changed after it has been set once. I’ve talked about filters and validators, right?
class User extends Model
{
protected function _define(Definition $definition)
{
$definition->addField(new StringField('username', true, null, true))
->addValidator(new UniqueUserValidator())
->addFilter(new LowercaseFilter())
->addValidator(new RegexValidator('/^[a-z]+$/'));
}
}
Definition::addField() returns the passed field object to allow adding validators and filters. What works for validators and filters, should work for the rest too, shouldn’t it?
class User extends Model
{
protected function _define(Definition $definition)
{
$definition->addField(new StringField('username'))
->setRequired(true)
->setReadonly(true);
}
}
I admit, a bit more code to write, but a huge improvement in readability and therefore in maintainability. Other variants, where setter are not a good solution is to create an expressive factory. We e.g. have a Criteria object that creates and orders Criterion objects internally. Because we don’t have a fluent constructor, we have a static create-method for the Criteria object.
$criteria = Criteria::create('User')->field('id')->equal(1);
The alternative with just utilizing the constructor would be horribly to read and would have limitations regarding the parameter parsing capabilities (except if func_get_args() is used, which is totally the opposite of the paradigm of strict APIs). But back to the constructor only example:
$criteria = new Criteria('User', array('id' => 1));
And how would you express “id not equal 1” with it? So that’s where expressive factories are an alternative.
Constructors, as like any other method, should have as less parameters as possible but as much as needed. Obvious. The constructor should only allow setting vital information for the object (if the object has a name, there is a good chance, that the name is the parameter of the class’ constructor because it is considered vital). And the ease of use depends heavily whether the parameters passed can be intuitively distinguished by looking at there values. As well when the code is written first time as for maintaining it for the rest of your life.
(There are a bunch of other tricks to make parameters more readable, like using class constants as parameters, but this is out of scope of this article).
27. Januar 2008
Wahlen in Hessen
Erste Berichte über die Wahl(-beobachtung) in Hessen. Wahlcomputer übernachteten demnach auch in Wohnungen von Parteifunktionären, die Beobachtung des Aufbaus der Maschinen wurde teilweise untersagt (“Sie haben hier gar keine Rechte!”) bzw. der Zutritt zu den Wahllokalen verwehrt, Anzeigen wegen Störung der Wahl angekündigt und Personalien aufgenommen …
Ach – in Rundschreiben an Wahlvorstände wurde wohl vor dem Auftauchen des Chaos Computer Clubs gewarnt und scheinbar gleich die Benutzung von Fotoapparaten, Telefonen und Computern im Wahllokal untersagt.
[…] Das sich bisher abzeichnende Bild ist schlimmer als erwartet. Wir waren eigentlich davon ausgegangen, das, nach der Aufmerksamkeit im Vorfeld, alle Beteiligten peinlich darauf achten alles richtig zu machen und das auch zu demonstrieren. So wie es aussieht wird die Liste der Gruende fuer die Wahleinsprueche eher laenglich… – Eine kleine Demokratur in Westeuropa…
Technorati Tags: wahlen, hessen, ccc, demokratie, wahlcomputer
Noch wer auf Wohnungssuche
Hat jemand eine Wohnung im Münchener Süden an den Herrn an der Kletterwand abzugeben?
Goodbye Ruhrgebiet!
Zeitnah zu meinem Arbeitsantritt vor knapp zwei Jahren in Köln habe ich letzte Woche eine eigene Wohnung in Bayenthal gefunden und breche momentan meine Zelte im Ruhrgebiet ab.
Da man es in der Domstadt eh nicht so mit Karneval hat, kann ich ohne Stress und Trubel an eben jenem "Veranstaltungswochenende" umziehen. Das wird dann wohl ein wahrer Karnevalsumzug *hmpf*
OSXCrypt - Truecrypt für Mac
Der Herr K. von nebenan hat mich darauf gestoßen:
OSXCrypt.org – Truecrypt for MAC
Nette Sache, wenn es hält, was auf der Website versprochen wird – darauf warte ich schon, seit ich den Apfel verwende. Filevault oder verschlüsselte Container sind auch nicht der Weisheit letzter Schluss und lassen darüber hinaus die nützliche Funktion der “glaubhaften Bestreitbarkeit“ (engl. Plausible deniability) missen – nicht ganz unwichtig, falls man in Länder reist, in denen man gezwungen werden könnte, seine Keys und Passwörter rauszurücken.
Technorati Tags: verschlüsselung, datenschutz, privatsphäre, truecrypt, apple
26. Januar 2008
Reread: Entschwörungstheorie
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.
Compiz fusion: left click
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.
Über Standorte
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.
Exhibitionismus 2.0
[…] Kein Zweifel: Insbesonders in der Bevölkerungsruppe bis 35 Jahre gibt es eine ausgeprägte Neigung, im Web permanent die Hose herunter zu lassen. Social Networks, konstatiert darum der Informatiker Hendrick Speck, Professor an der Fachhochschule Kaiserslautern, verfügten heute schon über “mehr Informationen, als die Stasi je hatte”. […] – Social Networks: Der Fall Kerviel und die ungezügelten Exhibitionisten – Netzwelt – SPIEGEL ONLINE – Nachrichten
Update: Passend dazu auch dieser FAZ-Artikel:
Selbstdarstellung im Netz: Ich zeige alles von mir
Technorati Tags: datenschutz, privatsphäre, social networks, soziale netzwerke
„Dr. Who“ im deutschen Fernsehen
Ausgestrahlt werden die seit 2005 neu produzierten Folgen Samstags um 17 Uhr auf ProSieben:
TP: Dezentrales Archiv Privatkopie
Technorati Tags: doctor who, serien, tv, bbc, prosieben
23. Januar 2008
Hell froze … NOOOT
Ganz so sensationell ist es nun doch nicht, aber da ich ja kaum mehr blogge, teste ich nun mal Twitter. Das bedeutet, die ganzen Neuigkeiten und Fundstücke, die zu klein für einen Blogeintrag sind, werden in SMS-Größe dort zu finden sein. Mal schauen, wie das läuft.











